I have done a couple of temperature measuring projects with different PIs
(a Pi3 and a Pi Zero W) and am quite familiar with running them headless
via VNC.
I thought I would try my hand with a camera on a PI zero W and having got
the basics sorted have installed the "motion" package and was starting to play with that.
but now when running headless initial attempts to access the machine via
VNC result in
VNC Server is not currently listening for cloud connections
I discovered by chance that if I leave it long enough it does eventually
come up and having done some testing by trying to access every 30 seconds from boot I can not get access at 11 minutes but can at 11 minutes 30 seconds.
If I connect the pi to a display via the HDMI port and keyboard/mouse via USB, the machine boots in about a minute or two, VNC starts and I can log
in from my remote machine, straight away.
I have done quite a bit of googling and did find this page https://www.raspberrypi.org/documentation/configuration/screensaver.md
but setting consoleblank to 60 did not improve matters.
I have tried @reboot vncserver start in crontab with no effect.
I have uninstalled the motion package but still no improvement
Does anyone have any idea where I should look?
"Chris B" <news@salis.co.uk> wrote in message news:sa09rd$i6d$1@dont-email.me...
I have done a couple of temperature measuring projects with different
PIs (a Pi3 and a Pi Zero W) and am quite familiar with running them
headless via VNC.
I thought I would try my hand with a camera on a PI zero W and having
got the basics sorted have installed the "motion" package and was
starting to play with that.
but now when running headless initial attempts to access the machine
via VNC result in
VNC Server is not currently listening for cloud connections
I discovered by chance that if I leave it long enough it does
eventually come up and having done some testing by trying to access
every 30 seconds from boot I can not get access at 11 minutes but can
at 11 minutes 30 seconds.
If I connect the pi to a display via the HDMI port and keyboard/mouse
via USB, the machine boots in about a minute or two, VNC starts and I
can log in from my remote machine, straight away.
I have done quite a bit of googling and did find this page
https://www.raspberrypi.org/documentation/configuration/screensaver.md
but setting consoleblank to 60 did not improve matters.
I have tried @reboot vncserver start in crontab with no effect.
I have uninstalled the motion package but still no improvement
Does anyone have any idea where I should look?
Ah, the "headless Pi4 problem". I hit this when I migrated from a Pi3 to
a Pi4.
I found that the following lines in /boot/config.txt solved it for me:
hdmi_force_hotplug=1 # allow Pi to boot with no monitor connected
hdmi_group=2
hdmi_mode=82 # force 1920x1080x60 even though monitor can’t
be auto-detected
"Chris B" <news@salis.co.uk> wrote in message news:sa1n7f$fol$1@dont-email.me...
Ah, the "headless Pi4 problem". I hit this when I migrated from a Pi3 to >>> a Pi4.Thanks for the suggestions which I have now had time to look into.
I found that the following lines in /boot/config.txt solved it for me:
hdmi_force_hotplug=1 # allow Pi to boot with no monitor
connected
hdmi_group=2
hdmi_mode=82 # force 1920x1080x60 even though monitor can’t >>> be auto-detected
The first two lines were already set in my /boot/config.txt
The third line was hdmi_mode=16. I changed it to 82 and although this
had a major effect on the VNC display it did not reduce the VNC access
time which remains at in excess of 10 minutes from reboot
Hmmm. I wonder what it different about your setup. In my case the Pi
refused to boot, and stuck as a solid (not flickering) green LED. I never thought to leave it to see if it would eventually boot. VNC may be a
slight red herring here, because a Pi ought to be able to boot without any remote connection. What happens if you set up a recurring ping to the Pi: does that start responding any sooner than the > 10 mins that you've found for VNC.
As far as I am aware, the hdmi_force_hotplug=1 is the only parameter which matters as regards ability to boot; the hdmi_mode=82 is there just to make sure what VNC sees a full-resolution display when it connects, rather than defaulting to 640x480 or giving a white-writing-on-black-background error message.
NY wrote:
As far as I am aware, the hdmi_force_hotplug=1 is the only parameter
which matters as regards ability to boot; the hdmi_mode=82 is there just
to make sure what VNC sees a full-resolution display when it connects,
rather than defaulting to 640x480 or giving a
white-writing-on-black-background error message.
If the config.txt option isn't doing the trick, maybe try a physical hdmi dummy?
<https://thepihut.com/products/hdmi-dummy-plug>
Ah, the "headless Pi4 problem". I hit this when I migrated from a Pi3 toThanks for the suggestions which I have now had time to look into.
a Pi4.
I found that the following lines in /boot/config.txt solved it for me:
hdmi_force_hotplug=1 # allow Pi to boot with no monitor connected
hdmi_group=2
hdmi_mode=82 # force 1920x1080x60 even though monitor can’t
be auto-detected
The first two lines were already set in my /boot/config.txt
The third line was hdmi_mode=16. I changed it to 82 and although this had
a major effect on the VNC display it did not reduce the VNC access time
which remains at in excess of 10 minutes from reboot
Does anyone have any idea where I should look?
As far as I am aware, the hdmi_force_hotplug=1 is the only parameter
which matters as regards ability to boot; the hdmi_mode=82 is there just
to make sure what VNC sees a full-resolution display when it connects,
rather than defaulting to 640x480 or giving a white-writing-on-black-background error message.
I have tried @reboot vncserver start in crontab with no effect.
I have uninstalled the motion package but still no improvement
Does anyone have any idea where I should look?
Maybe your Pi is booting OK but Real VNC server isn't starting until
after a long timeout.
If running headless, you do need those config.txt settings. Group 1 mode
16 is the same as group 2 mode 82. CEA (group 1) was originally for TV compatible hdmi, DMT (group 2) is for DVI over hdmi to a computer monitor, but effectively they're the same.
If you want sound output over the physical cable, use a CEA mode. This
makes no difference for VNC. I have this:
hdmi_force_hotplug=1--- SoupGate-Win32 v1.05
# 1/16 = CEA 1920x1080 @ 60 Hz
# 1/31 = CEA 1920x1080 @ 50 Hz
# 1/95 = CEA 3840x2160 @ 30 Hz (only for Pi 4)
# 2/69 = DMT 1920x1200 @ 60 Hz
# 2/82 = DMT 1920x1080 @ 60 Hz
hdmi_group=1
hdmi_mode=16
More modes available at https://www.raspberrypi.org/documentation/configuration/config-txt/video.md (scroll down to "hdmi_mode" where they have two enormous tables for CEA
and DMT).
Chris B wrote:
Does anyone have any idea where I should look?does SSH access become available before VNC access?
if so, can you see the VNC process, is anything listening on the VNC port?
On Saturday, 12 June 2021 at 11:13:53 UTC+1, Andy Burns wrote:
Chris B wrote:
Does anyone have any idea where I should look?does SSH access become available before VNC access?
if so, can you see the VNC process, is anything listening on the VNC
port?
Apologies if this formats incorrectly but I am away from home at the
moment using Google Groups
rather than the more familiar T Bird
I have uninstalled the "motion" package
I rebooted and tried to ping immeadiately
chris@Johns-iMac ~ % ping 192.168.1.22
PING 192.168.1.22 (192.168.1.22): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
ping: sendto: No route to host
{lots of similar lines deleted}
Request timeout for icmp_seq 43
64 bytes from 192.168.1.22: icmp_seq=44 ttl=64 time=8.094 ms
64 bytes from 192.168.1.22: icmp_seq=45 ttl=64 time=4.997 ms
So then I tried to SSH and do a ps aux (results below)
All of this time VNC viewer is responding with
VNC Server is not currently listening for Cloud connections.
That word "cloud" in "VNC Server is not currently listening for Cloud connections". There are two ways of establishing a VNC connection.
NY wrote:
That word "cloud" in "VNC Server is not currently listening for Cloud
connections". There are two ways of establishing a VNC connection.
VNC was always direct (either forward on TCP/5900 or reverse on TCP/5500) when I was using it, having a rendezvous with a 3rd party server in the
cloud was the teamviewer or anydesk way of doing it (with pros and cons).
"Chris B (News)" <cjb200@gmail.com> wrote in message news:a833b994-8d62-490f-9c37-707cfa38a5cdn@googlegroups.com...
On Saturday, 12 June 2021 at 11:13:53 UTC+1, Andy Burns wrote:
Chris B wrote:
Does anyone have any idea where I should look?does SSH access become available before VNC access?
if so, can you see the VNC process, is anything listening on the VNC
port?
Apologies if this formats incorrectly but I am away from home at the
moment using Google Groups
rather than the more familiar T Bird
I have uninstalled the "motion" package
I rebooted and tried to ping immeadiately
chris@Johns-iMac ~ % ping 192.168.1.22
PING 192.168.1.22 (192.168.1.22): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
ping: sendto: No route to host
{lots of similar lines deleted}
Request timeout for icmp_seq 43
64 bytes from 192.168.1.22: icmp_seq=44 ttl=64 time=8.094 ms
64 bytes from 192.168.1.22: icmp_seq=45 ttl=64 time=4.997 ms
...
So then I tried to SSH and do a ps aux (results below)
...
All of this time VNC viewer is responding with
VNC Server is not currently listening for Cloud connections.
Ok. so we've established that the Pi *is* booting - and taking about 43 seconds to start responding to pings - assuming that you started the
ping command as you applied power to the Pi to start it booting, and
that your pings are once a second.
And SSH is working OK: its listener process must be starting long before VNC's starts.
So it's not the failure-to-boot problem of not having an HDMI monitor to detect. But something else is preventing the VNC listener starting when there's no HDMI device present.
Ah, a thought has just occurred to me. That word "cloud" in "VNC Server
is not currently listening for Cloud connections". There are two ways of establishing a VNC connection. One involves referring to the computer
(in your case, the Pi) by its name, and goes via a central cloud server.
The other is a direct connection by IP address and does not rely on a
cloud server. The default is to use the cloud server: it works for
RealVNC server on *any* platform, even if you have the free rather than paid-for subscription version of VNC.
The VNC server component that is built into Raspian/RasPiOS is a special case: even without a paid-for subscription, clients can connect to it directly by IP address.
At your VNC Viewer client (on your non-Pi computer), try configuring a
direct connection. For the Windows version, to the right of the "VNC
Connect" logo there is a box with the default wording "Enter a VNC
Server address of search". Hopefully it's similar for your Mac client.
In this box, type the IP address of the Pi. And see whether you can
connect any sooner this way than via the cloud.
Thinking about this a bit more, I can't see that any software which auto-starts on your Pi (but which I don't have on mine) would be started early enough to cause a no/go-go on the booting process.
On 12/06/2021 11:14, NY wrote:
Thinking about this a bit more, I can't see that any software which
auto-starts on your Pi (but which I don't have on mine) would be
started early enough to cause a no/go-go on the booting process.
Could be an excessive amount of time to obtain a DHCP lease. If you use raspi-config to set wait for network at boot, you should see this
happening with an attached display.
It looks like this isn't a quick and easy fix that lots of people know but
I don't so perhaps it is time for the SD card reformat option and start
again from scratch. This time play with the camera without trying
motion. Its all part of the learning experience :-)
On 13/06/2021 10:10, druck wrote:
On 12/06/2021 11:14, NY wrote:
Thinking about this a bit more, I can't see that any software which
auto-starts on your Pi (but which I don't have on mine) would be started >>> early enough to cause a no/go-go on the booting process.
Could be an excessive amount of time to obtain a DHCP lease. If you use
raspi-config to set wait for network at boot, you should see this
happening with an attached display.
Ignore that, just read other branch of thread and it seems networking is
up fairly quickly.
"Chris B" <news@salis.co.uk> wrote in message news:sa4e87$5d1$1@dont-email.me...
It looks like this isn't a quick and easy fix that lots of people know
but I don't so perhaps it is time for the SD card reformat option and
start again from scratch. This time play with the camera without
trying motion. Its all part of the learning experience :-)
That reminds me: it's probably about time I updated the SD images of my
Pis as rollback insurance, so I roll back to as late a state as possible rather than to how they were several months ago.
The comment about SD card backups is noted and from now forwards will be carried out before major changes.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 371 |
Nodes: | 16 (2 / 14) |
Uptime: | 37:31:33 |
Calls: | 7,932 |
Calls today: | 2 |
Files: | 12,998 |
Messages: | 5,805,631 |