![]() |
Automatically writing screen brightness to disk - Printable Version +- Freeplaytech Forum (https://forum.freeplaytech.com) +-- Forum: Freeplay Zero / Freeplay CM3 / Game Pie Advance (https://forum.freeplaytech.com/forumdisplay.php?fid=24) +--- Forum: Freeplay Zero/CM3 (AKA GPA) Software (https://forum.freeplaytech.com/forumdisplay.php?fid=26) +--- Thread: Automatically writing screen brightness to disk (/showthread.php?tid=4840) |
Automatically writing screen brightness to disk - Bedwyr - 04-18-2019 I'd like the screen brightness slider function from Retropie to stick through power downs and power ups. I don't have or really have to have automated ambient sensing using some photocell or similar. It would just be a nice quality-of-life addition to the unit. Is that possible? RE: Automatically writing screen brightness to disk - Porcinus - 04-18-2019 Hello, I use a old image and I had trouble to recover the good brightness too. New image should be able to work the right way, BTW here is my workaround: - Check if '/home/pi/Freeplay/setPCA9633/fpbrightness.val' exist. - If it does, edit '/etc/rc.local' and add before 'python /home/pi/Freeplay/Freeplay-Support/shutdown_daemon.py' line : Code: /home/pi/Freeplay/setPCA9633/setPCA9633 --verbosity=0 --i2cbus=1 --address=0x62 --mode1=0x01 --mode2=0x15 --led0=PWM --pwm0=0x$(printf "%x\n" $(cat /home/pi/Freeplay/setPCA9633/fpbrightness.val)) > /dev/null - Then restart. Hope this will help ![]() RE: Automatically writing screen brightness to disk - Bedwyr - 04-22-2019 It did work, thanks. If I understand the command right, the RPI interface writes brightness settings to fpbrightness.val and you're just pulling that on boot to the pulsewidth modulator? (I don't work with displays very often, but mildly curious) RE: Automatically writing screen brightness to disk - Porcinus - 04-22-2019 I am passing the value from 'fpbrightness.val' to 'setPCA9633' pwm0 argument. Freeplay motherboards use PCA9633 to control backlight, 'setPCA9633' is a program to control it. RE: Automatically writing screen brightness to disk - Bedwyr - 04-22-2019 Thanks. RE: Automatically writing screen brightness to disk - Flavor - 04-23-2019 I'm sorry. I was out of town for the past 10 days or so. As a followup on this, could you post the output from these commands, Bedwyr? cat /boot/freeplaycfg.txt cat /home/pi/Freeplay/setPCA9633/setFreeplayBacklight.sh cat /etc/rc.local I want to see if I can figure out what has caused this to happen in the first place. Maybe you just had an older SD image file, but I'd like to see. RE: Automatically writing screen brightness to disk - Bedwyr - 04-25-2019 (04-23-2019, 04:12 AM)Flavor Wrote: I'm sorry. I was out of town for the past 10 days or so. I'll try to remember that when I get home. RE: Automatically writing screen brightness to disk - Bedwyr - 04-29-2019 Delayed, but here you go. This is with Porcinus's suggested changes. Code: #FREEPLAYSTARTUP=RUNPY #start up running a python script Code: #!/bin/bash Code: #!/bin/sh -e RE: Automatically writing screen brightness to disk - Flavor - 04-30-2019 (04-29-2019, 03:36 AM)Bedwyr Wrote: Delayed, but here you go. This is with Porcinus's suggested changes.Thanks! I guess I can see that it's now running using Porcinus' fix, but I can't tell why it was missing the original line that sets the brightness. I guess I'll make sure it's fixed for people in the upcoming SD image. |