一段时间以来,我在Linux发行版(Kubuntu 18.04)中安装了Prolbem。每次我的Linux从待机模式返回时,触摸板将不再正常工作(无法抓取并拖动文件或其他对象)。
我已经为我的问题找到了解决方案:
modprobe psmouse -r
modprobe psmouse
此代码确实解决了问题。但是,此后,我始终在sartup禁用的右键单击区域再次启用。我有一个在启动时运行的脚本,该脚本执行以下操作:
synclient RightButtonAreaLeft=0
synclient RightButtonAreaTop=0
我现在想做的是编写一个脚本,该脚本在系统从待机方式唤醒时运行。我这样写脚本:
#!/bin/bash
exec 1> /home/luc/Schreibtisch/update.log 2>&1
set -x
case $1/$2 in
pre/*)
echo "Going to $2..."
# Place your pre suspend commands here, or `exit 0`
# if no pre suspend action required
exit 0
;;
post/*)
echo "Waking up from $2..."
sh /home/luc/Schreibtisch/test.sh
sh /home/luc/Schreibtisch/test2.sh
;;
esac
test.sh运行modprobe
命令,而test2.sh运行synclient
命令。
进入待机模式并再次醒来后,我得到以下日志:
+ case $1/$2 in
+ echo 'Waking up from suspend...'
Waking up from suspend...
+ sh /home/luc/Schreibtisch/test.sh
+ sh /home/luc/Schreibtisch/test2.sh
Failed to connect to X Server.
Failed to connect to X Server.
而且,文件的抓取和拖动工作都非常完美,但右键单击仍处于启用状态。
我的问题是现在是否可以synclient
在X Server准备就绪后执行命令?
百事可乐
看来我发现了唤醒后触摸板无法正常工作的解决方法。
在我/etc/modprobe.d/blacklist.conf
的模块i2c_i801
被列入黑名单。从黑名单中删除此模块后,我的触摸板现在可以在待机模式下正常工作。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句