[Solved] i3wm. Mouse not detected if not plugged in before boot (TL;DR hidapi pckg is the reason)

Hello. First of all sorry for my english.
I got minor issue with vanilla i3 manjaro. The mouse not detected if it have been replugged or plugged after the system(d?) have boot.
I tried few mouses i have, neither worked. Probably the problem in some configs of wm, kernel or mouse driver idk. If i remember correctly i didn’t plug in mouse during install of the system, so it might have been cause not installing propper driver, but i doubt that this can’t be resolved after install.
Of course this is i3 and the need in mouse is less than in floating wm, but i curious anyway. Or it might be trouble in systemd and some daemon that not working for autodetecting the mouse. I’ve tried Void on the same machine and there was no problem with the mouse what so ever.

Are the usb modules loaded, I am guessing yes but if you can run command and post the output like below.

[lee@Z77M ~]$ lsmod | grep usb
usb_storage            65536  1 uas
usbhid                 45056  1
hid                   114688  4 hid_generic,usbhid,hid_logitech_dj,hid_logitech_hidpp
scsi_mod              155648  6 sd_mod,usb_storage,libata,uas,sr_mod,sg
usbcore               208896  8 usbhid,usb_storage,ehci_hcd,xhci_pci,uas,xhci_hcd,ehci_pci
usb_common             16384  1 usbcore

lsmod | grep usb
btusb 40960 0
btrtl 16384 1 btusb
btbcm 16384 1 btusb
btintel 16384 1 btusb
bluetooth 479232 5 btrtl,btintel,btbcm,btusb
usbhid 45056 0
hid 114688 2 hid_generic,usbhid
usbcore 208896 6 uvcvideo,usbhid,ehci_hcd,uhci_hcd,btusb,ehci_pci
usb_common 16384 1 usbcore

OK, now plug your mouse in and run the command again and compare to the results you posted here. Are they the same, post what is different. Please use the code tags if possible.

there is no difference in output either with the working mouse from boot, either with the replugging. I mean output of the command is the same.

Is it a laptop? Here on my desktop the usb mouse use usbhid module and yours is unused??? Sorry no expert, just community helper.

1 Like

yeah, old netbook asus eee 1015 p(e?) thx for help, this is not some heartbreaking issue so its kinda learing process for anyone who interested :slight_smile:

Oh good, maybe I learn something. :sunglasses:

Can you check dmesg before and after you plug the mouse in please. We are only looking at the last few lines each time to see if your mouse gets seen by the system.
[lee@Z77M ~]$ dmesg

This netbook initializing USB devices with the bios/first screen. So it might be kinda reason for that issue. I tried to install hidapi pckg and the command give me few different outputs:

  1. mouse was in always
    lsmod | grep usb
    btusb 40960 0
    btrtl 16384 1 btusb
    btbcm 16384 1 btusb
    btintel 16384 1 btusb
    bluetooth 479232 5 btrtl,btintel,btbcm,btusb
    usbhid 45056 0
    hid 114688 2 hid_generic,usbhid
    usbcore 208896 6 uvcvideo,usbhid,ehci_hcd,uhci_hcd,btusb,ehci_pci
    usb_common 16384 1 usbcore
  2. mouse inserted after boot/not plugged in
    btusb 40960 0
    btrtl 16384 1 btusb
    btbcm 16384 1 btusb
    btintel 16384 1 btusb
    bluetooth 479232 5 btrtl,btintel,btbcm,btusb
    usbcore 208896 5 uvcvideo,ehci_hcd,uhci_hcd,btusb,ehci_pci
    usb_common 16384 1 usbcore

Lines from dmesg
1.
[ 12.285453] mousedev: PS/2 mouse device common for all mice
[ 12.348405] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/0003:046D:C019.0001/input/input11
[ 12.348956] hid-generic 0003:046D:C019.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1d.1-1/input0

dmesg | grep mouse
[ 10.576326] psmouse serio1: elantech: assuming hardware version 2 (with firmware version 0x140100)
[ 10.644141] psmouse serio1: elantech: Synaptics capabilities query result 0x68, 0x15, 0x0a.
[ 10.706435] psmouse serio1: elantech: Elan sample query result 01, 00, 00
[ 11.020115] psmouse serio1: elantech: retrying ps2 command 0xe6 (2).
[ 11.553820] psmouse serio1: elantech: retrying ps2 command 0xf8 (2).
[ 12.290103] psmouse serio1: elantech: retrying ps2 command 0xf8 (1).
[ 13.838938] mousedev: PS/2 mouse device common for all mice

offtop: find some “drm” lines in dmesg output, is this something harmful that i need to delete or there is no way to get rid of it?
[ 11.403070] [drm] Memory usable by graphics device = 512M
[ 11.403081] checking generic (d0000000 1e0000) vs hw (d0000000 10000000)
[ 11.403085] fb: switching to inteldrmfb from VESA VGA
[ 11.403188] Console: switching to colour dummy device 80x25
[ 11.403655] [drm] Replacing VGA console driver
[ 11.410574] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 11.410580] [drm] Driver supports precise vblank timestamp query.
[ 11.413919] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 11.450743] [drm] RC6 disabled, disabling runtime PM support
[ 11.450765] [drm] initialized overlay support
[ 11.451666] [drm] Initialized i915 1.6.0 20170619 for 0000:00:02.0 on minor 0

LOL looks like installing hidapi resolved this replugging problem. thats already a lot. Thank u very much!
p.s. i guess i didn’t deleted this pckg from the install so the maintainer of manjaro-i3 shoud probably add this stuff to the vanilla iso. Or at least inform noob like me that mouse depence on usbhid :smiley: anyway this is obviously users problem.

1 Like

Please mark as solved, Glad you got it working. :grin:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by