You are not logged in.

#1 2013-01-15 18:44:07

Registered: 2012-01-28
Posts: 15

backlight interface intialization with systemd [SOLVED]

I've got a script that I run at startup that I use to enable brightness controls. Essentially it modifies the a couple of brightness interfaces: /sys/class/backlight/intel_backlight/brightness and /sys/class/backlight/acpi_video0/brightness. I'm trying to create a systemd service that runs the script automatically at startup, but have run into issues where the acpi_video0 interface does not exist when the service is initiated.

Right now I have the following service file:

Description=Brightness Control Init



Using systemctl status I have verified that the script runs, but it fails to alter the acpi_video0 interface because it does not exist.

Is there a different target besides multi-user with which the service should be installed, or is there a requires/after relationship that I need to dictate?

For anyone who encounters this post and has a similar problem I implemented a workaround solution to the script that I run to initialize brightness. I stuck the following few lines to the beginning of the script run by the service:

while [[ ! -e /sys/class/backlight/acpi_video0/brightness ]]
  sleep 1

Since nothing depends on this service the sleep is not delaying any critical programs from being initiated. I'm sure there is a better way, but hey it works.

Last edited by tyler.heck (2013-01-22 01:46:09)


Board footer

Powered by FluxBB