dell-xps-9560-ubuntu-respin icon indicating copy to clipboard operation
dell-xps-9560-ubuntu-respin copied to clipboard

Touch screen power saving

Open luispabon opened this issue 6 years ago • 3 comments

Another power top tunable that could be set on boot:

echo 'auto' > '/sys/bus/usb/devices/1-9/power/control';

luispabon avatar May 23 '18 14:05 luispabon

/lib/systemd/system/touchscren-powersave.service

[Unit]
Description=Enable touch screen powersave

[Service]
Type=oneshot
ExecStart=/bin/sh -c "echo 'auto' > '/sys/bus/usb/devices/1-9/power/control';"

[Install]
WantedBy=default.target
sudo systemctl enable touchscren-powersave

luispabon avatar May 23 '18 14:05 luispabon

The reason I have these as services is because powertop autotune messes up with certain devices I have sometimes connected on boot. For instance my external keyboard or mouse become unresponsive on first interaction if they're idle for more than a few seconds, which is infuriating.

luispabon avatar May 23 '18 14:05 luispabon

For some reason this script was working for me when invoking it manually, but not on boot. I think that there is some other process setting the autosuspend setting to "on" after the touchscreen-powersave service runs.

Regardless, I managed to make it work by changing the Type line to:

Type=idle

This delays the execution of the service to later in the boot to ensure that it won't be overridden by whatever was forcing autosuspend off.

ryanshow avatar Aug 18 '18 03:08 ryanshow