Read the statement by Michael Teeuw here.
RPI4 Dual Monitor blanking
-
Started a new project with a dual monitor setup using a pi4. Connected via DVI as there is no HDMI (only display port, thanks HP).
Monitors are in portrait mode & MM is setup in single instance configuration using this post as a template (linky)
The latest version of Bullseye seems to have stopped “vcgencmd display_power 0” from working , it no longer blanks the display and just responds with display_power=1. This appears to be due to a change to the KMS driver.
Googling give me this as an alternative
xrandr --output HDMI-1 --off
It does work & switches the screens off (separate commands for HDMI-1 & HDMI-2) however, using
xrandr --output HDMI-2 --off xrandr --output HDMI-1 --off
to switch off and
xrandr --output HDMI-1 --rotate right --auto xrandr --output HDMI-2 --rotate left --right-of HDMI-1 --auto
Puts them back in the right place . Sometimes.
About 1 in every 10 off/on cycles the righthand display ends up on HDMI-1 & HDMI-2 shows the desktop. CTRL W puts it back in the right place, but that’s really annoying & I don’t want to reset the MM every time as it looks ugly whilst repopulating.Has anyone found a more reliable method to blank the displays & return MM back to the correct displays?
-
@grantc66 Hi,
it may be a timing issue.
Maybe a sleep 1 between the two xrand commands helps. -
@wishmaster270 Thanks for the suggestion. Unfortunately not a timing issue.
Adding a delay didn’t change the behaviour. ☹️
-
After nearly a week of trying different things, short of removing the KMS driver or reverting to Buster, the only method I could come up with was to use the xset screensaver.
Set the timeout to 3 minutes
xset -display :0 s 180
and do
xset -display :0 s reset
to wake it up on motion.It’s not elegant but without any cec control of the monitor it appears to be my only solution, unless anyone has a method to get xrandr to keep electron on the correct monitor.
-
@grantc66
There are ways to move windows to a specific screen on the bash. But it is complicated.
Maybe one of the solutions in this thread solves your problem. -
For anyone having the same issue:
Another solution is to edit /boot/config.txt & change to the fake kms driver
dtoverlay=vc4-kms-v3d
to
dtoverlay=vc4-fkms-v3d
reboot & then
vcgencmd display_power 0 vcgencmd display_power 1
work as they used to do.
I’ve not noticed any negative effect from using the fake one but I’m not using any 3D effects (your results may vary).
-
For anyone having this issue:
Change the kms driver to the fake one by editing /boot/config.txt
change
dtoverlay=vc4-kms-v3d
to
dtoverlay=vc4-fkms-v3d
Reboot & display will now switch on/off using
vcgencmd display_power 0 vcgencmd display_power 1
I’ve not noticed any problems using the fake driver but I’m not using anything 3D (your results may be different)