2

On my linux laptop my screen in flickering due to low PWM duty cycle, I found solution here: https://bbs.archlinux.org/viewtopic.php?id=159817, and wrote script that set PWM to higher value.

The problem is I have to rerun it after every wake up or after every period of inactivity that dimmed or disabled my screen.

How to automate it?

Script have to be run with superuser privileges.

1

Follow your link to a solution back to the archlinux item on how to fix backlight problems. Read the info at the end of the page where is a script you can modify to do what you want. Use inotifywait to watch for changes to the backlight and each time fix the PWM. For example:

#!/bin/bash
level=/sys/class/backlight/acpi_video0/actual_brightness

inotifywait -m -qe modify $level |
while read -r file event
do  echo intel_reg_write 0xC8254 0x09140914
done

Obviously remove the echo and use the correct register and values, not those given above. Run the script via sudo when you login.

  • Unfortunately your solution doesn't work when lid gets opened. I have to change brightness value to trigger my script. – p2rkw Jul 26 '15 at 16:39
  • @p2rkw I'm sure you can find another file in the same directory, or even elsewhere which changes when you open the lid, and that you can wait on. – meuh Jul 28 '15 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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