5

I am running Xubuntu 18.04 kernel version 5.0.0-23-generic and using a cheap microsoft usb mouse. I also have setup imwheel with the following settings:

".*"
None, Up, Button4, 3
None, Down, Button5, 3
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5

as per this tutorial for slow scroll speed:
http://www.webupd8.org/2015/12/how-to-change-mouse-scroll-wheel-speed.html

My problem:

when I resume from suspend the scroll wheel no longer works.

A tedious workaround I found is to unplug and replugin the usb receiver. This will bring the scrolling function back, but will not resume the imwheel settings above--the scroll speed is super slow. To get back my scroll speed settings I have to type in console: imwheel --kill to restart my imwheel settings.

Is there anyway to automate this process? My goal is to have normal scrolling when resuming from suspend without having to go thru steps above.

I am still very new to linux so any help is greatly appreciated.

EDIT: prior to removing and replacing receiver, Chrome will scroll albeit extreeeemely slowly, but other programs, such as Thunderbird will not scroll at all.

2
  • Your mouse seems to need to have imwheel run again, as it looks like suspend/resume didn't save/restore its state. Read man pm-action (Provided by: pm-utils_1.4.1-17_all) to see how to add your command to be run at the right time.
    – waltinator
    Commented Aug 4, 2019 at 21:25
  • So, the imwheel --kill command only works after I remove and replace usb receiver. Commented Aug 5, 2019 at 18:51

2 Answers 2

7

I know that i'm little bit late. I've came across same issue recently, when i installed a new Microsoft wireless mouse.

Initially I've fixed it by re-plugging the dongle usb reciever, but it was really annoying :( .

So i tried something different(which saves my time)

I've reloaded the usbhid kernel module

#!/bin/bash

#This is the fix for mircosoft mouse scrolling issue after wake from a suspension
if [[ $1 == post ]]; then
    modprobe -r usbhid
    modprobe usbhid
fi

Place the above script in following directory

/lib/systemd/system-sleep/

This will do the trick!!

3
  • on which file shall the scribt be saved? what will be the name of the file to be saved, and will it run automatically?
    – Sanjay
    Commented Dec 29, 2020 at 2:47
  • 1
    Dude, thank you so much! That was annoying the as F!
    – ademarizu
    Commented Jul 21, 2021 at 13:00
  • I have the same problem (askubuntu.com/q/1358360/48214). I tried your answer but haven't gotten it to work. It seems to have no effect. I'll also look at unix.stackexchange.com/q/309247/48973 Thanks for your answer though. It's a bit encouraging.
    – Ryan
    Commented Aug 19, 2021 at 15:39
5

I have the same problem with my Logitech MX Master 3.

First tried removing module usbhid or i2c_hid but got following error:

$ sudo rmmod usbhid
rmmod: ERROR: Module usbhid is in use by: hid_logitech_dj

Solution working for me:

sudo rmmod hid_logitech_dj
sudo modprobe hid_logitech_dj
2
  • Thanks! I had a problem with my Logitech MX Master 3 but for me after resume the scroll would just work intermittently, requiring multiple turns of the scroll wheel to register. Unfortunately just reloading hid_logitech_dj didnt work for me but I noticed another module alongside it: hid_logitech_hidpp and reloading it as well did the trick for me.
    – Maks
    Commented Aug 13, 2023 at 23:40
  • Archlinux 6.4.12-arch1-1 issue solved, thanks
    – Lex
    Commented Oct 17, 2023 at 7:05

You must log in to answer this question.

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