You are not logged in.

#1 2014-04-08 19:28:19

dbbolton
Member
Registered: 2008-10-08
Posts: 41

Cannot edit /sys/class/backlight/ files

I'm having trouble changing my backlight. First I got a permission error as root, so I made the file writable, then I got an "input/output error".

% whoami                                                                                     
root

% file /sys/class/backlight/dell_backlight/max_brightness                                    
/sys/class/backlight/dell_backlight/max_brightness: ASCII text

% cat $_                                                                                     
15

%  echo 10 > /sys/class/backlight/dell_backlight/max_brightness                    
zsh: permission denied: /sys/class/backlight/dell_backlight/max_brightness

% ls -l /sys/class/backlight/dell_backlight/max_brightness                        
-r--r--r-- 1 root root 4096 Apr  7 16:17 /sys/class/backlight/dell_backlight/max_brightness

% chmod ug+w /sys/class/backlight/dell_backlight/max_brightness

% ls -l $_                                                                                   
-rw-rw-r-- 1 root root 4096 Apr  8 15:19 /sys/class/backlight/dell_backlight/max_brightness

% echo 10 > /sys/class/backlight/dell_backlight/max_brightness                               
echo: write error: Input/output error

Offline

#2 2014-04-08 19:59:41

toz
Member
Registered: 2011-10-28
Posts: 513

Re: Cannot edit /sys/class/backlight/ files

It's not max_brightness that you write to, that is a preset value (representing the maximum brightness value the interface can accept). You need to write to the brightness file:

$ ls -l /sys/class/backlight/intel_backlight/brightness 
-rw-r--r-- 1 root root 4096 Apr  8 08:33 /sys/class/backlight/intel_backlight/brightness

...the value needs to be between 0 and the contents of max_brightness (in this case 15).

Try:

echo 10 > /sys/class/backlight/dell_backlight/brightness

Online

#3 2014-04-09 05:21:06

dbbolton
Member
Registered: 2008-10-08
Posts: 41

Re: Cannot edit /sys/class/backlight/ files

It didn't seem to change anything, and I think a -33% change should be rather noticeable. There was also an intel_backlight dir, but changing its brightness file didn't adjust the backlight either.

Offline

#4 2014-04-09 08:01:00

fasolt
Member
From: Australia
Registered: 2013-04-07
Posts: 6

Re: Cannot edit /sys/class/backlight/ files

Have you used xbacklight?

$ xbacklight =10

Edit: that is, making the assumption you're using Xorg. Apologies if you're not.

Last edited by fasolt (2014-04-09 08:01:54)

Offline

#5 2014-04-09 10:26:21

toz
Member
Registered: 2011-10-28
Posts: 513

Re: Cannot edit /sys/class/backlight/ files

dbbolton wrote:

It didn't seem to change anything, and I think a -33% change should be rather noticeable. There was also an intel_backlight dir, but changing its brightness file didn't adjust the backlight either.

Maybe tell us a little more about your computer.

1. The make/model (looks like some sort of dell)

2. Your kernel command line:

cat /proc/cmdline

3. The video card(s) and drivers:

lspci -k | grep -A2 VGA

4. Your backlight interfaces and their values:

for i in /sys/class/backlight/*; do echo $i; cat $i/{brightness,max_brightness,actual_brightness}; done

Online

Board footer

Powered by FluxBB