1

I'm setting my RaspberryPi 3B+ (Debian Buster) up as a magic mirror. I've run into a really weird issue that I can't wrap my brain around.

The magic mirror software is basically an EletronJS app, configured to run full-screen when LXDE-pi loads up. I have a monitor connected directly to the RPI, and have been configuring it via SSH.

I can set up the app to render various non-fullscreen components, and it renders properly on my monitor. Its appearance over VNC looks identical.

Adding any full-screen component causes my local monitor to display the new content momentarily -- before blanking to a black screen. Over VNC, the app displays properly (i.e., in fullscreen with the new content).

If I "restore" the ElectronJS app over VNC -- i.e., make it non-fullscreen and un-maximized -- then it suddenly appears on my local monitor.

If I resize the app window over VNC, I will see it resize on the local monitor -- up to a certain size, at which point the whole monitor goes black again.


/etc/xdg/lxsession/LXDE-pi/autostart:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash

@xset s noblank
@xset s off
@xset -dpms
# @unclutter -idle 0.1 -root

The app is re-/started/stopped using PM2, which in turn delegates to a shell-script -- ~/mm.sh:

#!/bin/bash
cd ~/MagicMirror
DISPLAY=:0 npm start

Finally -- my HDMI resolution is set to be DMT Mode 47 (1440x900, 60Hz) -- /boot/config.txt:

...

hdmi_group=2
hdmi_mode=47

# We ran into trouble using the experimental GL driver; so we're using the legacy, non-GL version
# dtoverlay=vc4-fkms-v3d

gpu_mem=256

# Finally -- the display is rotated 90 degrees CW to a portrait orientation
display_rotate=1
avoid_warnings=1
...
3
  • I am going to try re-imaging the O/S completely. Could be I touched something I don't remember.
    – snowjak
    Commented Jan 31, 2023 at 13:47
  • Well, that just broke everything. Now my monitor works just fine when booting (i.e., when displaying text) -- but the moment the desktop environment loads, I get a blank screen. VNC works just fine.
    – snowjak
    Commented Jan 31, 2023 at 16:44
  • Yup -- it looks like -- when I'm displaying any image (e.g., a desktop background) -- I can achieve a screen resolution of no greater than 1024x768 (DMT mode 16). (and that with max GPU memory of 256MB, and without the experimental GL driver) (edit: CEA mode 19, 1280x720, is achievable; I'm going to have to stick with that)
    – snowjak
    Commented Jan 31, 2023 at 17:07

1 Answer 1

0

Well, I don't know why this would be the answer, but it's working now.

I had to radically moderate my expectations w/r/t display resolution.

It seems that, so long as I'm displaying nothing complicated -- e.g., white text on a black background -- I can use higher resolutions (like that 1440x900@60Hz I was using before).

But the moment I try to display any image that fills more than so-much of the screen, the screen blanks completely. (This appears to be related to the HDMI controller rather than X, because my VNC sessions are unaffected.)

The only way I can achieve image-display is by adopting a lower resolution; in my case, by going with CEA mode 4 (1280x720@60Hz).

Note that this is after bumping my allocated graphics RAM to the maximum (256MB), and disabling the experimental GL driver.

My /boot/config.txt ends up looking like:

#hdmi_safe=
#disable_overscan=
#overscan_left=
#overscan_right=
#overscan_top=
#overscan_bottom=
#framebuffer_width=
#framebuffer_height=

hdmi_force_hotplug=1
hdmi_group=1
hdmi_mode=4
hdmi_drive=2
config_hdmi_boost=6

# ...

[pi4]
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
gpu_mem=256

display_rotate=1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.