Skip to content

HDMI screen blanking but not switching off backlight - Pi 4 #3050

Closed

Description

@notGMman

Describe the bug
Issue noted on a Raspberry Pi 4, running Buster using both the stable kernel and the current bleeding edge.
The setting in /boot/config.txt "hdmi_blanking=1 is set. The X dpms settings are active. The screen blanks after the defined timeout but the backlight stays on.
This issue does not occur on a respberry pi 3b+ with the same SD card (this was tested prior to upgrading the kerne - so only on the current stable kernell)
This occurs on an ASUS HDMI monitor. Have no other display devices to test with.

To reproduce
Configure /boot/config.txt with hdmi_blanking=1.
In /etc/xdg/lxsession/LXDE-pi/autostart add:
point-rpi
@xset s 0 0
@xset s noblank
@xset s noexpose
@xset dpms 0 0 300

Expected behaviour
Screen blanks after 5 miniutes. Backlight switches off when screen receives no HDMI signal.

Actual behaviour
On Pi 3b+, after blanking the screen briefly displays blue with backlight, then switches off (which is fine). On Pi 4 it blanks completely, then the backlight switches on (which is no so good).

System
Pi 4.
Debian 10.0 Kernel4.19.50-v7l+ #895 and
Debian 10.0 Kernel 4.19.57-v7l+ #1244

Logs
Nothing logged in Xorg.0.log.

Additional context
Happy to try any suggested troubleshooting.

