You are not logged in.

#1 2021-07-20 09:44:59

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

[SOLVED] "less than/greater than" key stopped working on a MSI laptop

First of all, I apologize if this is not the correct section for this topic (I was not sure).

Today I discovered that on my MSI Modern 15 laptop the "less than/greater than" key is not working any more and it produces the same output of "ù". My keyboard has the Italian layout, but the "less than" key is not in the traditional position. When I first installed Arch a few months ago, the keyboard worked with no issue and since then I have constantly used that key. So, I guess the problem was caused by a recent upgrade, although I could not identify which one exactly.

I have read on the Wiki how to re-map a given keycode to a certain symbol, but in my case the problem is in the keycode itself, as the key seems to be associated with the wrong keycode.

XKB configuration:

<LSGT> = 94;
...
    key <LSGT> {
        type= "FOUR_LEVEL",
        symbols[Group1]= [            less,         greater,   guillemotleft,  guillemotright ]
    };

Output of xev when pressing the key associated with ù and "less than":

KeyPress event, serial 37, synthetic NO, window 0x3200001,
    root 0x7be, subw 0x0, time 1177944, (746,763), root:(784,870),
    state 0x0, keycode 51 (keysym 0xf9, ugrave), same_screen YES,
    XLookupString gives 2 bytes: (c3 b9) "ù"
    XmbLookupString gives 2 bytes: (c3 b9) "ù"
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x3200001,
    root 0x7be, subw 0x0, time 1178056, (746,763), root:(784,870),
    state 0x0, keycode 51 (keysym 0xf9, ugrave), same_screen YES,
    XLookupString gives 2 bytes: (c3 b9) "ù"
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x3200001,
    root 0x7be, subw 0x0, time 1180883, (746,763), root:(784,870),
    state 0x0, keycode 51 (keysym 0xf9, ugrave), same_screen YES,
    XLookupString gives 2 bytes: (c3 b9) "ù"
    XmbLookupString gives 2 bytes: (c3 b9) "ù"
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x3200001,
    root 0x7be, subw 0x0, time 1181030, (746,763), root:(784,870),
    state 0x0, keycode 51 (keysym 0xf9, ugrave), same_screen YES,
    XLookupString gives 2 bytes: (c3 b9) "ù"
    XFilterEvent returns: False

So apparently I get the keycode 51 (which is correct for ù) instead of 94.

Any ideas on how to solve or which upgrade may have caused the issue?
Thanks!

EDIT: the issue also exists using the console (no GUI) and with both the standard and LTS kernel

Last edited by childerico (2021-07-21 07:49:04)

Offline

#2 2021-07-20 10:12:08

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

EDIT: the issue also exists using the console (no GUI) and with both the standard and LTS kernel

It looks to me the those keys are gone. If your keyboard layout is as should be and you keep getting the same problem, you probably need a new keyboard.

Offline

#3 2021-07-20 10:20:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,526

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Afaiu the keys generate a signal, but the wrong™ code.
Likely by a systemd update in /usr/lib/udev/hwdb.d/ ?

=> "lsusb"?

Relevant link would be https://wiki.archlinux.org/title/Map_sc … o_keycodes

Online

#4 2021-07-20 11:46:54

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Looking at /usr/lib/udev/hwdb.d/ I see 1 file updated 3 days ago belonging to libwacom, and several other files updated 7 days ago. I tried downgrading libwacom and also systemd, but nothing changed.

Thanks @seth for the relevant link. Mapping a scancode to a keycode seems to be what I need.
Unfortunately, using showkey to identify the scancode, I get the same output for both the keys (less than and "ù"). So, nothing to remap...


Output of lsusb:

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Offline

#5 2021-07-20 11:52:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,526

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Because the key is already taken (I guess) - "showkey -s" should™ print the scancode.
Did you "systemd-hwdb update"?

The keyboard seems i2c (at least not usb), could also be the msi wmi kernel module… same problem w/ the lts kernel?

Online

#6 2021-07-20 12:02:44

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Yes I tried:
1) systemd-hwdb update
2) booting the lts kernel
and now 3) blacklisting msi_wmi

but "showkey -s" still gives the same output for both the keys.

Offline

#7 2021-07-20 12:49:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,526

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

What's the actual output?

Online

#8 2021-07-20 13:09:36

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Here is the output, pressing ù  and then "less than":

~ $ LANG=C sudo showkey  -s
kb mode was ?UNKNOWN?
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0x9c 
ù0x2b 0xab 
ù0x2b 0xab

