Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU/Temperature #6

Open
adrixo opened this issue Oct 12, 2022 · 3 comments
Open

CPU/Temperature #6

adrixo opened this issue Oct 12, 2022 · 3 comments

Comments

@adrixo
Copy link

adrixo commented Oct 12, 2022

My system goes out of control (mergeinputs appears at the top of htop with high cpu usage) when I disconnect and reconnect my laptol keyboard.

    PID USUARIO   PR  NI    VIRT    RES    SHR S  %CPU  %MEM     HORA+ ORDEN                                                                                                                                                                  
   2255 root      20   0   35556    944    856 S 299,3   0,0   3:25.29 mergeinputs             

Of course, this problem is temporarily solved with:

sudo systemctl restart mergeinputs
@adrixo
Copy link
Author

adrixo commented Oct 13, 2022

dmesg output after disconnect/connect the usb when the systemd service is running

[ 8553.812801] usb 1-6: USB disconnect, device number 7
[ 8553.812807] usb 1-6.2: USB disconnect, device number 8
[ 8553.812811] usb 1-6.2.3: USB disconnect, device number 10
[ 8554.231965] usb 1-6.3: USB disconnect, device number 9
[ 8556.948297] usb 1-6: new high-speed USB device number 11 using xhci_hcd
[ 8557.101411] usb 1-6: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=85.36
[ 8557.101418] usb 1-6: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 8557.101422] usb 1-6: Product: USB2.0 Hub
[ 8557.102883] hub 1-6:1.0: USB hub found
[ 8557.103131] hub 1-6:1.0: 4 ports detected
[ 8557.392300] usb 1-6.2: new high-speed USB device number 12 using xhci_hcd
[ 8557.497396] usb 1-6.2: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=85.36
[ 8557.497404] usb 1-6.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 8557.497407] usb 1-6.2: Product: USB2.0 Hub
[ 8557.498945] hub 1-6.2:1.0: USB hub found
[ 8557.499207] hub 1-6.2:1.0: 4 ports detected
[ 8557.588356] usb 1-6.3: new low-speed USB device number 13 using xhci_hcd
[ 8557.692680] usb 1-6.3: New USB device found, idVendor=0911, idProduct=2188, bcdDevice= 0.01
[ 8557.692686] usb 1-6.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 8557.702661] input: HID 0911:2188 as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.3/1-6.3:1.0/0003:0911:2188.001F/input/input105
[ 8557.764664] hid-generic 0003:0911:2188.001F: input,hidraw7: USB HID v1.01 Keyboard [HID 0911:2188] on usb-0000:00:14.0-6.3/input0
[ 8557.772312] input: HID 0911:2188 Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.3/1-6.3:1.1/0003:0911:2188.0020/input/input106
[ 8557.800289] usb 1-6.2.3: new low-speed USB device number 14 using xhci_hcd
[ 8557.832436] input: HID 0911:2188 System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.3/1-6.3:1.1/0003:0911:2188.0020/input/input107
[ 8557.832765] input: HID 0911:2188 Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.3/1-6.3:1.1/0003:0911:2188.0020/input/input108
[ 8557.832831] input: HID 0911:2188 Wireless Radio Control as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.3/1-6.3:1.1/0003:0911:2188.0020/input/input109
[ 8557.832928] hid-generic 0003:0911:2188.0020: input,hiddev3,hidraw8: USB HID v1.01 Mouse [HID 0911:2188] on usb-0000:00:14.0-6.3/input1
[ 8557.913516] usb 1-6.2.3: New USB device found, idVendor=0911, idProduct=2188, bcdDevice=10.01
[ 8557.913520] usb 1-6.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8557.913522] usb 1-6.2.3: Product: USB Keyboard
[ 8557.913523] usb 1-6.2.3: Manufacturer: Hantick
[ 8557.913525] usb 1-6.2.3: SerialNumber: HID Composite device
[ 8557.925515] input: Hantick USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2.3/1-6.2.3:1.0/0003:0911:2188.0021/input/input110
[ 8557.984619] hid-generic 0003:0911:2188.0021: input,hidraw9: USB HID v1.01 Keyboard [Hantick USB Keyboard] on usb-0000:00:14.0-6.2.3/input0
[ 8557.994212] input: Hantick USB Keyboard Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2.3/1-6.2.3:1.1/0003:0911:2188.0022/input/input111
[ 8557.994340] input: Hantick USB Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2.3/1-6.2.3:1.1/0003:0911:2188.0022/input/input112
[ 8558.056421] input: Hantick USB Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2.3/1-6.2.3:1.1/0003:0911:2188.0022/input/input113
[ 8558.056508] input: Hantick USB Keyboard Wireless Radio Control as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2.3/1-6.2.3:1.1/0003:0911:2188.0022/input/input114
[ 8558.056624] hid-generic 0003:0911:2188.0022: input,hiddev4,hidraw10: USB HID v1.01 Mouse [Hantick USB Keyboard] on usb-0000:00:14.0-6.2.3/input1

@Ckath
Copy link
Owner

Ckath commented Oct 15, 2022

all this does is just take devices and redirect the output, there is no disconnect/reconnect handling at all. you can only hope it crashes instead of getting stuck on reading it, which is what probably happened in your case.
there are a couple solutions here

  • make something that calls a restart on mergeinputs whenever you plug in a keyboard, probably doable through udev rules
  • wait for me to get around to implementing this case properly, which is going to take a while if ever
  • inbetween solution where I at least try to make mergeinputs quit when something disconnects, could probably figure something out for this short term

@chrisduerr
Copy link

wait for me to get around to implementing this case properly, which is going to take a while if ever

Please don't fix this, it would break my workflow. Since my control key is hard to reach, I just unplug and replug my keyboard instead and configured emacs to interpret a rapid CPU temperature rise as control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants