You are not logged in.

#1 2020-04-05 08:23:24

fistrosan
Member
Registered: 2020-04-01
Posts: 172

[SOLVED] backlight in Len X1 (arch+i3) not working

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

#2 2020-04-05 09:05:10

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED] backlight in Len X1 (arch+i3) not working

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

#3 2020-04-05 11:02:48

fistrosan
Member
Registered: 2020-04-01
Posts: 172

Re: [SOLVED] backlight in Len X1 (arch+i3) not working

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 ?

Lupo Alberto wrote:

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

#4 2020-04-05 11:05:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,384

Re: [SOLVED] backlight in Len X1 (arch+i3) not working

You should read the link in the quoted section as it explains how to do this via udev

Offline

#5 2020-04-05 11:53:36

fistrosan
Member
Registered: 2020-04-01
Posts: 172

Re: [SOLVED] backlight in Len X1 (arch+i3) not working

Indeed, my apologies to Lupo. I should have read his/her post more carefully. Problem solved smile

V1del wrote:

You should read the link in the quoted section as it explains how to do this via udev

Offline

Board footer

Powered by FluxBB