This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4378: Save and restore backlight across shutdowns

Part Number: AM4378


Hello,

I'm using the AM4378's ECAP PWM module to control the backlight of my LCD and everything works fine.

My problem is that the backlight doesn't get saved and restored after a power-off. Looking at the systemd-backlight@.service, a save is supposed to happen on a shutdown and a restore on boot. In our case, we perform a "hot" shutdown where the power is just removed, not a "safe" shutdown where all processes are terminated. Can any systemd expert look at this and help us out here? We would like to save the backlight on change instead of on shutdown.

  • Hello Rajat,

    Have you tried changing the device tree settings for the PWM backlight node? for example, the default-brightness-level?

    Regards,

    Nick

  • Hi Nick,

    Yes, that works. But, different users might find different settings suitable for them in the field. Basically, it should remember the value across power-on's.

    We have managed to solve this by installing an interrupt on the backlight sysfs entry and forcing a save using a separate script. I was looking to see if there is a "cooler" systemd way to make the backlight service script do this automatically.