I have a new Lenovo ThinkPad E15 that came with Windows 10 installed. I added Ubuntu 20.04 as an option (dual-boot).
Whenever the laptop sleeps (goes into a "suspend" state) and then later I wake it up, the Logitech wireless mouse scroll wheel doesn't work. ("Logitech MK270 Wireless Keyboard and Mouse Combo", but the only thing that doesn't work is the scroll wheel.)
I then unplug its USB-A dongle and replug it (I often need to do this multiple times), and then the mouse wheel works again.
I don't want to need to touch the USB plug at all. It should just always work. How can I fix this?
P.S. My question is very similar to Ubuntu 20.04: Scroll doesn't work for wireless mouse after system wakes up from suspended state, which has no answer yet.
P.P.S. I've confirmed that the USB switch in my setup is not related to the problem. The problem happens even when the tiny Logitech USB dongle is plugged directly into the laptop.
modprobe
doesn't help here, the best chance is to reset the USB bus for this malfunctioning or missing device.Look for the USB ID in the form of VID:PID of the device with
lsusb
. Installusbutils
and issueusbreset VID:PID
. After this, the device should be functioning again without unplugging and replugging. The bus reset is not exactly equal, but should be close enough.To automate this action, make a systemctl service for it:
sudo vim /etc/systemd/system/[email protected]
Paste in these lines, and save the file:
Recall the VID:PID value you got from
lsusb
.For example, maybe it was
0bda:5411
.Enable/start the service by running a command like:
sudo systemctl start reset-usb-upon-wake@VID:PID.service
, such assudo systemctl start reset-usb-upon-wake@0bda:5411.service
.This way, even if you have multiple devices that need this kind of service, they can all use this single service file.
I solved the problem of not working the scroll in a wireless mouse after suspend , by disabling in bios the following( I am not sure which one was the problem)
-USB Legacy port charging -wake on USB -USB redirection support