You are not logged in.

#1 2023-07-12 10:44:44

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

[Solved]-[thinkpad l14 gen4] function key problem

Hi,

This is about Gen4 Thinkpad L14, with ryzen 5 pro. I am running fully updated arch setup with cwm window manager. Once I press Fn key, all keybindings configured in cwm stops working. Fn key in this laptop is keycode 151, keysm XF86WakeUp. However if I change tty and start another instance of cwm keybindings work (till I use Fn).

If I use Fn+some other key, which is recognized by cwm, e.g, Fn+F1 to mute volume, keybindings  keeps working but pressing only Fn or Fn+(other not yet working combinations) leads to all keybindings not working.

I tried using xbindkeys as an alternate way for keybindings but it also stops working after one press of Fn.

Last edited by Docbroke (2023-07-13 16:23:59)

Offline

#2 2023-07-12 15:26:49

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

Does it help to xmodmap 151 to eg "Multi_key" ?

Offline

#3 2023-07-12 15:55:00

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

I tried to put this in .Xmodmap, after reading thinkwiki article. https://www.thinkwiki.org/wiki/How_to_g … figuration

keycode 151 = F35

It didn't help.

Last edited by Docbroke (2023-07-12 15:55:39)

Offline

#4 2023-07-12 16:07:25

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

Does the ~/.Xmodmap get applied?

xmodmap -pk | grep 151

Offline

#5 2023-07-12 16:32:43

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

It was applied but Fn still kills keybindings.

[ins]$ xmodmap -pk | grep 151
    151    	0x1008ff2b (XF86WakeUp)	0x0000 (NoSymbol)	0x1008ff2b (XF86WakeUp)	
[ins]$ xmodmap .Xmodmap 
[ins]$ xmodmap -pk | grep 151
    151    	0xffe0 (F35)	0x0000 (NoSymbol)	0xffe0 (F35)

Offline

#6 2023-07-12 19:54:46

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

It's probably intercepted on a lower level.
Is there any activity in the xorg log when you hit the key?
What's the response in "xev -root"? (don't do anything else, run it, press the key, kill it - otherwise there'll be a lot of events)

