You are not logged in.

#1 2011-02-03 04:31:33

Tripsun
Member
Registered: 2011-01-22
Posts: 27

[SOLVED] Permission problem (resets after reboot)

EDIT: Essentially my problem is that "chmod 646 /sys/devices/virtual/backlight/acpi_video0/brightness" resets after boot (all users no longer have write access).  How can I make this permanent?  Please read rest of post at your leisure to see what problem I was solving tongue


Hello,
I have found the following way to adjust brightness for my ATI Radeon card (xbacklight -set <value> doesn't work, gives me: "No outputs have backlight property").

Placed the following two files (both chmod 755) in my home folder

.BrightUp.sh

#!/bin/bash

brightness_file=/sys/devices/virtual/backlight/acpi_video0/brightness
brightness=$(< $brightness_file)

if [ $((brightness < 8)) '=' 1 ]
then
    brightness=$((brightness + 1))
    echo -n $brightness > $brightness_file
fi

.BrightDown.sh

#!/bin/bash

brightness_file=/sys/devices/virtual/backlight/acpi_video0/brightness
brightness=$(< $brightness_file)

if [ $((brightness > 0)) '=' 1 ]
then
    brightness=$((brightness - 1))
    echo -n $brightness > $brightness_file
fi

Then added this to .xbindkeysrc

# Decrease Brightness
"/home/TuxArch/.BrightDown.sh"
    m:0x0 + c:232
    XF86MonBrightnessDown
    
# Increase Brightness
"/home/TuxArch/.BrightUp.sh"
    m:0x0 + c:233
    XF86MonBrightnessUp

And finally chmod 646 /sys/devices/virtual/backlight/acpi_video0/brightness


This method works wonderfully, and I am able to change the brightness with my FN + keys.  When I reboot, however, the /sys/.../brightness resets its permissions (no longer write for all users).  Is there anyway of making the change permanent so that I don't need to reset each time reboot.

Last edited by Tripsun (2011-02-03 14:22:31)

Offline

#2 2011-02-03 07:27:12

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Permission problem (resets after reboot)

You can't make it permanent, but you can automate the chmod command at boot-time by putting it in /etc/rc.local.

Offline

#3 2011-02-03 14:22:14

Tripsun
Member
Registered: 2011-01-22
Posts: 27

Re: [SOLVED] Permission problem (resets after reboot)

Great thanks!

Offline

Board footer

Powered by FluxBB