Turn MHS35 (ILI9486) LCD screen off after idle

Hello all:

I have a Renegade attached to an MHS 3.5 inch touch screen. After following the directions posted a few years ago, I have it working; touch screen and all. With the help of some AI sites, I’ve created a touch user interface (TUI) for a NAS backup solution. I’d like for the screen to turn off after an idle timeout but can’t seem to figure out how to accomplish this (I can blank it but not power it off). I’ve installed libretech-wiring-tool which gave me some gpio info but there doesn’t seem to be any backlight control. Tried all the overlays I can think of (spi-0-2cs-ili9486-xpt2046, spi0-cs1-ili9486-xpt2046, spi-0-2cs-mhs3528, spi0-cs1-mhs3528) and they all display fine but there’s no backlight adjustment (assuming that’s what I need?) that I’m seeing. Does anyone have any insight on how to turn off the LCD via software?

I’m running the Libre distro ubuntu-22.04.3-preinstalled-server-arm64+roc-rk3328-cc so there’s no GUI.

The backlight is either fixed or controlled by a GPIO. Most SPI displays have a fixed backlight attached to the 5V. If it’s fixed, it cannot be turned off without turning off the entire 5V rail for the board. If it’s controlled by a GPIO, that GPIO needs to be added to the overlay.

Thanks for the reply. It’s a cheap one so it wouldn’t surprise me if it’s fixed. Is there an easy way to tell? AI created a script to run through the GPIO’s but it always crashed the screen. I’m guessing I’d have to probe them manually? Hoping you might have some ideas.

Thanks again!

You need to manufacturer documentation of the IOs. Without this, you have to test each GPIO manually to see if the backlight turns off. Additionally, the LCD does not have to be driven. You can use lgpio to turn on and off each IO to see if the backlight turns off. If it does not, it’s fixed.