On 5/6/24 07:29 AM,
wjegr...@gmail.com wrote:
> Ok, it's another headless issue. If I boot up the rPi with a monitor connected, the TV340 display comes up. THEN I can connect via VNC and see it.Pure headless, no TV340 display visible. But, where I have my PidP located, a monitor isn't a permanent option. ITS can also be stopped and started multiple times with no problem. The headless ITS start issue seems to be when the TV340 is being brought up. I'm researching, but my impression is that booting works the first time because tv340 is starting (but never shows up on the VNC desktop). If ITS is shut down and the similator stopped, that doesn't stop the TV340 instance, and then subsequent ITS boots fail at the point the tv340 is being started. But, it's already running, so startup exits. Well, that's my theory, at least. Looking into it more.
> And bingo, I got around all my issues by using one of those HDMI dummy monitor widgets. rPi thinks there's an attached monitor, everything comes up and works. This is a total hack, but at least the problem is has been isolated more. Will keep researching.
Another approach is to modify the kernel command line to force a video mode. You can do that by editing /boot/firmware/cmdline.txt and adding something like video=HDMI-A-1:1280x1024@60D. I have to do that because I have two Pi-5 boards connected to an HDMI KVM. When the Pi boards boot, one Pi will see the connected monitor but the other Pi won't. Adding the video= phrase does roughly the same thing as your dummy monitor widget without needing extra hardware.
Here is my cmdline.txt file:
$ cat /boot/firmware/cmdline.txt
console=tty1 root=PARTUUID=7f2f1b0c-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=US video=HDMI-A-1:1280x1024@60D
I would have liked to use 1920x1080 rather than 1280x1024, but I had trouble getting 1920x1080 to work properly with my monitor - I kept getting "timing out of range" errors. But that is not a problem because I also edited /usr/share/dispsetup.sh, which let me readjust the timing when logging in. Please note that I'm running X11 rather than Wayland - I don't know if Wayland has the dispsetup.sh file, but if not there is probably something similar for Wayland somewhere. Here is that file:
$ cat /usr/share/dispsetup.sh
#!/bin/sh
xrandr --newmode "1920x1080" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
xrandr --addmode HDMI-1 "1920x1080"
xrandr --output HDMI-1 --mode "1920x1080"
exit 0
I got the above timing numbers by looking in /var/log/Xorg.0.log on the Pi that was connected to the monitor. You can also use a web site to calculate video timing here:
https://tomverbeure.github.io/video_timings_calculator
And, there is a tool called "cvt" which can calculate monitor timings - I found that here:
http://www.uruk.org/~erich/projects/cvt/ but you have to download and build it from source.
If you search around you will find that this is a very old problem and lots of people have come up with ways to calculate and override monitor settings.
Steve