(we'll need to figure why "all keybindings configured in cwm stops working" and I could imagine it's because of some xkb event - but I've never used CWM)

Offline

#7 2023-07-13 03:25:02

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

I found this relevant log entry from old Xorg logs, where I change tty after loss of keybindings, which resumed keybindings.


[ 16082.108] (II) event3  - Power Button: is tagged by udev as: Keyboard
[ 16082.108] (II) event3  - Power Button: device is a keyboard
[ 16082.108] (II) event4  - Video Bus: is tagged by udev as: Keyboard
[ 16082.108] (II) event4  - Video Bus: device is a keyboard
[ 16082.109] (II) event0  - Power Button: is tagged by udev as: Keyboard
[ 16082.109] (II) event0  - Power Button: device is a keyboard
[ 16082.109] (II) event2  - Sleep Button: is tagged by udev as: Keyboard
[ 16082.109] (II) event2  - Sleep Button: device is a keyboard
[ 16082.110] (II) event8  - GXTP5140:00 27C6:01E0 Mouse: is tagged by udev as: Mouse Pointingstick
[ 16082.110] (II) event8  - GXTP5140:00 27C6:01E0 Mouse: device is a pointer
[ 16082.111] (II) event9  - GXTP5140:00 27C6:01E0 Touchpad: is tagged by udev as: Touchpad
[ 16082.112] (II) event9  - GXTP5140:00 27C6:01E0 Touchpad: device is a touchpad
[ 16082.112] (II) event5  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
[ 16082.112] (II) event5  - AT Translated Set 2 keyboard: device is a keyboard
[ 16082.113] (II) event15 - TPPS/2 Elan TrackPoint: is tagged by udev as: Mouse Pointingstick
[ 16082.113] (II) event15 - TPPS/2 Elan TrackPoint: device is a pointer
[ 16082.114] (II) event6  - ThinkPad Extra Buttons: is tagged by udev as: Keyboard Switch
[ 16082.114] (II) event6  - ThinkPad Extra Buttons: device is a keyboard
[ 16111.599] (**) Option "fd" "37"
[ 16111.599] (II) event3  - Power Button: device removed
[ 16111.600] (**) Option "fd" "33"
[ 16111.600] (II) event4  - Video Bus: device removed
[ 16111.600] (**) Option "fd" "34"
[ 16111.600] (II) event0  - Power Button: device removed
[ 16111.600] (**) Option "fd" "36"
[ 16111.600] (II) event2  - Sleep Button: device removed
[ 16111.600] (**) Option "fd" "30"
[ 16111.600] (II) event8  - GXTP5140:00 27C6:01E0 Mouse: device removed
[ 16111.600] (**) Option "fd" "32"
[ 16111.600] (II) event9  - GXTP5140:00 27C6:01E0 Touchpad: device removed
[ 16111.600] (**) Option "fd" "35"
[ 16111.600] (II) event5  - AT Translated Set 2 keyboard: device removed
[ 16111.600] (**) Option "fd" "41"
[ 16111.600] (II) event15 - TPPS/2 Elan TrackPoint: device removed
[ 16111.600] (**) Option "fd" "31"
[ 16111.600] (II) event6  - ThinkPad Extra Buttons: device removed
[ 16111.600] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 16111.624] (II) systemd-logind: got pause for 13:72
[ 16111.624] (II) systemd-logind: got pause for 13:70
[ 16111.624] (II) systemd-logind: got pause for 13:73
[ 16111.624] (II) systemd-logind: got pause for 13:68
[ 16111.624] (II) systemd-logind: got pause for 13:64
[ 16111.624] (II) systemd-logind: got pause for 13:69
[ 16111.624] (II) systemd-logind: got pause for 13:66
[ 16111.624] (II) systemd-logind: got pause for 13:67
[ 16111.624] (II) systemd-logind: got pause for 13:79
[ 16154.778] (II) systemd-logind: got resume for 13:72
[ 16154.798] (II) systemd-logind: got resume for 13:70
[ 16154.838] (II) systemd-logind: got resume for 13:73
[ 16154.878] (II) systemd-logind: got resume for 13:68
[ 16154.905] (II) systemd-logind: got resume for 13:64
[ 16154.935] (II) systemd-logind: got resume for 13:69
[ 16154.965] (II) systemd-logind: got resume for 13:66
[ 16154.992] (II) systemd-logind: got resume for 13:67
[ 16155.011] (II) systemd-logind: got resume for 13:79
[ 16155.011] (II) systemd-logind: got resume for 226:0
[ 16155.011] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 16155.583] (II) AMDGPU(0): EDID vendor "CMN", prod id 5126
[ 16155.583] (II) AMDGPU(0): Printing DDC gathered Modelines:
[ 16155.583] (II) AMDGPU(0): Modeline "1920x1080"x0.0  138.78  1920 1968 2000 2080  1080 1083 1088 1112 -hsync -vsync (66.7 kHz eP)
[ 16155.601] (II) event3  - Power Button: is tagged by udev as: Keyboard
[ 16155.601] (II) event3  - Power Button: device is a keyboard
[ 16155.601] (II) event4  - Video Bus: is tagged by udev as: Keyboard
[ 16155.601] (II) event4  - Video Bus: device is a keyboard
[ 16155.602] (II) event0  - Power Button: is tagged by udev as: Keyboard
[ 16155.602] (II) event0  - Power Button: device is a keyboard
[ 16155.602] (II) event2  - Sleep Button: is tagged by udev as: Keyboard
[ 16155.602] (II) event2  - Sleep Button: device is a keyboard
[ 16155.603] (II) event8  - GXTP5140:00 27C6:01E0 Mouse: is tagged by udev as: Mouse Pointingstick
[ 16155.603] (II) event8  - GXTP5140:00 27C6:01E0 Mouse: device is a pointer
[ 16155.604] (II) event9  - GXTP5140:00 27C6:01E0 Touchpad: is tagged by udev as: Touchpad
[ 16155.605] (II) event9  - GXTP5140:00 27C6:01E0 Touchpad: device is a touchpad
[ 16155.605] (II) event5  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
[ 16155.605] (II) event5  - AT Translated Set 2 keyboard: device is a keyboard
[ 16155.606] (II) event15 - TPPS/2 Elan TrackPoint: is tagged by udev as: Mouse Pointingstick
[ 16155.606] (II) event15 - TPPS/2 Elan TrackPoint: device is a pointer
[ 16155.607] (II) event6  - ThinkPad Extra Buttons: is tagged by udev as: Keyboard Switch
[ 16155.607] (II) event6  - ThinkPad Extra Buttons: device is a keyboard
[ 16203.960] (**) Option "fd" "40"
[ 16203.960] (II) event3  - Power Button: device removed
[ 16203.960] (**) Option "fd" "34"
[ 16203.960] (II) event4  - Video Bus: device removed
[ 16203.960] (**) Option "fd" "35"
[ 16203.960] (II) event0  - Power Button: device removed
[ 16203.960] (**) Option "fd" "37"
[ 16203.960] (II) event2  - Sleep Button: device removed
[ 16203.960] (**) Option "fd" "31"
[ 16203.960] (II) event8  - GXTP5140:00 27C6:01E0 Mouse: device removed
[ 16203.960] (**) Option "fd" "33"
[ 16203.960] (II) event9  - GXTP5140:00 27C6:01E0 Touchpad: device removed
[ 16203.961] (**) Option "fd" "36"
[ 16203.961] (II) event5  - AT Translated Set 2 keyboard: device removed
[ 16203.961] (**) Option "fd" "41"
[ 16203.961] (II) event15 - TPPS/2 Elan TrackPoint: device removed
[ 16203.961] (**) Option "fd" "32"
[ 16203.961] (II) event6  - ThinkPad Extra Buttons: device removed
[ 16203.961] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 16203.983] (II) systemd-logind: got pause for 13:72
[ 16203.983] (II) systemd-logind: got pause for 13:70
[ 16203.983] (II) systemd-logind: got pause for 13:73
[ 16203.983] (II) systemd-logind: got pause for 13:68
[ 16203.983] (II) systemd-logind: got pause for 13:64
[ 16203.983] (II) systemd-logind: got pause for 13:69
[ 16203.983] (II) systemd-logind: got pause for 13:66
[ 16203.983] (II) systemd-logind: got pause for 13:67
[ 16203.983] (II) systemd-logind: got pause for 13:79
[ 16212.768] (II) systemd-logind: got resume for 13:72
[ 16212.788] (II) systemd-logind: got resume for 13:70
[ 16212.818] (II) systemd-logind: got resume for 13:73
[ 16212.852] (II) systemd-logind: got resume for 13:68
[ 16212.875] (II) systemd-logind: got resume for 13:64
[ 16212.905] (II) systemd-logind: got resume for 13:69
[ 16212.932] (II) systemd-logind: got resume for 13:66
[ 16212.955] (II) systemd-logind: got resume for 13:67
[ 16212.972] (II) systemd-logind: got resume for 13:79
[ 16212.972] (II) systemd-logind: got resume for 226:0
[ 16212.972] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 16213.561] (II) AMDGPU(0): EDID vendor "CMN", prod id 5126
[ 16213.561] (II) AMDGPU(0): Printing DDC gathered Modelines:
[ 16213.561] (II) AMDGPU(0): Modeline "1920x1080"x0.0  138.78  1920 1968 2000 2080  1080 1083 1088 1112 -hsync -vsync (66.7 kHz eP)
[ 16213.578] (II) event3  - Power Button: is tagged by udev as: Keyboard
[ 16213.578] (II) event3  - Power Button: device is a keyboard
[ 16213.579] (II) event4  - Video Bus: is tagged by udev as: Keyboard
[ 16213.579] (II) event4  - Video Bus: device is a keyboard
[ 16213.579] (II) event0  - Power Button: is tagged by udev as: Keyboard
[ 16213.579] (II) event0  - Power Button: device is a keyboard
[ 16213.580] (II) event2  - Sleep Button: is tagged by udev as: Keyboard
[ 16213.580] (II) event2  - Sleep Button: device is a keyboard
[ 16213.580] (II) event8  - GXTP5140:00 27C6:01E0 Mouse: is tagged by udev as: Mouse Pointingstick
[ 16213.580] (II) event8  - GXTP5140:00 27C6:01E0 Mouse: device is a pointer
[ 16213.581] (II) event9  - GXTP5140:00 27C6:01E0 Touchpad: is tagged by udev as: Touchpad
[ 16213.582] (II) event9  - GXTP5140:00 27C6:01E0 Touchpad: device is a touchpad
[ 16213.583] (II) event5  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
[ 16213.583] (II) event5  - AT Translated Set 2 keyboard: device is a keyboard
[ 16213.584] (II) event15 - TPPS/2 Elan TrackPoint: is tagged by udev as: Mouse Pointingstick
[ 16213.584] (II) event15 - TPPS/2 Elan TrackPoint: device is a pointer
[ 16213.584] (II) event6  - ThinkPad Extra Buttons: is tagged by udev as: Keyboard Switch
[ 16213.585] (II) event6  - ThinkPad Extra Buttons: device is a keyboard
[ 16332.915] (**) Option "fd" "40"
[ 16332.916] (II) event3  - Power Button: device removed
[ 16332.916] (**) Option "fd" "34"
[ 16332.916] (II) event4  - Video Bus: device removed
[ 16332.916] (**) Option "fd" "35"
[ 16332.916] (II) event0  - Power Button: device removed
[ 16332.916] (**) Option "fd" "37"
[ 16332.916] (II) event2  - Sleep Button: device removed
[ 16332.916] (**) Option "fd" "31"
[ 16332.916] (II) event8  - GXTP5140:00 27C6:01E0 Mouse: device removed
[ 16332.916] (**) Option "fd" "33"
[ 16332.916] (II) event9  - GXTP5140:00 27C6:01E0 Touchpad: device removed
[ 16332.916] (**) Option "fd" "36"
[ 16332.916] (II) event5  - AT Translated Set 2 keyboard: device removed
[ 16332.916] (**) Option "fd" "43"
[ 16332.916] (II) event15 - TPPS/2 Elan TrackPoint: device removed
[ 16332.916] (**) Option "fd" "32"
[ 16332.916] (II) event6  - ThinkPad Extra Buttons: device removed
[ 16332.917] (II) UnloadModule: "libinput"