Note: I run the command inside the X session to easily copy the output, but I verified that the same codes are detected running it in a virtual console (except that kb mode is not UNKNOWN but UNICODE)

Offline

#9 2021-07-20 13:19:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,526

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

https://en.wikipedia.org/wiki/QWERTY#Italian

That's the scancode for the key left of enter (the one that says "ù/§") - what does your keyboard look like in comparism and which key do you press (geometrically)?

Online

#10 2021-07-20 13:32:58

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

I am pressing exactly that key (although it is placed just above Enter on my laptop and not on the left).
The second key I press is "</>", which in my keyboard is located on the bottom row, on the right of Space, between "Alt Gr" and the right "Ctrl".

To be clear, this is a picture of my keyboard: https://imgur.com/a/UDztzPi

Thanks for your help!

Offline

#11 2021-07-20 13:38:21

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,526

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Ah, so both keys produce the same scancode?
In that case it could indeed be a physical issue and the signal being tainted by a key down the wire.

=> Try to boot a random live distro w/ a different software stack (eg. grml or ubuntu) and check how the keyboard behaves there.

Online

#12 2021-07-20 14:07:56

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Booting an Ubuntu 21.04 live, the keys work as expected.
I run showkey -s there and got the same scancode (0x2b 0xab) for "ù/§", whist this time I got "0x56 0xd6" for "</>".

This does not solve the problem (unless switching to Ubuntu after 7 years of Arch is an option wink ), but (I think) we can exclude physical damage.

Offline

#13 2021-07-20 14:15:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,526

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Please post the tail of your pacman log (the time where you started to notice this - though I've a hard time imaginig what besides hwdb and the kernel could cause this…)

Online

#14 2021-07-20 14:26:15

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

https://termbin.com/sz8r

I noticed the issue today. It's unlikely it had existed for long time before I noticed, as I frequently use </>. But I haven't used the laptop much since last Friday, so I saved the log starting from that day. I did not include the last part of the log that contains all the downgrades I tried *after* noticing the issue.

Offline

#15 2021-07-20 14:33:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,526

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

There's only an update for the LTS kernel, did you downgrade the lts kernel to 5.10.49 in your investigation?
The "nasty" thihg would be if the libwacom update had triggered the hwdb update and that picked up a previously unused config - have you manually edited anything there?

Online

#16 2021-07-20 15:03:55

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

I had only tried switching between linux and linux-lts. Now I also tried downgrading linux-lts to 5.10.48. I also run systemd-hwdb update after downgrading (I am not sure if it makes sense though).  But nothing changes.

I don't remember editing anything related to hwdb. Nothing related to input devices for sure.

I have never done that, but I could try to roll back all the updates of the last week using the Arch Linux Archive. Is it worth doing in your opinion? Thanks

Offline

#17 2021-07-20 15:26:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,526

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

You can try, but wrt. to the pacman updates you posted, I'd not hold my breath.
Maybe you ran an update before (thursday) but didn't reboot?

Online

#18 2021-07-20 15:33:23

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Here is an extended pacman log: https://termbin.com/7td14 I don't see relevant updates before Friday.

I'll try to roll back everything later today. Thanks

Offline

#19 2021-07-20 16:37:25

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

I have made some progress!

Using the ALA, I managed to go back to a working state on July 01 and then July 10. Moving to July 15 the issue appeared, so I could see the packages involved.
Furthermore, I observed the changes to /usr/lib/udev/hwdb.d/60-keyboard.hwdb and interestingly, comparing the file before/after the update, I found some changes in the MSI-related section.

As the file is owned by systemd, my suspects again were turned on it. However, when I first downgraded it this morning, I only downgraded that specific package (from 249.x to 248.x).  Keeping systemd-libs and systemd-sysvcompat in addition at the 248.x version, things work and I upgraded all the other packages.

What would you suggest that I do now? Should I report the issue somewhere?

Thanks for all your help, @seth! I had never investigated similar issues and completely ignored the existence of those files.

Offline

#20 2021-07-20 21:07:21

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,526

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Update the system but keep the older 60-keyboard.hwdb (in doubt protect it w/ a noextract rule)
Possibly fixed by https://github.com/systemd/systemd/comm … f93ac3d231

Online

#21 2021-07-21 07:48:37

childerico
Member
From: Italy
Registered: 2015-11-18
Posts: 67

Re: [SOLVED] "less than/greater than" key stopped working on a MSI laptop

Thanks. I'll mark this as solved!

Offline

Board footer

Powered by FluxBB