public inbox for linux-leds@vger.kernel.org
 help / color / mirror / Atom feed
* Bug report for input-leds driver
@ 2022-12-11 10:12 Adam Vodopjan
  0 siblings, 0 replies; only message in thread
From: Adam Vodopjan @ 2022-12-11 10:12 UTC (permalink / raw)
  To: linux-leds

Speaking about laptop Acer 5920G and its numlock led. The keyboard lacks a
numpad, instead a block of keys acts as a numpad if I press Fn+NumLk.

The problem in short is when I set /sys/class/leds/input4::numlock/trigger
to some hardware activity like "disk-read" each time the led is ON the
keyboard behaves weird.

To make everything clear let me introduce some modes keyboards work in
related to numlock status:

- numpad_decicated_off: keyboard has a dedicated numpad and numlock is
OFF. The numpad emits arrows, page up/down etc

- numpad_dedicated_on: keyboard has a dedicated numpad and numlock is ON.
The numpad emits numbers

- numpad_overlay_off: there is no dedicated numpad, but some keys
optionally emit numbers, and numlock if OFF. "Overlay" keys emit "normal"
keypresses

- numpad_overlay_on: there is no dedicated numpad, but some keys
optionally emit numbers, and numlock if ON. "Overlay" keys emit numbers

For my laptop I expect modes numpad_overlay_off and numpad_overlay_on to
be only available.

Numlock led is available at /sys/class/leds/input4::numlock. I wanted to
repurpose it. So with the trigger value set to "phy0tpt" instead of
"kbd-numlock" it works as supposed for the led BUT it makes my keyboard
work in numpad_decicated_off mode when the led is ON. When the led is OFF
the keyboard is in mode numpad_overlay_off as it should be.

Here are the keypresses I get from the "overlay" keys.

- the trigger is set to "kbd-numlock", numlock is OFF. As expected, it is
numpad_overlay_off mode:

7 8 9 0
u i o p
j k l ;
m   . /

- the trigger is set to "kbd-numlock", numlock is ON. As expected, it is
numpad_overlay_on mode:

7 8 9 /
4 5 6 *
1 2 3 -
0   . +

Now, I have numlock OFF and set the trigger to "phy0tpt". Some ping runs
in background so the led blinks all the time.

- the led is OFF. As expected, it is numpad_overlay_off mode:

7 8 9 0
u i o p
j k l ;
m   . /

- the led is ON. Surprisingly, it is numpad_decicated_off mode instead of
numpad_overlay_off:

^[[H  ^[[A ^[[5~ /     =     Home Up   PgUp  /
^[[D  ^[[E ^[[C  *     =     Left ??   Right *
^[[F  ^[[B ^[[6~ -     =     End  Down PgDn  -
^[[2~      ^[[3~ +     =     Ins       Del   +

For example with some ping in background and the trigger set to "phy0tpt"
here is what I get clicking "p": p***pp***pp***pp**ppp***pppp**p

Mby it is worth to mention I tried such triggers: disk-activity disk-read
disk-write ide-disk phy0rx phy0tx phy0tpt. All of those demonstrate the
same behavior.

I tried different kernels starting from 4.2 (when input-leds was
introduced) up to 6.0.10. It is all the same.
From 
Message-ID: <fe3acb26-da86-6e03-d91a-27ebbfafe51e@gmail.com>
Date: Sun, 11 Dec 2022 12:11:06 +0200
MIME-Version: 1.0
From: Adam Vodopjan <adam.vodopjan@gmail.com>
Subject: Bug report

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-11 10:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-11 10:12 Bug report for input-leds driver Adam Vodopjan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox