Initially, there was no issue in the first few days after upgrading to 18.10 Cosmic (from 18.04 Bionic), even after suspend/restart/shutdown.
Today, after waking from suspend, the bluetooth mouse started to lag. If I left it stationary for 5 seconds, it would take 2 seconds of constant movement before pointer can move. It seemed to switch to sleep mode after just 5 seconds.
I tried:
scan off
inbluetoothctl
(the command failed to run anyway).- Re-
modprobe
the btusb. sudo sh -c 'echo N > /sys/module/drm_kms_helper/parameters/poll'
tlp
andpowertop
are not installed.
Best Answer
Remove
canonical-livepatch
which is supported in LTS releases only, i.e. not supported in 18.10.To remove,
I previously had an issue was also (partially) caused by the package.
Edit: the issue resurface again. Installing
powertop
without any config somehow resolve it.Edit: USB autosuspend is probably the cause.
sudo powertop
.A command will shows up on Terminal,
>> echo 'on' > /usr/bus/usb/devices/2-6/power/control';
Note down the command.
Create a shell script in
/usr/bin/
.$ sudo pluma /usr/bin/disable-bt-mouse-autosuspend
Paste the following:
2-6
to what you got from powertop in Step 5.Make the script executable.
$ sudo chmod u+x /usr/bin/disable-bt-mouse-autosuspend
Add
disable-bt-mouse-autosuspend
to systemd.$ sudo pluma /etc/systemd/system/disable-bt-mouse-autosuspend.service
Paste the following,
Save it. Start and enable it.
$ sudo systemctl start disable-bt-mouse-autosuspend
$ sudo systemctl enable disable-bt-mouse-autosuspend
The setting will also reset during suspend. To re-apply it:
$ sudo pluma /lib/systemd/system-sleep/00disable-bt-mouse-autosuspend
Paste the following script and save it,
Set executable permission,
$ sudo chmod u+x /lib/systemd/system-sleep/00disable-bt-mouse-autosuspend