Hacker News new | ask | show | jobs
by foresto 16 days ago
My Wayland pet peeve:

It still lacks keyboard LED control, so unprivileged X11 programs that use the Scroll Lock light as an indicator cannot be ported to Wayland.

This Plasma change is going to be painful for me. I wonder if there's an up-to-date list of Wayland shortcomings.

2 comments

> unprivileged X11 programs that use the Scroll Lock light as an indicator

I didn't know such apps existed! What do they use it for?

One use case is a new message indicator. Unlike icons on the desktop, keyboard lights are visible even when a full-screen application is running, or when we're to the side of or across the room from the computer, or when the display is asleep. I depend on this for my daily communications.

Another use case is for keyboard macro utilities to indicate the state of layers, modifier modes, or multi-keystroke input sequences.

Others surely exist, since hardware lights can indicate just about anything, and are especially valuable where visibility is important. Even shell scripts can use them on X11, via the xset command.

Which programs can be configured in this way? Something custom you wrote?
assign yourself permission to the device(may or may not happen by default depending on your distribution), and you can actuate it in /sys/class/leds/inputXX::scrolllock/brightness.

probably also exists other tools to do it. this is then generic linux LED framework

I am aware of sysfs LED controls. They don't solve this problem, because access to them requires privileges (or permissions assigned by someone with privileges). It's not reasonable to expect that, just as it's not reasonable to expect a sysadmin to grant users permission to the keyboard device node before they can type anything.

Moreover, granting permissions on the sysfs nodes won't distinguish between a user who is logged in to the current virtual console and one who is not. Wayland correctly delegates keyboard ownership to compositors, but they have no way to expose the keyboard's outputs (the LEDs) because Wayland hasn't yet defined a protocol for doing so.

X11 has a protocol for this, and X servers handle it just fine. They account for different users and LED states on each virtual console, and do not require clients to have any special permissions. It's an area where Wayland fails to be a suitable replacement.