Skip to main content
Topic: Keyboard acting strange (Read 1198 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Keyboard acting strange

I've been running artix for 2 months and this has gotten on my nerves.
I'm unable to hold down backspace to delete an entire line, (it just stops at some point. Hell, i can't hold down any key!) everytime i open the whisker menu it closes by itself after some time, almost as if a keypress or a mouseclick has been registered despite me doing none of that, and it also happens with the duckduckgo search bar. I also can't pause a video on youtube for too long because it starts playing by itself. Again, like a keypress or a mouseclick has been registered.
Looking at the tty during boot, ^@ appears from time to time, but i have no idea what that means. I should also mention thatthis doesn't happen with distros like Debian, MX Linux, or Pop! OS
I'm running Artix on a 320-14ISK Lenovo Ideapad type 80xg, is this a hardware problem or a software problem? I appreciate any help, and i'm sorry if i've come across as rude.
Thanks.

Re: Keyboard acting strange

Reply #1
If it was hardware you might try doing CTRL ALT Fx to go to another tty (usually F7 to get back to the GUI), login and press some keys. ^@ sounds like something that wouldn't be mapped to a usual letter, it might be an F key or some other volume control etc.
If any print ^@ then that's a good clue it's that key gone faulty and causing the issue. What gets printed will depend on your console keymap and there are several possibilities. If you can hit that key to recreate the problem you described in the DE that's another indication.
I suppose you could also configure that key to be ignored if it wasn't needed as a software workaround rather than swap the keyboard if you wanted.
If ^@ just denotes "unrecognised key" for your console keymap several keys might print that character too.

Re: Keyboard acting strange

Reply #2
Thanks for the advice. I appreciate it.
Unfortunately, i can't login because that same ^@ character keeps filling up the password field in the tty. This doesn't happen with the GUI though, i wonder why?

Re: Keyboard acting strange

Reply #3
If you can find a way to log back in, you could try opening xev from your terminal (package is xorg-xev). Xev prints out whatever commands are being sent to the X11 session and prints the details of the event that triggered it.

The output looks something like this below (here I've just hit the 'a' key, but the principle is the same)
Code: [Select]
KeyRelease event, serial 32, synthetic NO, window 0x2000001,
   root 0x1d0, subw 0x0, time 23004651, (950,595), root:(2901,627),
   state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
   XLookupString gives 1 bytes: (61) "a"
   XFilterEvent returns: False

It should tell you what part of the keyboard is sending the ^@ character.

Re: Keyboard acting strange

Reply #4
this is what xev gave me:
Code: [Select]
Outer window is 0x3600001, inner window is 0x3600002

PropertyNotify event, serial 8, synthetic NO, window 0x3600001,
    atom 0x27 (WM_NAME), time 1282497, state PropertyNewValue

PropertyNotify event, serial 9, synthetic NO, window 0x3600001,
    atom 0x22 (WM_COMMAND), time 1282497, state PropertyNewValue

PropertyNotify event, serial 10, synthetic NO, window 0x3600001,
    atom 0x28 (WM_NORMAL_HINTS), time 1282497, state PropertyNewValue

CreateNotify event, serial 11, synthetic NO, window 0x3600001,
    parent 0x3600001, window 0x3600002, (10,10), width 50, height 50
border_width 4, override NO

PropertyNotify event, serial 14, synthetic NO, window 0x3600001,
    atom 0x160 (WM_PROTOCOLS), time 1282498, state PropertyNewValue

MapNotify event, serial 15, synthetic NO, window 0x3600001,
    event 0x3600001, window 0x3600002, override NO

PropertyNotify event, serial 21, synthetic NO, window 0x3600001,
    atom 0x16e (_NET_WM_STATE), time 1282499, state PropertyNewValue

PropertyNotify event, serial 21, synthetic NO, window 0x3600001,
    atom 0x168 (_NET_WM_DESKTOP), time 1282499, state PropertyNewValue

ConfigureNotify event, serial 21, synthetic NO, window 0x3600001,
    event 0x3600001, window 0x3600001, (0,0), width 178, height 178,
    border_width 0, above 0x1a0025e, override NO

ReparentNotify event, serial 21, synthetic NO, window 0x3600001,
    event 0x3600001, window 0x3600001, parent 0x1423e04,
    (5,29), override NO

ConfigureNotify event, serial 21, synthetic NO, window 0x3600001,
    event 0x3600001, window 0x3600001, (5,29), width 178, height 178,
    border_width 0, above 0x1423e13, override NO

ConfigureNotify event, serial 21, synthetic YES, window 0x3600001,
    event 0x3600001, window 0x3600001, (594,320), width 178, height 178,
    border_width 0, above 0x0, override NO

MapNotify event, serial 21, synthetic NO, window 0x3600001,
    event 0x3600001, window 0x3600001, override NO

VisibilityNotify event, serial 21, synthetic NO, window 0x3600001,
    state VisibilityUnobscured

Expose event, serial 21, synthetic NO, window 0x3600001,
    (0,0), width 178, height 10, count 3

Expose event, serial 21, synthetic NO, window 0x3600001,
    (0,10), width 10, height 58, count 2

Expose event, serial 21, synthetic NO, window 0x3600001,
    (68,10), width 110, height 58, count 1

Expose event, serial 21, synthetic NO, window 0x3600001,
    (0,68), width 178, height 110, count 0

PropertyNotify event, serial 21, synthetic NO, window 0x3600001,
    atom 0x194 (WM_STATE), time 1282502, state PropertyNewValue

PropertyNotify event, serial 21, synthetic NO, window 0x3600001,
    atom 0x1c9 (_NET_WM_ALLOWED_ACTIONS), time 1282502, state PropertyNewValue

PropertyNotify event, serial 21, synthetic NO, window 0x3600001,
    atom 0x16e (_NET_WM_STATE), time 1282502, state PropertyNewValue

FocusIn event, serial 21, synthetic NO, window 0x3600001,
    mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 21, synthetic NO, window 0x0,
    keys:  4294967181 0   0   0   16  0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  

PropertyNotify event, serial 21, synthetic NO, window 0x3600001,
    atom 0x165 (_NET_FRAME_EXTENTS), time 1282502, state PropertyNewValue

PropertyNotify event, serial 21, synthetic NO, window 0x3600001,
    atom 0x16e (_NET_WM_STATE), time 1282502, state PropertyNewValue

PropertyNotify event, serial 28, synthetic NO, window 0x3600001,
    atom 0x16e (_NET_WM_STATE), time 1282503, state PropertyNewValue

KeyRelease event, serial 33, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1282617, (341,135), root:(935,455),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

MappingNotify event, serial 36, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

FocusOut event, serial 36, synthetic NO, window 0x3600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 36, synthetic NO, window 0x3600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 36, synthetic NO, window 0x0,
    keys:  4294967181 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  

FocusOut event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  

FocusOut event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  

FocusOut event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  

FocusOut event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  

EnterNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295872, (177,35), root:(771,355),
    mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
    focus YES, state 0

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295872, (177,35), root:(771,355),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295880, (175,34), root:(769,354),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295888, (173,33), root:(767,353),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295896, (171,33), root:(765,353),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295904, (170,32), root:(764,352),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295912, (167,30), root:(761,350),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295920, (165,30), root:(759,350),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295928, (164,29), root:(758,349),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295936, (162,28), root:(756,348),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295944, (160,27), root:(754,347),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295952, (159,26), root:(753,346),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295960, (158,25), root:(752,345),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295976, (157,24), root:(751,344),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1295992, (156,22), root:(750,342),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296008, (156,21), root:(750,341),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296146, (161,14), root:(755,334),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296154, (163,12), root:(757,332),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296162, (166,10), root:(760,330),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296170, (168,8), root:(762,328),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296178, (169,7), root:(763,327),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296186, (171,6), root:(765,326),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296194, (171,5), root:(765,325),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296202, (172,3), root:(766,323),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296218, (173,2), root:(767,322),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296242, (173,1), root:(767,321),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296258, (173,0), root:(767,320),
    state 0x0, is_hint 0, same_screen YES

LeaveNotify event, serial 37, synthetic NO, window 0x3600001,
    root 0x19f, subw 0x0, time 1296274, (173,-2), root:(767,318),
    mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
    focus YES, state 0

FocusOut event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  4294967199 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  

FocusOut event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  

FocusOut event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x3600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  

ClientMessage event, serial 37, synthetic YES, window 0x3600001,
    message_type 0x160 (WM_PROTOCOLS), format 32, message 0x15e (WM_DELETE_WINDOW)

I noticed that
Code: [Select]
KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
keeps repeating over and over again, maybe this is the problem? Sorry, i don't understand this all that much

Re: Keyboard acting strange

Reply #5
I'm unable to hold down backspace to delete an entire line,
Try Ctrl-U. It deletes the line from cursor to start, and works in most programs in the console and even some GUI programs.

In nano: Alt-Backspace

Commands erasing the entire line:
In joe: Ctrl-Y
In vim: dd

Re: Keyboard acting strange

Reply #6
See if pressing some F key stops the character on the login prompt temporarily, it might. From the look of it xev is logging keypress events, if it's permanently stuck down then there is no press and release, although that sort of approach logging keyboard activity is a very good idea to explore further for this.
Laptop keys usually are a little squashable bubble of flexible plastic with conductive contacts on each side, if they flake off they can be always "on" and cause this sort of effect.
In the GUI the key may not be bound to any action except in some circumstances / apps and it mostly gets ignored, whereas the console prints the "unrecognised keypress" character.
eBay and AliExpress usually have replacement laptop keyboards for not too much, (be careful to get one for the EXACT same model unless you have reliable compatibility info) if you decided to try that. I had something similar recently with an F key which was fixed by another keyboard, but there's no guarantee yours is the same, so you want to try and get proof first as far as you can. :D

Re: Keyboard acting strange

Reply #7
Quote
Code: [Select]
KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
keeps repeating over and over again, maybe this is the problem? Sorry, i don't understand this all that much

Hmm that is interesting, it looks like you have a key that is sending something that your computer can understand, but doesn't appear to be bound to anything at present. Does your keyboard have any 'feature' keys that don't work out of the box? Something like a media key or a macro key or something?

If you do, my guess is that it is stuck 'on' for some reason (perhaps a mechanical issue).

Other than that, I'm out of ideas at present.

Re: Keyboard acting strange

Reply #8
Turns out enabling Slow Keys fixes the issue. I still don't know what that character is though, so i'm bringing my laptop to a nearby service center for a keyboard replacement.
I said this in the original post, but just in case anybody missed it, this problem doesn't happen on debian and ubuntu based distros like Zorin, Linux Mint, MX Linux, even vanilla Debian.

Re: Keyboard acting strange

Reply #9
I've got a replacement keyboard, and to my dismay, the issue is caused by plugging in my headphones to the headphone jack, for whatever reason. Is it missing drivers or something?

Re: Keyboard acting strange

Reply #10
It's a weird suggestion, but don't you have any USB malware?

Re: Keyboard acting strange

Reply #11
That's unfortunate. The libinput docs have some debug ideas that might help, I only discovered these in the last few days:
https://wayland.freedesktop.org/libinput/doc/1.11.3/tools.html
Code: [Select]
# libinput list-devices
lists some of the "event" things in /dev/input but not all of them for me, perhaps your headphone has an "event" and is somehow affecting libinput?

Re: Keyboard acting strange

Reply #12
If you can borrow a different keyboard to use and see it the weird behavior repeats.  It is best to do the change while the machine is off, but usually usb kbd/mice are adopted on the fly.  If it is fixed then the particular keyboard may be misidentified as a different one and misinterprets the signals.  Also see lsusb lspci to see what is what.  lsusb should tell you the brand model of at least the chip of the kbd, sometimes not the packaging brand (like it may say Logitech and be branded Dell).

If the behavior is exactly the same, then it is software related, and some function key combination is conflicting with some other definition.  What wm/DE/DM are you using? (sorry if it mentioned and I missed it).