You are not logged in.
I just scavenged a bluetooth mouse from a drawer, and tried it out. Every 2 seconds or so, it would die and take some seconds to start working again.
Searching the web led me to [SOLVED] Bluetooth mouse lag after idle, which suggests
Adding "btusb.enable_autosuspend=0" to kernel parameters fixes this issue.
Since the post is a bit old (2022), I looked up on official wikis and eventually landed on Power management, §3.9.3 - USB autosuspend. Reading that, my attempt consisted in plugging this line
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c52b", GOTO="power_usb_rules_end"at the empty line in /etc/udev/rules.d/50-usb_power_save.rules, which was like this:
# blacklist for usb autosuspend
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1e7d", ATTR{idProduct}=="307a", GOTO="power_usb_rules_end"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1e7d", ATTR{idProduct}=="3098", GOTO="power_usb_rules_end"
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
LABEL="power_usb_rules_end"Additionally, that section also mentions another (?) solutioni, which is to set usbcore.autosuspend=SS, where SS is the number of seconds after which the USB should autosuspend, so I also opened /etc/default/grub and changed the line
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"to
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet usbcore.autosuspend=60"and run
sudo grub-mkconfig -o /boot/grub/grub.cfg and rebooted.
Now the mouse seems indeed not to go to sleep, however, not even after 60 seconds, so I suspect that changing the kernel param had no effect, so I might as well revert that?
Also, unlike the link I posted, usbcore.autosuspend sounds a bit more general than btusb.enable_autosuspend, which seems to specifically refer to bluetooth.
So, what is the correct way of fixing the original issue? Have I done the right thing? Can I revert one or the other?
Last edited by Enrico1989 (2025-06-03 16:43:44)
Offline
systool -vm btusbSeems enabled by default.
"usbcore.autosuspend" is the global default, your udev rule overrides that for the specific device, ie. you
might as well revert that
and if the btusb setting doesn't get in the way (idk what triggers or timeouts it uses) you can just keep that as well if the main problem was caused by the general usb autosuspend.
Online
"usbcore.autosuspend" is the global default, your udev rule overrides that for the specific device, ie. you
might as well revert that
We are talking about reverting the kernel param change and leave the udev rule only, right?
and if the btusb setting doesn't get in the way (idk what triggers or timeouts it uses) you can just keep that as well if the main problem was caused by the general usb autosuspend.
... because other USB mouses/devices could show the same issue, so I can keep usbcore.autosuspend? If I do that, then should do things the other way around, i.e. revert the change to udev rule and leave the kenerl parm change only?
Offline
reverting the kernel param change and leave the udev rule only, right?
Right.
other USB mouses/devices could show the same issue, so I can keep usbcore.autosuspend?
Is this a notebook and do you care about the battery runtime?
(This is only relevant for energy saving, otherwise you can globally disable the autosuspend - nb. that power mananger can and will override that at runtime, so you've have to configure them, too)
If you globally disable this, you won't need udev rules for specific devices.
Online