I am trying to connect to my Pi4 over my network from another computer running VNC viewer. I have set up VNC viewer and it works fine. That is I can select to the Pi4 from the computer and open it when I have a monitor connected to the Pi4.
But I want to run the Pi4 headless. When I disconnect the Pi4 monitor and reboot the Pi I can no longer VNC to it. It says - “cannot currently show the desktop”. When I plug the monitor back in and reboot the PI I can VNC connect again.
I have tried adjusting the frame buffer in the boot/config.txt file to:
‘framebuffer_width=1920
framebuffer_length=1080’
makes no difference
I have tried setting:
‘hdmi_group=2
hdmi_mode=82’
does not help
I have seen a link saying Preferences>RaspberyPiConfuguration>Display>HeadlessResolution
But I do not get this headless option when I try this - Headless is not available in the menu.
Please advise
SideNote:
Does anyone know if I can VNC into both windows machines and Pi machines from both the Pi machines and the windows machines? I hope to have one Pi with monitor and one windows with monitor on a network with many other Pi’s and windows machines running headless in an instrumentation / control lab. Do I need to install some VNC server on the windows boxes? Want to be able to VNC into any Pi or windows machine from either the Pi or windows machine with monitor.
Yeah, you can install both the viewer and server on a range of devices, Windows and Raspberry Pi included(for both). You can configure VNC a couple of ways, locally and through web - it’s worth taking a read through.
PS: Typically the Pi would be your endpoint(running the server) so it might be a bit laggier than if you were remoting in from a PC
I have turned screen blanking OFF and it does not make any difference still same problem.
I have also added a blank ( no characters empty, no file extension) ssh file to the root directory in the Pi using nano AND also an empty ssh file to the boot directory by taking the SSD drive out and putting it into a windows machine. Still no difference.
Did you restart your Pi after changing screen blacking?
I’ve setup quite a few Pis with VNC by only changing the screen blacking and HDMI config (force_hotplug, mode and group).
Which OS were you using and the specific build? I like to keep things stable with the most recent (stable) build of Buster.
I have now found that I have got it working without setting hdmi_safe=1. What I needed to do was deliberately set the monitor resolution first. If the second machine which VNC into the pi has a screen resolution less than or equal to the pi setting the pi defaults to some different size resolution. It seems that this can only be overridden by actually having the monitor plugged into the pi.