EDIT:

I tried mapping 151 to 'a' with "keycode 151 = a" in .Xmodmap, now pressing Fn prints character a, but still keybindings stops working after that.

I also tried wayland compositor 'river', there is no such issue with Fn in wayland.

EDIT 2: current complete log at https://transfer.sh/ku9SyblOQt/Xorg.0.log

Last edited by Docbroke (2023-07-13 06:22:40)

Offline

#8 2023-07-13 05:20:06

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

Please use [code][/code] tags, not "quote" tags. Edit your post in this regard.

This covers 250s and there're two VT switches

[ 16111.600] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 16155.011] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 16203.961] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 16212.972] (II) AIGLX: Resuming AIGLX clients after VT switch

and something™ input related ahead of the first VT switch, but that could really just be the start of the server (and it's end at the tail), please don't post partial logs.

I change tty after loss of keybindings, which resumed keybindings.

So it's not necessary to restart cwm?

run "xev -event keyboard", press Fn and then some desired shortcut.
You might just end up w/ a stuck modifier.

Offline

#9 2023-07-13 06:30:09

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

1. tags corrected
2. I changed VT after keybindings stopped working. Keybindings stops only in current tty, where Fn key is used.
3. Once keybindings stopped working, I am unable to kill cwm. killall/kill etc. doesn't work even with su. So changing tty and starting another instance of cwm is the only option.
4. I have posted link of complete log in the previous post.

Another update: touchpad stopped working, while using cwm, I think it is also there in complete log. This is probably hardware failure as touchpad has stopped working in bios too. Probable unrelated to the current issue.

Offline

#10 2023-07-13 06:37:25

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

I am unable to kill cwm. killall/kill etc. doesn't work even with su.

Is the process sigstop'd?

Offline

#11 2023-07-13 07:00:39

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

I had tried SIGILL which was not working, but after you asked I tried SIGKILL, which seems to work.

Offline

#12 2023-07-13 07:02:05

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

SIGKILL always works, but the question is whether the cwm process gets stopped when you press that key (and SIGCONT would continue it)

Offline

#13 2023-07-13 07:08:25

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

How to test that?
After SIGKILL I can start cwm in the same tty and keybindings works.

EDIT: if I try SIGCONT it says no such process, as there is no such pid, cwm is already killed.

Last edited by Docbroke (2023-07-13 07:10:49)

Offline

#14 2023-07-13 07:38:59

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

Stopped processes have an uppercase "T" in ps.
If there's no cwm process, it just crashed? How did you SIGILL or SIGKILL it before??

Offline

#15 2023-07-13 07:45:40

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

I used "kill -SIGKILL $(pgrep cwm)" to kill cwm.

Offline

#16 2023-07-13 08:40:37

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

EDIT: if I try SIGCONT it says no such process, as there is no such pid, cwm is already killed.

You're not seriously trying to SIGCONT the same process AFTER you SIGKILL'd it, are you?
Of course that … seriously.

Start cwm, break it w/ the Fn key, check whether the cwm process
1. is still there
2. is stopped and in the case of the latter, simply SIGCONT it.

Offline

#17 2023-07-13 08:53:56

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

We are having some misunderstanding here.
cwm is a window manager, it doesn't crash after Fn key, only keybindings (which are defined in cwmrc) stops working. AFAIK cwm is a single binary, so I don't know which process (if any) is killed after Fn key, usage.

Even if I try something else for keybindings ( like xbindkeys) it also stops working after Fn key usage.


EDIT: I tried SIGCONT from running cwm, after Fn key, and keybinding started working. I pressed Fn key again, and keybinding is still working. Possibly we have found workaround here. I can start running "kill -SIGCONT $(pgrep cwm)" at cwm startup. Let's see. I will update again after testing this.

Last edited by Docbroke (2023-07-13 08:59:10)

Offline

#18 2023-07-13 09:14:32

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

I can start running "kill -SIGCONT $(pgrep cwm)" at cwm startup.

That's not gonna work - the Fn key ends up stopping the WM, possibly other processes of the session.
How do you start the latter?

Ftr: /we/ did not have a misunderstanding here, doc. Only one of us and that wasn't "we" tongue

Offline

#19 2023-07-13 09:20:57

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

I agree on one of us smile

Indeed, I need to use Fn key once before using SIGCONT, after that Fn key works fine, no more problems. Even Fn+ combos that were not working before started working. Looks like after every login I will have to press Fn key manually followed by SIGCONT

Offline

#20 2023-07-13 09:26:06

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

No, you've to separate your session from the parent that likely stops it.
How do you start the session?

Offline

#21 2023-07-13 09:34:47

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

I use startx

here is my .xinitrc

exec dbus-launch --exit-with-session /usr/bin/cwm -c /home/me/.config/cwm/cwmrc

Offline

#22 2023-07-13 09:46:01

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

Unless there's a very particular strong and good reason for this, skip dbus-launch and see the last link below on what to add instead.

If the behavior remains, try xinit instead of startx.

Offline

#23 2023-07-13 10:19:17

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

after removing dbus-launch, Fn key problem appears solved.
If I remember correctly I was having trouble running some programs without dbus. I don't remember exactly, it was something with firefox or pulseaudio/pipewire.
Anyway it seems everything is fine after removing dbus-launch. Can you please explain what was the issue here?

Offline

#24 2023-07-13 10:42:39

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

Re: [Solved]-[thinkpad l14 gen4] function key problem

Broken session control, the link isn't in my signature for no reason.
Did you include the snippets that import the session environment?
(This was most likely the original problem - and dbus-launch the wrong solution)

Offline

#25 2023-07-13 11:04:13

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,456

Re: [Solved]-[thinkpad l14 gen4] function key problem

seth wrote:

Did you include the snippets that import the session environment?

I have copied some config files from backup, but I don't think I have copied any session env.
Where should I look for that?

Offline

Board footer

Powered by FluxBB