Description
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
timg236 commentedon Jul 5, 2019
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.
notGMman commentedon Jul 6, 2019
Thanks timg236 for the info. Are you aware of whether it's on anyone's radar for fixing?
pelwell commentedon Jul 6, 2019
Yes it is - Tim is one of us.
timg236 commentedon Jul 6, 2019
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.
notGMman commentedon Jul 7, 2019
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.
mehrvarz commentedon Jul 21, 2019
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
mehrvarz commentedon Jul 21, 2019
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
mehrvarz commentedon Jul 23, 2019
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.
6by9 commentedon Jul 23, 2019
#3020 The vblank warnings (not crash) are harmless.
mehrvarz commentedon Jul 23, 2019
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?
mehrvarz commentedon Jul 24, 2019
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.
6by9 commentedon Jul 24, 2019
The warnings will be present if you have
dtoverlay=vc4-fkms-v3din 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.
mehrvarz commentedon Jul 24, 2019
If the kernel warnings are unrelated, then I apologize. The warnings state "Xorg Tainted", which fits just too well with the situation.
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.
6by9 commentedon Jul 24, 2019
@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 withxset q). You probably wantxset s offif you're not wanting the screensaver to ever kick in, andxset -dpmsto stop the monitor sleeping (or at least attempting to sleep).(
xsetby itself gives you the help text)mehrvarz commentedon Jul 24, 2019
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
43 remaining items
dfunkt commentedon Dec 21, 2019
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)
JamesH65 commentedon Dec 21, 2019
@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.
dfunkt commentedon Dec 21, 2019
@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)
JamesH65 commentedon Dec 22, 2019
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.
audas commentedon Dec 26, 2019
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)
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.
JamesH65 commentedon Dec 26, 2019
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.
frankgould commentedon Dec 27, 2019
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 vcgencmdcommands from python3 andLXSessionsand they work for me. Thought you might want to compare the OSes to see if you get different results. I use mine withdpmsinLXSessionswithxset s off.JamesH65 commentedon Feb 14, 2020
Latest official software release has all these fixes in, so closing.
audas commentedon Feb 29, 2020
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).
JamesH65 commentedon Feb 29, 2020
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.
SwistakGca90 commentedon Apr 26, 2020
@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)
JamesH65 commentedon Apr 26, 2020
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.
frankgould commentedon Jun 7, 2020
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 10andxset 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.txtas follows:dtoverlay=vc4-fkms-v3d. It is now working again. Mybad.verup and ...