1

I was able to get my BlueTooth mouse to stop lagging with the command:

echo 300 > /sys/devices/pci0000:00/0000:00:14.0/usb1/1-14/power/autosuspend

However, I believe that this change will be lost upon reboot.

I understand the concept of the /sys directory being an abstraction of the hardware on the computer and by writing to this pretend file I am actually changing some runtime? kernel? parameter.

I am also aware of commands like sysctl that work on this system, and .rules files that I think would be used to persistently set such values, but have not been able to figure out how to actually implement it after hours of searching. I am probably totally off track for all I know.

Any advice would be appreciated. Thanks

1
  • Why ask the question when you have not rebooted to see if this even happens?
    – David
    Feb 7, 2022 at 7:13

1 Answer 1

0

echo 300 > /sys/devices/pci0000:00/0000:00:14.0/usb1/1-14/power/autosuspend

However I believe that this change will be lost upon reboot.

I would create a .rules file for udev to automatically set the value when the device is added. E.g., file /etc/udev/rules.d/90-bluetooth-mouse-autosuspend.rules containing:

ACTION=="add", \
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb1/1-14", \
ATTR{power/autosuspend}="300"

Now reboot and check if the value is set to "300":

$ cat /sys/devices/pci0000:00/0000:00:14.0/usb1/1-14/power/autosuspend
300

Note that this rule will be applied to that specific USB port even if you plug in a different device other than the mouse. It is probably a better idea to check output of udevadm info -a -p /devices/pci0000:00/0000:00:14.0/usb1/1-14 for ATTR{product}=="xxx" and/or ATTR{serial}=="xxx" that you can include in the /etc/udev/rules.d/90-bluetooth-mouse-autosuspend.rules file. This will ensure the rule matches only your bluetooth mouse.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .