Raspberry Pi 4
For information, Recalbox IS NOT compatible with Raspberry Pi 4 yet.
Pour information, Recalbox N'EST PAS encore compatible avec le Raspberry Pi 4.
The Recalbox Team.
Turning off the TFT screen on the OGST or Cloudshell cases
Zaphod last edited by Zaphod
The TFT screen on the OGST is very bright (especially at night) so I wanted to be able to turn it off since my gameing box is in the bedroom.
Here are the commands to do just that:
#Turn the backlight ON echo 0 > /sys/class/backlight/fb_ili9340/bl_power #Turn the backlight OFF echo 1 > /sys/class/backlight/fb_ili9340/bl_power
I have written a script that does this for you.
#!/bin/bash filename='/sys/class/backlight/fb_ili9340/bl_power' read -r state<$filename if [ "$state" = "0" ]; then echo 1 > /sys/class/backlight/fb_ili9340/bl_power else echo 0 > /sys/class/backlight/fb_ili9340/bl_power fi
to use the script do the following.
Log in to your recalbox via SSH
then use these commands
cd nano backlight #copy paste the script into this new document ctrl+x then y #this will exit and save the document chmod +x backlight #make the script executable
To use the script simply type ./backlight to toggle the TFT backlight on and off
I am hoping backlight control can be built in to the next version.
This is the command to turn off all backlights if you want to include a universal backlight control in the next version
# Turn off backlight echo 1 | tee /sys/class/backlight/*/bl_power # Turn on backlight echo 0 | tee /sys/class/backlight/*/bl_power
Zaphod last edited by
A slightly better version of the script that accepts 'on' and 'off' arguments. If no argument is given it toggles the backlight state
#!/bin/bash filename='/sys/class/backlight/fb_ili9340/bl_power' read -r state<$filename if [ "$1" = "off" ]; then echo 1 > /sys/class/backlight/fb_ili9340/bl_power elif [ "$1" = "on" ]; then echo 0 > /sys/class/backlight/fb_ili9340/bl_power else echo "This command accepts the following arguments" echo "on - turns the backlight on" echo "off - turns the backlight off" echo "If no argument is given the backlight will toggle" echo "No state selcted, toggling." if [ "$state" = "0" ]; then echo 1 > /sys/class/backlight/fb_ili9340/bl_power else echo 0 > /sys/class/backlight/fb_ili9340/bl_power fi fi
@Zaphod hi and thank you for your script! I‘d suggest you to please open an issue on gitlab and add your script there with the explanation. Gitlab is the platform for development and just having it here, although useful for the community, has the risk of getting forgotten.
@Zaphod @paradadf this feature is already included in the next release of RB. See https://gitlab.com/recalbox/recalbox/-/blob/master/board/recalbox/fsoverlay/recalbox/scripts/miniTFTSupport.sh line 163
Zaphod last edited by Zaphod
@ian57 I guess great minds think alike. I do have a suggestion for that script but I will make it in gitlab