mvermand
Posts: 10
Joined: Fri Mar 29, 2019 9:14 am

No backlight control with HDMI screen?

Tue Sep 28, 2021 7:19 am

Hi,

I have a Eviciv 7 Inch HDMI touchscreen which I really like. One thing that bothers me a lot is that the backlight keeps on when the RPi (3B+) goes to sleep. The screen blanks, but the backlight leds keep burning. There is no hardware switch on the display panel to control the backlight.

I contacted Eviciv support and they said I can control the backlight of the HDMI display with the following command:

echo 1 > /sys/class/backlight/rpi_backlight/bl_power

I thought this command only worked on the official DSI RPI touchscreen, but the Eviciv support ensured it works with their HDMI screen too.

I tried this on my Pi, but I got "no such file or directory" when executing the command.
It seems that I even don't have the /sys/class/backlight folder.

So my questions are:

1) Is it correct that "echo 1 > /sys/class/backlight/rpi_backlight/bl_power" can control the backlight of an HDMI screen with backlight control?
2) Why is the /sys/class/backlight folder missing on my RPI installation? Does this have to do with the information that is send by the HDMI display to the RPi during installation?
3) Can I somehow get the /sys/class/backlight/... folders installed and working?

I really like this screen but can't accept the backlight to burn 24/7.
Hopefully this can be fixed!

Thanks a lot in advance,

Michiel

ganzgustav22
Posts: 253
Joined: Tue Feb 11, 2020 1:04 pm

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 10:29 am

As far as I know, there is no way to control the backlight via HDMI. That /sys/ file only works with the official Raspberry 7" DSI screen.

However, all the HDMI monitors that I have switch off the backlight if they don't sense a HDMI signal. I am not sure if the Pi switches off the HDMI signal when shut down, one thing to try would be switching it off/on manually with these commands:

Code: Select all

vcgencmd display_power 0
and back on with:

Code: Select all

vcgencmd display_power 1

mvermand
Posts: 10
Joined: Fri Mar 29, 2019 9:14 am

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 11:05 am

Hi,

Thanks for your reply.
"That /sys/ file only works with the official Raspberry 7" DSI screen." I'm not sure about that...
Eviciv support said it should work and I found some post about other displays working that way.

About using vcgencmd display_power -> that works, but the display is put in deep sleep and then even the touchscreen does not work anymore.
So you cannot wakeup the Pi anymore...

I hope there is some other solution out there...

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 29646
Joined: Sat Jul 30, 2011 7:41 pm

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 11:08 am

mvermand wrote:
Tue Sep 28, 2021 11:05 am
Hi,

Thanks for your reply.
"That /sys/ file only works with the official Raspberry 7" DSI screen." I'm not sure about that...
Eviciv support said it should work and I found some post about other displays working that way.

About using vcgencmd display_power -> that works, but the display is put in deep sleep and then even the touchscreen does not work anymore.
So you cannot wakeup the Pi anymore...

I hope there is some other solution out there...
That particular sysfs entry is indeed for the Pi LCD panel running off the DSI connector. Other clone devices that work the same way would also likely work, HOWEVER, HDMI doesn't, so I would not expect that to work on your HDMI connected display. The fact the sysfs entry does not exist means that it has not detected the Pi LCD display and consequently created the entry. The manufacturer is wrong here.

You need to turn off the HDMI output which the screen should recognise and therefor turn itself off.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Working in the Applications Team.

ganzgustav22
Posts: 253
Joined: Tue Feb 11, 2020 1:04 pm

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 11:32 am

mvermand wrote:
Tue Sep 28, 2021 11:05 am
But the display is put in deep sleep and then even the touchscreen does not work anymore.
So you cannot wakeup the Pi anymore...
Hmm, interesting, my monitors don't do that, I have to disable the USB touch explicitly with

Code: Select all

xinput --disable <id>
Out of curiosity, what exactly happens with the USB touch interface when you use the vcgencmd display_power command, does the USB device disappear when you check the kernel logs with "dmesg"?

mvermand
Posts: 10
Joined: Fri Mar 29, 2019 9:14 am

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 12:39 pm

@ganzgustav22: can you please give some more specific guidance on that dmesg command?
If I issue it, it gives a huge printout. Can I refine the output somehow to only show what you are interested in?
I am not that good (yet) in Linux...

@jamesh: thanks for your advice! I tried turning off the HDMI output before but that has two side affects:
1) The touchscreen does not work anymore, so I need a keyboard or mouse to wake the Pi (not my intention to have a KB or mouse attached)
2) Even when using a KB or mouse, waking the screen takes > 4 sec. which does not give a good UX...

Regards,

Michiel

mvermand
Posts: 10
Joined: Fri Mar 29, 2019 9:14 am

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 12:48 pm

@ganzgustav22: I used lsusb to get some info. No idea if this tells you any more:

Code: Select all

pi@raspberrypi:~ $ lsusb
Bus 001 Device 007: ID 0416:c168 Winbond Electronics Corp.
Bus 001 Device 008: ID 049f:0051 Compaq Computer Corp. KU-0133 Easy Access Interner Keyboard
Bus 001 Device 006: ID 0b97:7732 O2 Micro, Inc. Smart Card Reader
Bus 001 Device 004: ID 0b97:7731 O2 Micro, Inc.
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code: Select all

pi@raspberrypi:~ $ vcgencmd display_power 0
display_power=0

Code: Select all

