You are not logged in.
Hello everyone,
I am dabbling with UDEV rules for the first time, so please bear with me.
I am trying to grand write access for the als on my hp-2540p. I haven't found any GUI that allow me to change its state so I tried to write a rule that'd allow me to do so:
I tried following the WIKI but I think I am missing something. Here is the udevadm for the device:
udevadm info -q all -a /sys/devices/platform/hp-wmi
looking at device '/devices/platform/hp-wmi':
KERNEL=="hp-wmi"
SUBSYSTEM=="platform"
DRIVER=="hp-wmi"
ATTR{als}=="1"
ATTR{display}=="65792"
ATTR{dock}=="0"
ATTR{driver_override}=="(null)"
ATTR{tablet}=="0"
looking at parent device '/devices/platform':
KERNELS=="platform"
SUBSYSTEMS==""
DRIVERS==""So I ave written this rule: in /etc/udev/rules.d/99-als-usertoggle.rules
SUBSYSTEM=="platform", DRIVER=="hp-wmi", ATTR{als}=="[0-1]", ATTR{als}="1", GROUP="users", MODE="0664"But the rule is completely ignored. I am not sure why. The group and write access of the device stays the same. Tried to make udev read the rules, tried rebooting etc. This rule should be executed last so I don't think anything is overriding it... Is there something obviously wrong with my rule?
Thanks
PS: I was not sure if I had to post this in the newbie corner thread or the admin thread. I will move it there if necessary
Offline
First thing I see wrong is the "ATTR{als}=="[0-1]"" check - if you want to set it to 1, then why do you care what it was before?
Offline
Thank you for replying,
I wanted to be as restrictive as possible, and not grant write permission for other attributes. I just tried it without this check though, and its the same result.
Might be a stupid question. But if the rules are applied I should see it on a ls -l command right?
ls -l /sys/devices/platform/hp-wmi/
-rw-r--r-- 1 root root 4096 Dec 18 12:29 als
-r--r--r-- 1 root root 4096 Dec 18 12:29 display
-r--r--r-- 1 root root 4096 Dec 18 12:29 dock
lrwxrwxrwx 1 root root 0 Dec 18 12:27 driver -> ../../../bus/platform/drivers/hp-wmi
-rw-r--r-- 1 root root 4096 Dec 18 12:29 driver_override
-r--r--r-- 1 root root 4096 Dec 18 12:29 hddtemp
-r--r--r-- 1 root root 4096 Dec 18 12:29 modalias
-rw-r--r-- 1 root root 4096 Dec 18 12:29 postcode
drwxr-xr-x 2 root root 0 Dec 18 12:29 power
drwxr-xr-x 4 root root 0 Dec 18 12:27 rfkill
lrwxrwxrwx 1 root root 0 Dec 18 12:27 subsystem -> ../../../bus/platform
-r--r--r-- 1 root root 4096 Dec 18 12:29 tablet
-rw-r--r-- 1 root root 4096 Dec 18 12:27 ueventOffline