Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Arch Linux on my laptop, I have acpid control the brightness level based on AC plug events. Plugging in gives me max brightness and running on battery sets it at the minimum.

My problem is that when I start the laptop, the brightness is always at the highest. That is, there isn't anything to trigger the brightness change, so it runs with the highest brightness.

How can I make it so that the brightness will set correctly on startup? I was thinking of creating a systemd service as a potential solution, but I have never written one before and I wanted to hold out for any alternative (potentially better) methods before I start.

UPDATE: I ended up using a udev rule, I was unaware of its ability to control things like brightness. I still have to keep acpid, however, since udev is apparently unable to pick up my laptop close event.

Anyway, here is the link to the rule I found: https://github.com/Unia/powersave/blob/master/rules/50-powersave.rules

share|improve this question
Use a tmpfile: see the Arch Wiki entry... – jasonwryan Apr 16 '13 at 6:17
Post and accept your own answer if you have already found one. – mtahmed Apr 16 '13 at 7:56

I borrowed Unia's udev rule to solve my problem of brightness on startup. It ended up letting me (almost) free myself from acpid.

SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="/usr/bin/powersave true"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="/usr/bin/powersave false"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.