pi@raspberrypi:~ $ lsusb
Bus 001 Device 008: ID 049f:0051 Compaq Computer Corp. KU-0133 Easy Access Interner Keyboard
Bus 001 Device 006: ID 0b97:7732 O2 Micro, Inc. Smart Card Reader
Bus 001 Device 004: ID 0b97:7731 O2 Micro, Inc.
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device 007 is gone (top of the list)

richrussell
Posts: 130
Joined: Thu Jan 16, 2020 10:52 am

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 1:36 pm

As a totally different approach - I see that the screen has switches on the back, which I guess allow you to operate a menu to set brightness etc? Possibly you could solder a suitable transistor across each of those, fed by appropriate resistors from GPIO pins. Then you could send a sequence of pulses to open the menu, select brightness control, reduce/increase as required, then exit the menu.

Yes it's not as elegant and the DSI interface where it can be controlled easily through the filesystem, but as HDMI doesn't natively offer any way to control the backlight perhaps this idea could work for your application?

mvermand
Posts: 10
Joined: Fri Mar 29, 2019 9:14 am

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 1:43 pm

@richrussell: that might be an option, though, when changing the brightness through the On screen menu, I see no difference in the Backlight led brightness, nor the power consumption. :-(
I guess I'll get an other display with a simple on/off switch for the backlight...

ganzgustav22
Posts: 253
Joined: Tue Feb 11, 2020 1:04 pm

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 1:52 pm

mvermand wrote:
Tue Sep 28, 2021 12:39 pm
@ganzgustav22: can you please give some more specific guidance on that dmesg command?
If I issue it, it gives a huge printout. Can I refine the output somehow to only show what you are interested in?
I am not that good (yet) in Linux...
The "dmesg" command gives the kernel log. The kernel is controlling your devices like USB devices and tells you when something is connected or disconnected. For example, when I pull the USB Plug of my touchscreen and put it back in, this loglines appear in the kernel log. The first line tells that the device has been disconnected (or powered off, basically gives the same message) and the subsequent lines tell that it has been connected again.
[ 3889.203290] usb 1-1.2: USB disconnect, device number 3
[ 3893.092043] usb 1-1.2: new full-speed USB device number 4 using xhci_hcd
[ 3893.227495] usb 1-1.2: New USB device found, idVendor=058f, idProduct=511b, bcdDevice= 0.00
[ 3893.227502] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3893.227507] usb 1-1.2: Product: TouchCompose
[ 3893.227512] usb 1-1.2: Manufacturer: AllTouch
[ 3893.227516] usb 1-1.2: SerialNumber: 209.0
[ 3893.238470] hid-generic 0003:058F:511B.0004: hiddev96,hidraw0: USB HID v1.11 Device [AllTouch TouchCompose] on usb-0000:01:00.0-1.2/input0
[ 3893.249609] input: AllTouch TouchCompose as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.1/0003:058F:511B.0005/input/input3
[ 3893.250200] hid-multitouch 0003:058F:511B.0005: input,hidraw1: USB HID v1.11 Device [AllTouch TouchCompose] on usb-0000:01:00.0-1.2/input1
[ 3893.257176] input: AllTouch TouchCompose as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.2/0003:058F:511B.0006/input/input4
[ 3893.257968] hid-generic 0003:058F:511B.0006: input,hidraw2: USB HID v1.11 Pointer [AllTouch TouchCompose] on usb-0000:01:00.0-1.2/input2
So if you get something similar, it's a sign, that probably everything on the display (including the USB Touch) is powered down.


@ganzgustav22: I used lsusb to get some info. No idea if this tells you any more:
Yeah, checking with lsusb is also a good way. It indeed looks like the USB Touch is also "gone" when the display is powered down. I think there is no easy solution to get it to wake up automatically when you touch it.

mvermand
Posts: 10
Joined: Fri Mar 29, 2019 9:14 am

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 1:55 pm

OK, thanks all for the input here!
Guess the display is going back... unfortunately.
I'll get another one which has a proper backlight switch.

richrussell
Posts: 130
Joined: Thu Jan 16, 2020 10:52 am

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 2:10 pm

mvermand wrote:
Tue Sep 28, 2021 1:43 pm
@richrussell: that might be an option, though, when changing the brightness through the On screen menu, I see no difference in the Backlight led brightness, nor the power consumption. :-(
I guess I'll get an other display with a simple on/off switch for the backlight...
Perhaps if you're lucky, the backlight supply to the LEDs in the screen panel might be accessible and you can cut the trace and switch that using a GPIO. Just thinking of ideas really - after all, it'd be a pity to have all those GPIO pins that are easy to control and not use them, if it provided a solution.

But yes, the official 7" DSI screen makes things much easier. I've got one on a Pi 3B+ that shows the video from an IP camera looking at my driveway so I can see when deliveries or visitors arrive. I've got a cron job to turn off the backlight at night so it doesn't light up the room.

mvermand
Posts: 10
Joined: Fri Mar 29, 2019 9:14 am

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 2:28 pm

About the official 7" DSI screen: that has no sound, so I'd have to buy some sound-kit as well.
So I thought I buy an HDMI screen with sound. If I ever want to use it for something else than an RPI, then I'm good with HDMI too...
Well, guess I've got some thinking to do...

richrussell
Posts: 130
Joined: Thu Jan 16, 2020 10:52 am

Re: No backlight control with HDMI screen?

Tue Sep 28, 2021 2:57 pm

About £10 will get you a HAT that plugs into the GPIO header and gives you audio through a couple of included speakers that you can simply glue onto the case you're using. for your Pi and screen. Have a look on the Pi Hut, Pimoroni, Adafruit etc websites.

Return to “General discussion”