[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [wayland] Spegnere il led Bloc Num da utente normale



On Sun, May 12, 2024 at 11:55:41AM +0200, Davide Prina wrote:
> stavo cercando di spegnere il led Bloc Num da script come utente normale
> e sto usando wayland.
> 
> Sono riuscito solo come root
> # echo 0 > /sys/class/leds/input4\:\:numlock/brightness

Ciao,
sul controllo dei LED in userspace non ho trovato software ma della
documentazione su uleds[¹] e un esempio di utilizzo in Python
dall'autore della patch[²].

> inoltre, da quello che ho letto, il numero dell'input (nell'esempio
> input4) potrebbe cambiare con il riavvio del sistema.

ls -l /sys/class/leds/
lrwxrwxrwx 1 root root 0 14 mag 08.54 input3::capslock -> ../../devices/pci0000:00/0000:00:12.0/usb9/9-3/9-3:1.3/0003:1B1C:1BAC.0004/input/input3/input3::capslock
lrwxrwxrwx 1 root root 0 14 mag 08.54 input3::numlock -> ../../devices/pci0000:00/0000:00:12.0/usb9/9-3/9-3:1.3/0003:1B1C:1BAC.0004/input/input3/input3::numlock
lrwxrwxrwx 1 root root 0 14 mag 08.54 input3::scrolllock -> ../../devices/pci0000:00/0000:00:12.0/usb9/9-3/9-3:1.3/0003:1B1C:1BAC.0004/input/input3/input3::scrolllock
lrwxrwxrwx 1 root root 0 14 mag 08.54 input4::capslock -> ../../devices/pci0000:00/0000:00:12.0/usb9/9-4/9-4:1.0/0003:04D9:0169.0005/input/input4/input4::capslock
lrwxrwxrwx 1 root root 0 14 mag 08.54 input4::numlock -> ../../devices/pci0000:00/0000:00:12.0/usb9/9-4/9-4:1.0/0003:04D9:0169.0005/input/input4/input4::numlock
lrwxrwxrwx 1 root root 0 14 mag 08.54 input4::scrolllock -> ../../devices/pci0000:00/0000:00:12.0/usb9/9-4/9-4:1.0/0003:04D9:0169.0005/input/input4/input4::scrolllock

Sono link, forse riferendoti alla origine puoi mantenerne il
riferimento

> Però a me servirebbe poterlo fare da utente non root.

[¹] https://www.kernel.org/doc/html/latest/leds/uleds.html
[²] https://groups.google.com/g/linux.kernel/c/swoKKdAswaM

> Ciao
> Davide
> 
> --
> La mia privacy non è affar tuo
> https://noyb.eu/it
> - You do not have my permission to use this email to train an AI -
> If you use this to train your AI than you accept to distribute under AGPL
> license >= 3.0 all the model trained, all the source you have used to
> training your model and all the source of the program that use that model

Saluti

-- 

Felipe Salvador


Reply to: