On Mon, Aug 12, 2013 at 11:27 PM, Mantas Mikulėnas <graw...@gmail.com> wrote:
> On Mon, Aug 12, 2013 at 11:40 PM, Christian Hesse <l...@eworm.de> wrote:
>> Hello everybody,
>>
>> I have a file /etc/tmpfiles.d/brightness.conf containing this line:
>>
>> w /sys/class/backlight/acpi_video0/brightness - - - - 10
>>
>> This used to set the brightness on boot, but broke lately. The path is
>> correct, so I assume this is a race condition. Any chance to get this work
>> again?
>
> Sure, and it involves *not* using tmpfiles.d.
>
> I cannot know for sure, but yes, it is likely that it *is* a race
> condition – tmpfiles.d being run before the relevant module gets
> inserted, device gets detected, or whatever. And the usual way for
> working with events like device detection is to write an udev rule
> that triggers after that specific device has appeared:
>
> ACTION=="add", SUBSYSTEM=="backlight",
>     KERNEL=="acpi_video0", ATTR{brightness}="10"
>
> (I'm not 100% sure if the KERNEL match is correct. The rest should work.)

Looks fine.

Remembering brightness sounds pretty useful for everyone. In the
longer run, it should probably be handled like ALSA restore for the
sound volume, with a service that writes it to /var/lib and reads it
from there ...

Kay
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to