You are not logged in.
Pages: 1
The Dell_XPS_13 said:"the screen brightness does not work".
I find if
/sys/class/backlight/intel_backlight/brightness = 0 (default value is 4882) , I can control backlight by the function keys.
Use SysInit,it easy to add echo command to "/etc/rc.local"
echo -n 0 >/sys/class/backlight/intel_backlight/brightness
But by systemd framework , I dont finded where to do that by root user.
Anyone Help?
Last edited by czheji (2013-07-29 14:52:58)
Offline
It is not obvious, but read this part of the systemd wiki article
Create a tmpfile that does that write.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I found that using tmpfiles.d for my backlight on my Thinkpad (also Intel graphics) was a bit spotty. I think this was probably indicative of the systemd-tmpfiles.service being sometimes run before thes particular directories were created. So I ended up creating a udev rule in order to ensure that the value would be written to the file whenever the backlight stuff in /sys was actually set up.
Here is what I ended up with to set my brightness on boot. You should be aware that my laptop seems to use acpi_video0 for this. So you probably are going to have to use udevadm to find appropriate values for the intel_backlight directory specifically. In other words, this is not meant to be a drop in solution to your issue, just a reference.
$ cat /etc/udev/rules.d/44-backlight.rules
ACTION=="add", KERNEL=="acpi_video0", SUBSYSTEM=="backlight", SUBSYSTEMS=="pci", DRIVERS=="i915", ATTR{brightness}="4"
You may also want to have a look at the bottom of the Intel wiki's troubleshooting. I personally have to use one of those fixes to make my keyboard backlight functions work at all.
Offline
Actually, I was aware of that when I posted my response. Someone added that caveat to the wiki, so I did not mention it.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Actually, I was aware of that when I posted my response. Someone added that caveat to the wiki, so I did not mention it.
Ah, I see, my bad. Sorry for the (wordy) noise...
Offline
Ah, I see, my bad. Sorry for the (wordy) noise...
Bah! You actually provided a rule, the wiki article I liked doesn't
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
... I think this was probably indicative of the systemd-tmpfiles.service being sometimes run before thes particular directories were created. So I ended up creating a udev rule in order to ensure that the value would be written to the file whenever the backlight stuff in /sys was actually set up...
Thanks for your help,I got that by adding udev rules.
udevadm info -a -p /sys/class/backlight/intel_backlight
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight':
KERNEL=="intel_backlight"
SUBSYSTEM=="backlight"
DRIVER==""
ATTR{type}=="raw"
ATTR{brightness}=="10"
ATTR{bl_power}=="0"
ATTR{max_brightness}=="4882"
ATTR{actual_brightness}=="10"
...
rule looks like this:
cat /etc/udev/rules.d/40-brightness.rules
ACTION=="add", KERNEL=="intel_backlight", SUBSYSTEM=="backlight", ATTR{brightness}="10"
Last edited by czheji (2013-07-29 14:55:17)
Offline
Neato! Glad I was able to help you achieve your udev rule potential!
Offline
I know this is solved but thought I'd chime in since I have an xps 13 as well and was just fighting with this. I was close to using a udev rule myself but got things working using a systemd temp file. Oddly though the backlight has to be set via /sys/class/backlight/acpi_video0/backlight rather than intel_backlight when doing it this way. I also had to add i915 to the modules and rebuild the initramfs. Seems that having the module loaded immediately lets the temp file do the trick.
Offline
Pages: 1