Re: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input16
On Sun, Jan 21, 2024 at 04:34:23PM -0600, David Wright wrote:
> On Sun 21 Jan 2024 at 22:41:01 (+0100), Geert Stappers wrote:
> > Pressing "Function key with symbol of computer sending signal" has no
> > effect. Which could be caused by the horrible state of keyboard.
> > When keyboard is needed, is an USB-attached keyboard needed. Usual use
> > case of the laptop is "headless server, server with SSH access".
>
> I'm not sure what you mean by horrible state.
That the laptop has a worndown (usage damaged) keyboard. [1]
> > So I'm ask if
> > export KEYCODE=42
> > echo $KEYCODE > /devices/platform/thinkpad_acpi/input/input16
> > could cause "wlan radio enable"? Or should KEYCODE be another magic number?
>
> FWIW my wifi hardware button's keycode is 246.
How was that keycode found?
> But I would have thought the files to peruse might be:
>
> $ ls -GlgR /sys/class/rfkill/rfkill0/
> /sys/class/rfkill/rfkill0/:
> total 0
> lrwxrwxrwx 1 0 Jan 21 16:13 device -> ../../phy0
> -r--r--r-- 1 4096 Jan 21 16:13 hard
> -r--r--r-- 1 4096 Jan 21 16:13 index
> -r--r--r-- 1 4096 Jan 21 16:13 name
> -r--r--r-- 1 4096 Jan 21 16:13 persistent
> drwxr-xr-x 2 0 Jan 21 16:13 power
> -rw-r--r-- 1 4096 Jan 21 16:13 soft
> -rw-r--r-- 1 4096 Jan 21 16:13 state
> lrwxrwxrwx 1 0 Jan 21 16:13 subsystem -> ../../../../../../../class/rfkill
> -r--r--r-- 1 4096 Jan 21 16:13 type
> -rw-r--r-- 1 4096 Jan 21 16:13 uevent
>
> /sys/class/rfkill/rfkill0/power:
> total 0
> -rw-r--r-- 1 4096 Jan 21 16:14 async
> -rw-r--r-- 1 4096 Jan 21 16:14 autosuspend_delay_ms
> -rw-r--r-- 1 4096 Jan 21 16:14 control
> -r--r--r-- 1 4096 Jan 21 16:14 runtime_active_kids
> -r--r--r-- 1 4096 Jan 21 16:14 runtime_active_time
> -r--r--r-- 1 4096 Jan 21 16:14 runtime_enabled
> -r--r--r-- 1 4096 Jan 21 16:14 runtime_status
> -r--r--r-- 1 4096 Jan 21 16:14 runtime_suspended_time
> -r--r--r-- 1 4096 Jan 21 16:14 runtime_usage
> $
Ah, nice.
<screenshot>
root@nero:/sys/class/rfkill/rfkill2# ls
device hard index name persistent power soft state subsystem type uevent
root@nero:/sys/class/rfkill/rfkill2# head *
==> device <==
head: error reading 'device': Is a directory
==> hard <==
1
==> index <==
2
==> name <==
phy0
==> persistent <==
0
==> power <==
head: error reading 'power': Is a directory
==> soft <==
0
==> state <==
2
==> subsystem <==
head: error reading 'subsystem': Is a directory
==> type <==
wlan
==> uevent <==
RFKILL_NAME=phy0
RFKILL_TYPE=wlan
RFKILL_STATE=2
root@nero:/sys/class/rfkill/rfkill2# echo 0 > hard
-bash: hard: Permission denied
root@nero:/sys/class/rfkill/rfkill2# echo 1 > soft
root@nero:/sys/class/rfkill/rfkill2# rfkill list 2
2: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: yes
root@nero:/sys/class/rfkill/rfkill2# echo 0 > soft
root@nero:/sys/class/rfkill/rfkill2# rfkill list 2
2: phy0: Wireless LAN
Soft blocked: no
Hard blocked: yes
root@nero:/sys/class/rfkill/rfkill2#
</screenshot>
Almost there and then reached a dead end.
Back to "send key code".
> > What also would be helpfull, is knowning if
> >
> > echo 4242 > /devics/platform/laptop_chipset/input/input17
> >
> > could change brightness (or another visible effect)
>
> Likewise:
>
> $ ls -GlgR /sys/class/backlight/intel_backlight/
<lines_deleted>
> $
>
> A recent thread on that starts at:
>
> https://lists.debian.org/debian-user/2023/10/msg00621.html
>
> with a nice algorithm in:
>
> https://lists.debian.org/debian-user/2023/10/msg00648.html
>
Yes, nice. However the /sys/class/backlight/intel_backlight/
translates to the /sys/class/rfkill/rfkill2/ which has been explored.
> Cheers,
> David.
Groeten
Geert Stappers
[1] The "horrible state" was and is also "best days are over"
--
Silence is hard to parse
Reply to: