You are not logged in.
Hi all,
I am trying to control the brightness level in my Len X1. I have a fresh arch + i3 installation. Obviously Fn+F5 or F6 is not working, so here is what I did to partially solve the problem.
In i3/config add:
bindcode $mod+71 exec ~/.config/i3/brightness_control.sh down
bindcode $mod+72 exec ~/.config/i3/brightness_control.sh up
where 71 & 72 are the key codes for F5 and F6 as found by xev (xorg-xenv).
The scrips I calls basically change the value of brightness inside: /sys/class/backlight/intel_backlight/brightness
Now, here is the part I am having a problem. I have changed the group permissions of the file brightness so that any member of the group wheel can overwrite it. However, any time the computer restarts the permissions are brought back to root/root and me, as an user, cannot change the brightness level unless I first chown root:wheel /sys/class/backlight/intel_backlight/brightness.
This is clearly a non-ideal solution as it forces me to sudo everytime I restart. Is there any way to change those permissions permanently ? Otherwise, is there a different solution for my problem ?
Thanks !
Last edited by fistrosan (2020-04-05 14:01:32)
Offline
Look at this:
; Enable changing the backlight with the scroll wheel (unreleased)
; NOTE: This may require additional configuration on some systems. Polybar will
; write to `/sys/class/backlight/${self.card}/brightness` which requires polybar
; to have write access to that file.
; DO NOT RUN POLYBAR AS ROOT.
; The recommended way is to add the user to the
; `video` group and give that group write-privileges for the `brightness` file.
; See the ArchWiki for more information:
; https://wiki.archlinux.org/index.php/Backlight#ACPI
I got it from Polybar wiki.
Offline
Yeah, that is pretty much what I did but changing to the the wheel group. Unfortunately permissions for the brightness file are changed back to root - root after reboot, so it is not a permanent change. Do you happen to know how to make it permanent ?
Look at this:
; Enable changing the backlight with the scroll wheel (unreleased)
; NOTE: This may require additional configuration on some systems. Polybar will
; write to `/sys/class/backlight/${self.card}/brightness` which requires polybar
; to have write access to that file.
; DO NOT RUN POLYBAR AS ROOT.
; The recommended way is to add the user to the
; `video` group and give that group write-privileges for the `brightness` file.
; See the ArchWiki for more information:
; https://wiki.archlinux.org/index.php/Backlight#ACPII got it from Polybar wiki.
Offline
You should read the link in the quoted section as it explains how to do this via udev
Offline
Indeed, my apologies to Lupo. I should have read his/her post more carefully. Problem solved ![]()
You should read the link in the quoted section as it explains how to do this via udev
Offline