telmich / gpm

general purpose mouse
http://www.nico.schottelius.org/software/gpm/
GNU General Public License v2.0
83 stars 28 forks source link

Error in read()ing first: Invalid argument #38

Open aagontuk opened 4 years ago

aagontuk commented 4 years ago

GPM is failing to give mouse support in console with the following error:

*** err [daemon/getmousedata.c(47)]: Error in read()ing first: Invalid argument

I am using Gentoo. I have two mice. A Logitech USB mouse and touchpad. Device nodes are created in /dev/input/event5 and /dev/input/event6. I have tested them with libinput debug-events. They are working just fine so I think kernel drivers are ok.

-event2   DEVICE_ADDED     Power Button                      seat0 default group1  cap:k
-event3   DEVICE_ADDED     Video Bus                         seat0 default group2  cap:k
-event0   DEVICE_ADDED     Lid Switch                        seat0 default group3  cap:S
-event1   DEVICE_ADDED     Sleep Button                      seat0 default group4  cap:k
-event5   DEVICE_ADDED     Logitech USB Optical Mouse        seat0 default group5  cap:p left scroll-nat scroll-button
-event4   DEVICE_ADDED     AT Translated Set 2 keyboard      seat0 default group6  cap:k
-event6   DEVICE_ADDED     SynPS/2 Synaptics TouchPad        seat0 default group7  cap:pg  size 100x76mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on
-event7   DEVICE_ADDED     TPPS/2 IBM TrackPoint             seat0 default group8  cap:p left scroll-nat scroll-button
-event5   POINTER_BUTTON    +2.36s      BTN_LEFT (272) pressed, seat count: 1
 event5   POINTER_BUTTON    +2.41s      BTN_LEFT (272) released, seat count: 0
 event5   POINTER_BUTTON    +4.56s      BTN_RIGHT (273) pressed, seat count: 1
 event5   POINTER_BUTTON    +4.66s      BTN_RIGHT (273) released, seat count: 0
 event5   POINTER_MOTION    +6.72s        0.31/ -0.31 ( +1.00/ -1.00)
 event5   POINTER_MOTION    +6.72s        1.77/ -1.77 ( +2.00/ -2.00)
 event5   POINTER_MOTION    +6.73s        4.19/ -1.05 ( +4.00/ -1.00)

GPM configuration file:

# /etc/init.d/gpm

# Please uncomment the type of mouse you have and the appropriate MOUSEDEV entry

MOUSE=ps2
#MOUSE=imps2
#MOUSEDEV=/dev/psaux
MOUSEDEV=/dev/input/event5

# Extra settings

#RESPONSIVENESS=
#REPEAT_TYPE=raw

# Please uncomment this line if you want gpm to understand charsets used
# in URLs and names with ~ or : in them, etc. This is a good idea to turn on!

APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\""

# Various other options, see gpm(8) manpage for more.

#APPEND="-g 1 -A60"
#APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\" -g 1 -A60"

After invoking /etc/init.d/gpm start GPM starts properly. But when any mouse event occurs GPM throws above error in log file in an infinite loop and mouse doesn't work.

DocMAX commented 3 years ago

Same issue here! Tried all protocols! *** err [daemon/getmousedata.c(47)]: Error in read()ing first: Invalid argument

yingted commented 1 week ago

Looks like the evdev packet size is set to 16, maybe it should be this instead?