[mythtvnz] upgrade from V 31 to V 32
Stephen Worthington
stephen_agent at jsw.gen.nz
Sun Mar 13 03:02:26 GMT 2022
On Sun, 13 Mar 2022 11:10:15 +1300, you wrote:
>I successfully updated to v32 following Stephen's instructions but I
>cannot run mythtv-setup via a VNC session to my headless backend.
>
>I will have to wait until I am fit and mobile enough (after an operation
>on my ankle) to connect it to a screen and keyboard.
>
>Rob
To get VNC to work on a headless machine, you need to configure it
with the dummy video driver. I have been playing with this on my
"lith" PC (Ubuntu 20.04) and have got it to work. You install the
xserver-xorg-video-dummy package, and use an /etc/X11/xorg.conf file
that looks something like this:
Section "ServerLayout"
Identifier "DefaultLayout"
Screen "Screen1"
EndSection
Section "ServerFlags"
Option "DefaultServerLayout" "DefaultLayout"
EndSection
Section "Monitor"
Identifier "Dummy1"
HorizSync 28.0-80.0
VertRefresh 48.0-75.0
# https://arachnoid.com/modelines/
# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084
1118 -HSync +Vsync
# 1920x1080 @ 50.00 Hz (GTF) hsync: 55.60 kHz; pclk: 141.45 MHz
#Modeline "1920x1080_50.00" 141.45 1920 2032 2232 2544 1080 1081
1084 1112 -HSync +Vsync
EndSection
Section "Device"
Identifier "Device1"
Driver "dummy"
VideoRam 256000
EndSection
Section "Screen"
DefaultDepth 24
Identifier "Screen1"
Device "Device1"
Monitor "Dummy1"
SubSection "Display"
Depth 24
Modes "1920x1080_60.00"
EndSubSection
EndSection
My email client wraps long lines - the Modeline lines are all on one
line.
You can use the modeline calculator on the URL above to set up a
screen definition that matches your actual monitor if you want that
rather than 1920x1080. My monitor is 1920x1200.
I think it will work also if you set up a "Screen0" definition that
works with your real monitor when that is plugged in, and set
"Screen0" ahead of "Screen1" in the "Serverlayout" section. Then it
should connect to the real monitor if it is present, and will create
the dummy monitor as a second screen. If you do that, when the real
monitor is connected, it will be DISPLAY=:0.0 and the dummy monitor
will be DISPLAY=:0.1. From
In any case, you can keep two xorg.conf.xxx files and just copy the
one you want for the next boot to be xorg.conf via ssh. These are the
xorg.conf sections I use for my real screen, using my Nvidia GT1030
card:
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "DELL 2707WFP"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 76.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "NVIDIA GeForce GT 1030"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-1"
Option "metamodes" "nvidia-auto-select +0+0"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Via SSH, you can see what your screens are using xrandr. I have
several PCs on an HDMI KVM switch, and when the switch is set to a PC
other than lith, lith's video card sees no monitor connected and VNC
will not work on the main screen, but if I start a second VNC server
on the dummy screen, that works. This is what xrandr shows in that
situation:
stephen at lith:~$ DISPLAY=:0.0 xrandr
Screen 0: minimum 8 x 8, current 1920 x 1200, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected primary (normal left inverted right x axis y axis)
stephen at lith:~$ DISPLAY=:0.1 xrandr
xrandr: Failed to get size of gamma for output default
Screen 1: minimum 320 x 240, current 1920 x 1080, maximum 1920 x 1080
default connected 1920x1080+0+0 0mm x 0mm
1920x1080 60.00*
1680x1050 70.00 60.00
1400x1050 70.00 60.00
1600x900 60.00
1280x1024 75.00 60.00
1440x900 60.00
1400x900 60.00
1280x960 60.00
1368x768 60.00
1360x768 60.00
1280x800 60.00
1152x864 75.00 70.00 60.00
1280x720 60.00
1024x768 75.00 70.00 60.00
1024x576 60.00
960x600 60.00
832x624 75.00
960x540 60.00
800x600 75.00 72.00 60.00 56.00
840x525 70.00 60.00
864x486 60.00
700x525 70.00 60.00
800x450 60.00
640x512 75.00 60.00
720x450 60.00
700x450 60.00
640x480 75.00 73.00 60.00
684x384 60.00
680x384 60.00
640x400 60.00
576x432 75.00 70.00 60.00
640x360 60.00
512x384 75.00 70.00 60.00
512x288 60.00
416x312 75.00
480x270 60.00
400x300 75.00 72.00 60.00 56.00
432x243 60.00
320x240 75.00 73.00 60.00
To start a second copy of the x11vnc server via ssh, I do this command
as root:
/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth
/etc/x11vnc.pass -rfbport 5901 -shared -noxrecord -display :0.1 &
(all one line)
The second VNC server will run on port 5901 instead of the default
5900 which is in use by the first x11vnc server on the :0.0 display
that is started automatically at boot time.
More information about the mythtvnz
mailing list