Activity

  1. timg236 commented on Jul 5, 2019

    @timg236
    Contributor

    hdmi_blanking=1 isn't implemented yet on Pi4, due to differences in the HDMI hardware. Hopefully, this can be fixed via a firmware update.

  2. notGMman commented on Jul 6, 2019

    @notGMman
    Author

    Thanks timg236 for the info. Are you aware of whether it's on anyone's radar for fixing?

  3. pelwell commented on Jul 6, 2019

    @pelwell
    Contributor

    Yes it is - Tim is one of us.

  4. timg236 commented on Jul 6, 2019

    @timg236
    Contributor

    Yes, it's on the radar along with hdmi_boost which also isn't implemented. It's a little way down the list behind general display stability & power management bugs (and probably PXE boot for improving test automation).
    There's a new HDMI block and HDMI PHY so this is more of a re-implement rather than a trivial port. Possible but needs a little though to avoid problems where the display doesn't come back or causes a lockup.

  5. notGMman commented on Jul 7, 2019

    @notGMman
    Author

    Thanks for the updates Tim & Phil. I think I can cope with turning the screen off for the time being :-)
    The irony for me is that I look after Pi's running signage at work and where they use TVs as displays (which they do because budgetholders buy whatever TV is on offer) I've had real trouble sometimes stopping them from switching off. And now at home I have the opposite problem!
    Still love Pi's though.

  6. mehrvarz commented on Jul 21, 2019

    @mehrvarz

    Hi, I have what appears to be the same issue. Not on Pi4, but on Buster.
    Some time after booting, the screen blanks. I can then still ssh into the box and even make cvlc play back videos. But the gui is gone. All is pitch black. In my case, the issue seems to be related to drm_crtc_vblank_get() not returning 0 and the vc4 driver crashing, here:
    https://github.com/raspberrypi/linux/blob/rpi-4.19.y/drivers/gpu/drm/vc4/vc4_firmware_kms.c#L899
    notGMman, did you check dmesg? Please let me know if you see the same "Xorg Tainted" stack trace. If not, I should file a separate issue.
    Here some other people having the same issue:
    https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=244796

  7. mehrvarz commented on Jul 21, 2019

    @mehrvarz

    A person just posted a fix for the screen blanking issue. Maybe not a complete solution, but an effective fix:
    https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=244796#p1504694

  8. mehrvarz commented on Jul 23, 2019

    @mehrvarz

    notGMman, I hope you don't mind if I litter your thread a little more, but today I apt-upgraded the kernel from 4.19.57-v7+ to 4.19.58-v7+ and the blanking fix, mentioned above, has stopped working. I had a great 48h with no screen blanking issues, but the new kernel now gives me this choice: a) use an unmodified /etc/lightdm/lightdm.conf and have the screen blank on me 10-20 minutes after boot, or b) modify /etc/lightdm/lightdm.conf with what has worked with 4.19.57-v7+ ("xserver-command=X -s 0 dpms") and have the screen blank on me when x11 is starting up. I'm picking a) for the time being...
    ssh and everything else still working fine.

  9. 6by9 commented on Jul 23, 2019

    @6by9
    Contributor

    #3020 The vblank warnings (not crash) are harmless.

  10. mehrvarz commented on Jul 23, 2019

    @mehrvarz

    The warnings are gone with 4.19.58-v7+. But the x11-blanking is back.

    Q: How is it possible that "xserver-command=X -s 0 dpms" did totally fix the issue in 4.19.57-v7+, but under 4.19.58-v7+ doing the same leads to the immediate blanking of x11?

  11. mehrvarz commented on Jul 24, 2019

    @mehrvarz

    The warnings are still here also. My dmesg log: https://pastebin.com/raw/J2Zsbbr2

    The first two warnings don't have a blanking effect. But the third warning (at time stamp 765.364852) correlates exactly with the full blanking of the x11 session.

    I say "blanking of the x11 session" and not "HDMI screen blanking" like OP did, because I am able to use cvlc and/or omxplayer (via ssh) to play back videos on screen AFTER the blanking has occured. Apparently, there is nothing wrong with the HDMI signal. It's just that the screen is all black and I assume it has something to do with x11.

    Also note that this is not at all Pi4 specific.

  12. 6by9 commented on Jul 24, 2019

    @6by9
    Contributor

    The warnings will be present if you have dtoverlay=vc4-fkms-v3d in config.txt, and are noted under #3020 (as I have already linked to).
    They are harmless and are due to producing DRM flip events at incorrect moments around mode changes. They have no actual link to screen blanking itself.

    As timg236 has already said, HDMI display blanking is still on the radar as a feature to be implemented. Currently the screensaver will remove all layers from the screen, but the pipeline will continue to produce black output.

  13. mehrvarz commented on Jul 24, 2019

    @mehrvarz

    If the kernel warnings are unrelated, then I apologize. The warnings state "Xorg Tainted", which fits just too well with the situation.

    Currently the screensaver will remove all layers from the screen, but the pipeline will continue to produce black output.

    Can I prevent the screensaver from doing that, maybe disable it before hand? Or do something after the fact, maybe by restarting a service? I am currently rebooting the device about every 10 minutes.

  14. 6by9 commented on Jul 24, 2019

    @6by9
    Contributor

    @mehrvarz You've hijacked someone else's report of screen blanking not putting the monitor into standby mode with something different. Please don't do that.

    All the X screensaver settings can be tweaked via xset s <command> (read status with xset q). You probably want xset s off if you're not wanting the screensaver to ever kick in, and xset -dpms to stop the monitor sleeping (or at least attempting to sleep).
    (xset by itself gives you the help text)

  15. mehrvarz commented on Jul 24, 2019

    @mehrvarz

    @mehrvarz You've hijacked someone else's report of screen blanking not putting the monitor into standby mode with something different. Please don't do that.

    All the X screensaver settings can be tweaked via xset s <command> (read status with xset q). You probably want xset s off if you're not wanting the screensaver to ever kick in, and xset -dpms to stop the monitor sleeping (or at least attempting to sleep).
    (xset by itself gives you the help text)

    I am not sure my issue is different. Up to this minute I was convinced that it is the same issue. If those are different, then they certainly look the same.

    I am using these xset commands in my /etc/xdg/lxsession/LXDE-pi/autostart since forever like so:
    @xset s noblank
    @xset s off
    @xset -dpms

  16. 43 remaining items

  17. dfunkt commented on Dec 21, 2019

    @dfunkt

    Hello everyone. I am testing this latest update. However, It is not working as it supposed to be. Standby mode is turning off the hdmi port instead of putting the screen to standby mode. My settings is: DPMS (Energy Star):
    Standby: 60 Suspend: 65535 Off: 65535
    DPMS is Enabled

    Yes, this is working as written. I simply turn off the HDMI, which in all the devices I have tried, also turns off the monitor. Sending a CEC command or whatever is required to turn off is unlikely to be done, just don't have the time given this method works for most people.

    I also encountered this issue on my LG 23EA63V-P monitor, it keeps spitting out "No signal" for about 5 minutes until it finally decides to turn off. I suppose there's no way to disable this behaviour? (besides going back to an older firmware without this change, since on the latest stable firmware it goes directly into power-saving mode)

  18. JamesH65 commented on Dec 21, 2019

    @JamesH65
    Contributor

    @dfunkt what you are describing is intentional behaviour, which you have to specifically turn on (DPMS power I think its called in xscreensaver). So you need to turn it ON to get the HDMI block to power down, which in turn will cause most monitors to power off as well. Sounds like in your case you just need to turn off the screen saver completely.

  19. dfunkt commented on Dec 21, 2019

    @dfunkt

    @JamesH65 I now realize that I may have worded my question poorly. What I meant to ask was if there was a way to make the display go into the power-saving mode instead of powering off with the latest firmware since that's what I prefer. (With the stable firmware it goes into the power-saving mode)

  20. JamesH65 commented on Dec 22, 2019

    @JamesH65
    Contributor

    So you want the monitor to go in to power saving but leave the HDMI port on the Pi powered up?
    We have two modes of 'screensaving'. By default the screen goes blank, but the HDMI is powered up so it's just displaying a fully black image. I think some monitors after a while will realise this and turn themselves off. The second mode (DPMS its called in xscreensaver I think) will actually power down the HDMI port. Most monitors will detect this immediately and power themselves down. There is no option to tell the monitor to power down via CEC or similar but leave the HDMI on.

  21. audas commented on Dec 26, 2019

    @audas

    I am really sorry about this and hope it comes across without sounding like a rant, appologies for any offence or poor wording.

    There has been so much confusion regarding screen blanking and powering down, especially between the various pi versions. I am now very unsure of what to do.
    I am on a pi 4 and am trying to control the screen turning on an off at set times - these come from a remote database.

    Basically, on a pi 4 :
    If I want to shut the screen down and then wake it up what should I be using.

    I have tried
    sudo vcgencmd display_power 0
    sudo tvservice -o
    sudo xset dpms force off'

    Edit: just to add to wake this up I am using
    `
    subprocess.call('sudo xset dpms force on', shell=True)

    subprocess.call('sudo tvservice -p', shell=True)
    
    subprocess.call('sudo vcgencmd display_power 1', shell=True)  
    
    subprocess.call('sudo xset -display :0 s noblank', shell=True)
    
    subprocess.call('sudo xset -display :0 s off', shell=True)
    
    subprocess.call('sudo xset -display :0 s 0 0', shell=True)
    
    subprocess.call('sudo xset -display :0 s dpms 0 0 0', shell=True)`
    

    However the pi will now no longer wake up and the system is totally unreachable from keyboard, mouse, SSH, putty can not even ping it. People are suggesting the wifi is powering off as well ?

    Apparantly even xscreensaver over writes the display settings and can no longer be used as well - adding more confusion ?

    I just want to be able to turn it on and then off then back on - so many different and totally conflicting pieces of advice.

  22. JamesH65 commented on Dec 26, 2019

    @JamesH65
    Contributor

    Those commands cannot affect Wifi.

    I use xscreensaver, and it works fine, but I am using the latest rpi-update firmware - but I think the newer screen blanking code should be in apt - not sure.

    So you can set up a time delay before blanking using xscreensaver, and can also use that to also turn of the HDMI output if you want.

    You can also use vcgencmd display_power to turn the power on and off. There is a bug fix going through to make this one a bit more robust but the basics should work.

  23. frankgould commented on Dec 27, 2019

    @frankgould

    Just to throw my "two cents" worth of experience in here, I am running Arch Linux ARM 4.19 on my RPi 4B:4GB desktop with HDMI monitor that appears to be working fine for my use. I have tested the subprocess vcgencmd commands from python3 and LXSessions and they work for me. Thought you might want to compare the OSes to see if you get different results. I use mine with dpms in LXSessions with xset s off.

  24. JamesH65 commented on Feb 14, 2020

    @JamesH65
    Contributor

    Latest official software release has all these fixes in, so closing.

  25. audas commented on Feb 29, 2020

    @audas

    New software tested and working on Raspberry 4 2Gig and Raspberry 4 4Gig - but is failing on Raspberry 3 A+.

    TVSERVICE causes the screen to go blank and all access to the pi is lost. Can not be retrieved without pulling power.

    My script runs at start up - hence this problem completely negates my entire set up (screen blanks, can not access - I have a 60 second delay on the boot up lucky for me).

  26. JamesH65 commented on Feb 29, 2020

    @JamesH65
    Contributor

    Can you create a new issue please, this one is specifically about the Pi4. Once there something official I can try and find a 3A+ and test it out. Does seem odd it seems to kill it completely.

  27. SwistakGca90 commented on Apr 26, 2020

    @SwistakGca90

    @JamesH65 i have the same issue. My raspberry Pi4 4GB turn off the hdmi after couple minutes. I try make rpi-update but after it my raspberry couldn't boot. How can i update rpi and fix it to boot raspberry properly ? (I assuem that after update rpi this issue with hdmi black screen will be fixed like you wrote in previous posts)

  28. JamesH65 commented on Apr 26, 2020

    @JamesH65
    Contributor

    Please use the forums for tech support questions - rpi-update loads bleeding edge test firmware, you should not really be using it and there hasn't been any changes on this topic for a month or two.

  29. frankgould commented on Jun 7, 2020

    @frankgould

    I am having this same RPi4B problem again with the latest Arch Linux ARM 4.19 upgrade and I don't know why. It's now blanking the screen with backlight on instead of turning off the HDMI monitor when using dpms 10 10 10 and xset s off. Is there something I'm doing wrong or I need to do to fix this again?
    Edit: Nevermind. I found my problem was I needed to set the right screen driver in /boot/config.txt as follows: dtoverlay=vc4-fkms-v3d. It is now working again. Mybad.

  30. added a commit that references this issue on Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions