When I ever boot into Ubuntu my wireless usb mouse gets stuck for moments frequently and the mouse wheel is too sensitive. Only when I unplug the wireless usb and plug it back in does the mouse return to normal.
I would like to simulate unplugging and plugging in my usb mouse in my startup bash script so that I don't have to do it manually every time. Is there a terminal command for this?
Thanks so much.
terminal:~$ xinput -list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® Nano Transceiver v2.0 id=10 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® Nano Transceiver v2.0 id=11 [slave pointer (2)]
⎜ ↳ eGalax Inc. eGalaxTouch EXC3000-0367-44.00.00 id=13 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Microsoft Microsoft® Nano Transceiver v2.0 id=9 [slave keyboard (3)]
↳ HP Webcam id=12 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
↳ HP Wireless hotkeys id=16 [slave keyboard (3)]
↳ HP WMI hotkeys id=17 [slave keyboard (3)]
terminal:~$ xinput --list-props
Usage: xinput list-props <device> [<device> ...]
terminal:~$ xinput --list-props 11
Device 'Microsoft Microsoft® Nano Transceiver v2.0':
Device Enabled (143): 1
Coordinate Transformation Matrix (145): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (272): 0
Device Accel Constant Deceleration (273): 1.000000
Device Accel Adaptive Deceleration (274): 1.000000
Device Accel Velocity Scaling (275): 10.000000
Device Product ID (261): 1118, 1861
Device Node (262): "/dev/input/event7"
Evdev Axis Inversion (276): 0, 0
Evdev Axes Swap (278): 0
Axis Labels (279): "Rel X" (153), "Rel Y" (154), "Rel Horiz Wheel" (268)
Button Labels (280): "Button 0" (265), "Button Unknown" (264), "Button Unknown" (264), "Button Wheel Up" (149), "Button Wheel Down" (150), "Button Horiz Wheel Left" (151), "Button Horiz Wheel Right" (152)
Evdev Scrolling Distance (281): 1, 1, 1
Evdev Middle Button Emulation (282): 0
Evdev Middle Button Timeout (283): 50
Evdev Third Button Emulation (284): 0
Evdev Third Button Emulation Timeout (285): 1000
Evdev Third Button Emulation Button (286): 3
Evdev Third Button Emulation Threshold (287): 20
Evdev Wheel Emulation (288): 0
Evdev Wheel Emulation Axes (289): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (290): 10
Evdev Wheel Emulation Timeout (291): 200
Evdev Wheel Emulation Button (292): 4
Evdev Drag Lock Buttons (293): 0
terminal:~$ xinput --list-props 10
Device 'Microsoft Microsoft® Nano Transceiver v2.0':
Device Enabled (143): 1
Coordinate Transformation Matrix (145): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (272): 0
Device Accel Constant Deceleration (273): 1.000000
Device Accel Adaptive Deceleration (274): 1.000000
Device Accel Velocity Scaling (275): 10.000000
Device Product ID (261): 1118, 1861
Device Node (262): "/dev/input/event6"
Evdev Axis Inversion (276): 0, 0
Evdev Axes Swap (278): 0
Axis Labels (279): "Rel X" (153), "Rel Y" (154), "Rel Horiz Wheel" (268), "Rel Dial" (269), "Rel Vert Wheel" (270), "Rel Misc" (271)
Button Labels (280): "Button Left" (146), "Button Middle" (147), "Button Right" (148), "Button Wheel Up" (149), "Button Wheel Down" (150), "Button Horiz Wheel Left" (151), "Button Horiz Wheel Right" (152), "Button Side" (266), "Button Extra" (267), "Button Unknown" (264), "Button Unknown" (264), "Button Unknown" (264), "Button Unknown" (264)
Evdev Scrolling Distance (281): 1, 1, 1
Evdev Middle Button Emulation (282): 0
Evdev Middle Button Timeout (283): 50
Evdev Third Button Emulation (284): 0
Evdev Third Button Emulation Timeout (285): 1000
Evdev Third Button Emulation Button (286): 3
Evdev Third Button Emulation Threshold (287): 20
Evdev Wheel Emulation (288): 0
Evdev Wheel Emulation Axes (289): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (290): 10
Evdev Wheel Emulation Timeout (291): 200
Evdev Wheel Emulation Button (292): 4
Evdev Drag Lock Buttons (293): 0
Edit: it seems as though from above that ubuntu is running two drivers for the same mouse under id 10 and 11.
Edit: I solved the mouse bug.
In the file..
/etc/laptop-mode/conf.d/runtime-pm.conf
I had to make
CONTROL_RUNTIME_AUTOSUSPEND=0
This fixes the mouse bug I was experiencing for years.