I have a Wacom Bamboo tablet which has a touchpad function I almost never use—it mostly gets in the way. I have a script which switches that function off, run via a .desktop file in ~/.config/autostart
. This works fine and I have no problem running the script from a terminal either.
The problem is that after resuming from suspend, the touch function reactivates. Prior to upgrading to 16.04, this script was called from /etc/pm/sleep.d/wacom
which switched it off again. After upgrading I’ve tried doing the same thing using systemd (/lib/systemd/system-sleep/wacom
), but there seems to be something very different about the context in which it’s run because the command produces puzzling errors.
Syslog shows wacom_set_report: ran out of retries (last error = -32)
and error -32 seems to mean “communication pipe broken”.
Logging output shows that even getting the status fails—xsetwacom get "$DEVICE" touch
* returns no output when it should report “on” or “off”. Running the command to switch off touch (xsetwacom set "$DEVICE" touch off
) returns “Failed to open Display .
”.
I also get this—warning: commands will be executed using /bin/sh
but the script runs fine for me using sh
.
I’ve tried adding a sleep
command before calling the script but it doesn’t seem to help. I’ve called it using at
(at now + 1 min -f
), but the result is the same—even though it’s running well after resume the script still can’t even get the device status. I tried putting the status command into a while loop, but it never broke out of the loop (no status was returned), yet at the same time I could run the command successfully in a terminal.
I’ve also tried putting the command directly in /lib/systemd/system-sleep/wacom
.
This is fairly trivial, but annoying that this used to work, but now doesn’t.
·
*DEVICE="Wacom Bamboo 2FG 6x8 Finger touch"
as returned by xsetwacom list dev
.
0 Answers