1 |
On Fri, Jan 09, 2009 at 05:28:40PM +0100, Andrea Momesso wrote: |
2 |
> On Wed, Jan 7, 2009 at 9:47 PM, Paul Hartman |
3 |
> <paul.hartman+gentoo@×××××.com> wrote: |
4 |
> > On Wed, Jan 7, 2009 at 8:29 AM, Momesso Andrea <momesso.andrea@×××××.com> wrote: |
5 |
> >> I'd like to make the file /sys/class/backlight/asus-laptop/brightness |
6 |
> >> writeable for users, so that I don't need to be root anymore to change |
7 |
> >> the brightness. |
8 |
> >> |
9 |
> >> Of course I can chown or chmod ot in local.start but I'm asking if there |
10 |
> >> is a cleaner way. |
11 |
> > |
12 |
> > I guess you need to use udevinfo to get the important information |
13 |
> > about /sys/class/backlight/asus-laptop/brightness and then write up a |
14 |
> > rule, slap it into a file in /etc/udev/rules.d/ and enjoy your new |
15 |
> > permissions. :) I don't have that device on my system so I can't |
16 |
> > really suggest anything more specific. |
17 |
> > |
18 |
> > Here's a udev rules HOWTO that might help: |
19 |
> > |
20 |
> > http://www.reactivated.net/writing_udev_rules.html |
21 |
> > |
22 |
> > (specifically "Controlling permissions and ownership") |
23 |
> > |
24 |
> > Good luck :) |
25 |
> > Paul |
26 |
> > |
27 |
> > |
28 |
> |
29 |
> It looks like I cannot simply write a rule to change that permission... |
30 |
> After experiencing some failures I guess that udev rules can change |
31 |
> permissions on /dev/ files, but not on /sys/ files... |
32 |
> |
33 |
> This is my case: |
34 |
> |
35 |
> # udevadm info -a -p /sys/class/backlight/asus-laptop/ |
36 |
> |
37 |
> looking at device '/class/backlight/asus-laptop': |
38 |
> KERNEL=="asus-laptop" |
39 |
> SUBSYSTEM=="backlight" |
40 |
> DRIVER=="" |
41 |
> ATTR{bl_power}=="0" |
42 |
> ATTR{brightness}=="5" |
43 |
> ATTR{actual_brightness}=="5" |
44 |
> ATTR{max_brightness}=="15" |
45 |
> |
46 |
> And this is the rule I added in /etc/udev/rules.d/10-local.rules |
47 |
> |
48 |
> KERNEL=="asus-laptop", SUBSYSTEM=="backlight", GROUP="video", MODE="0660" |
49 |
> |
50 |
> After a reboot I still get this: |
51 |
> |
52 |
> # ls -la /sys/class/backlight/asus-laptop |
53 |
> total 0 |
54 |
> drwxr-xr-x 3 root root 0 2009-01-09 15:18 . |
55 |
> drwxr-xr-x 3 root root 0 2009-01-09 15:18 .. |
56 |
> -r--r--r-- 1 root root 4096 2009-01-09 15:18 actual_brightness |
57 |
> -rw-r--r-- 1 root root 4096 2009-01-09 15:19 bl_power |
58 |
> -rw-r--r-- 1 root root 4096 2009-01-09 17:02 brightness |
59 |
> -r--r--r-- 1 root root 4096 2009-01-09 15:18 max_brightness |
60 |
> drwxr-xr-x 2 root root 0 2009-01-09 15:19 power |
61 |
> lrwxrwxrwx 1 root root 0 2009-01-09 15:18 subsystem -> ../../backlight |
62 |
> -rw-r--r-- 1 root root 4096 2009-01-09 15:18 uevent |
63 |
> |
64 |
> Googling a bit I found some solutions [1] [2], but all of them are |
65 |
> changing the permissions at every |
66 |
> boot. It works, but it looks to me a bit unclean... |
67 |
> [1] http://wiki.laptop.org/go/Xfce_keybindings#Adjust_screen_brightness_buttons |
68 |
> [2] http://www.thinkwiki.org/wiki/Automatically_reduce_brightness |
69 |
> |
70 |
|
71 |
Hmmm... Having not recived any answers might mean that my suspects are |
72 |
right and there is no way to create an udev rule for my scope. |
73 |
|
74 |
I think I will have to change those permissions manually at boot time |
75 |
|
76 |
Thanks anyway for help |
77 |
|
78 |
-- |
79 |
Momesso (TopperH) Andrea |
80 |
http://topperh.blogspot.com |
81 |
Jabber: topper_harley@××××××.org |
82 |
ICQ: 224179391 |