Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Userspace LED events not working while using keyd (again?) #715

Open
MeemeeLab opened this issue Apr 11, 2024 · 4 comments
Open

Userspace LED events not working while using keyd (again?) #715

MeemeeLab opened this issue Apr 11, 2024 · 4 comments

Comments

@MeemeeLab
Copy link

MeemeeLab commented Apr 11, 2024

First of all, thanks for this useful project. I appreciate your work!

I have problem that seems like a duplicate of #531 which is fixed, but on my side it's not fixed.
I don't know this bug happened once again or problem on my side, but I think this is worth reporting.

I'm trying to execute:

# echo 0 | tee /sys/class/leds/input43\:\:capslock/brightness
# echo 1 | tee /sys/class/leds/input43\:\:capslock/brightness

Which should change status LED of my keyboard.

If I start keyd (I'm currently using systemd), this stops working and stopping keyd makes this work again.

brightnessctl stops working when using keyd too:

$ brightnessctl --device=input*::numlock s 0
$ brightnessctl --device=input*::numlock s 1

All of my status LEDs on my keyboard including NumLock, CapsLock and ScrollLock doesn't seem to work.

My keyboard is REALFORCE R3, which have Japanese layout.

Arch Linux rolling
Linux 6.8.4-arch1-1 x86_64 GNU/Linux

Compositor: Wayland/Sway
@cry0x11
Copy link

cry0x11 commented May 11, 2024

I have the same issue. You are not alone

@uwidev
Copy link

uwidev commented May 23, 2024

I also have this issue.

I have a Thinkpad T480, and it also has LEDs for mute and microphone, the latter of which doesn't seem to be detected by keyd -m. These LEDs work.

Likewise with you two, capslock does not work. Manually changing by either directly through sys or through brightnessctl does not work either.

I did some more testing and had an empty config, such that my device name outputed on keyd -m is my physical keyboard and not the virtual keyboard. Even in this case, capslock LED does not work.

I'm running Arch on Wayland Hyprland. I tried disabling Hyprland on startup so I could just be at tty. It also does not here as well.

@uwidev
Copy link

uwidev commented Jun 2, 2024

Capslock LED is working as of a few days ago. I patched my system sometime ago so it probably got fixed then. Try updating your system.

@warrior0x7
Copy link

warrior0x7 commented Jun 8, 2024

Capslock LED is working as of a few days ago. I patched my system sometime ago so it probably got fixed then. Try updating your system.

For some reason it's still not working. I came up with a temporary solution.

I put this to autostart with my window manager and it updates my bar to show the state of capslock.

This is EWW bar but you can use whatever you like ... just remove eww update <VARIABLE>=<VALUE> and add your own commands.

#!/usr/bin/env bash

toggle=0
keyd monitor | stdbuf -o0 grep --color=never "capslock down" | while IFS= read -r line;
do
    if [[ "$line" =~ "capslock down"$ ]]; then
        if [ $toggle -eq 0 ]; then
            eww update rev_caps=true
            toggle=1
        elif [ $toggle -eq 1 ]; then
            eww update rev_caps=false
            toggle=0
        fi
    fi
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants