Based on meuh's instructions, here is how this "screen saver" was done:
evemu-record /dev/input/event2 |
stdbuf -oL egrep 'EV_KEY|REL_WHEEL' |
Where network_saver.sh is this:
while [ 1 ]
echo Waiting for $WAIT seconds of mouse button inactivity
while read -t $WAIT line
If you don't want to write a program to do this, there are several programs that will show you mouse events. For example, evemu-record on a mouse input device will show each button press, wheel scroll, and movement in a very verbose output such as (shown edited):
E: 0001 0111 0001 # EV_KEY / BTN_RIGHT 1
E: 0000 0000 0000 # ------------ ...
Pressing and holding the switch-device button on the M590 resets the current connection (#1 or #2), and the mouse is visible to bluetooth devices again.
It's not exactly an exact solution to the problem above, but it does solve the general problem.
Not really an answer yet, but an explanation of the logs:
In dmesg you can see that the mouse gets picked up right away, even before the HID driver is loaded:
[ 2.132040] usb 1-3: new full-speed USB device number 2 using xhci_hcd
[ 2.282469] usb 1-3: New USB device found, idVendor=145f, idProduct=0405
[ 2.283727] usb 1-3: New USB device strings: ...
Ubuntu gnome tweaks has a feature called disable touchpad while typing. Some times disabling that feature worked for me. I currently use ubuntu 18.04
Tweaks -> keyboard & Mouse -> touchpad -> disable while typing
It's been a few years since the previous answer was written. It appears that since then udev has changed so that the udev solution no longer works, at least for Ubuntu 18.04 with udev package version 237-3ubuntu10.29. I'm posting this answer for the benefit of people encountering this problem in the future, since I haven't found any other reports of this ...
You can set imwheel to run on startup in your desktop environment settings. On GNOME you should probably make a .desktop file (follow the instructions at https://stackoverflow.com/a/8290652/5495101 and use the imwheel command in the Exec= field).
For the first scroll spin ignored, I had the same problem on Arch Linux, and fixed it by installing xf86-input-...
Also, this works for me:
xinput --set-prop "NAME_OF_YOUR_MOUSE" "Device Accel Constant Deceleration" 3
Where NAME_OF_YOUR_MOUSE is the name of your mouse, which can be obtained by simply typing
in a terminal.
You can add this command to "Application Autostart", in "Session and Startup" settings.
If you are trying the xmodmap commands (on X, not Weyland) and you are getting the error BadValue (integer parameter out of range for operation) in X_SetPointerMapping, you may need to use xinput instead. Run xinput with no parameters to get the device IDs (look for one for the pointer) then run
xinput set-button-map [pointer-device-id] 1 2 3 4 5 0 0 0 0