Low resolution dummy monitor for VNC when displayport unplugged

I would like to configure my Jetson Orin Nano dev-kit so that when I have my Display Port cable unplugged, it is configured as a having a low-resolution dummy monitor connected (so that I can use VNC). When the Display Port cable is plugged in, I would like the resolution to be higher. From what I have read, it seems this should be possible (e.g. editing /etc/X11/xorg.conf), but I have not found a complete solution yet.

Running Jetpack 5.1.1/Ubuntu 20.04 with the Orin Nano dev kit.

Hi
Generally we would suggest connect to a monitor and set up like:
VNC without display - #4 by carolyuu

Without connecting to a monitor, you may try:
What is the best way to control the jetson Orin GUI remotely? - #5 by KevinFFF

Thanks for the suggestions, but neither really works. I have to be able to run it without a monitor, as the computer is mounted on an autonomous drone. It is nice to be able to plug a display in when I am working on it though. I tried the second option and it just gives me a frozen NVIDIA splash screen when I connect by VNC. The best I have been able to achieve is “dummy-only” mode, where I can use VNC with the monitor disconnected, but then the only way to use a monitor is to edit the xorg.conf file.

This is another issue where the behaviour is different than on my Xavier NX dev kit. On that computer I just had to add a “Screen” section, and then it worked.

Anyway, any further suggestions you may have would be appreciated.

Hi petervonhahn,

I’ve updated the instrucrtion in this thread.
Please refer it step-by-step again.

If you still have issue with dummy monitor, please share your /etc/X11/xorg.conf and the result of the following commands for further check.

$ systemctl --user status vino-server.service
$ netstat -an | grep 5900

You can try this:

export DISPLAY=:0
xrandr --fb 1920x1080;

Run that in case no monitor is connected.
You can modify the resolution as you wish.

Okay, so to be clear, my issue was not that I couldn’t get a dummy monitor working, it was that I couldn’t get my system to switch between dummy monitor and real monitor depending on whether the display port connector was plugged in. I came up with a rather inelegant solution, but it seems to work:

dummy .conf file /etc/X11/xord.conf.d/97-dummy.conf.disabled

Section "Device"
    Identifier "dummy_videocard"
    Driver "dummy"
    Option "IgnoreEDID" "1"
EndSection

Section "Monitor"
    Identifier "dummy_monitor"
    HorizSync 28.0-80.0
    VertRefresh 48.0-75.0
    Modeline "1280x720" 74.50 1280 1344 1472 1664 720 723 728 748 +HSync +VSync
EndSection

Section "Screen"
    Identifier "dummy_screen"
    Device "dummy_videocard"
    Monitor "dummy_monitor"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "1280x720"
    EndSubSection
EndSection

I added the following .desktop to ~/.config/autostart

[Desktop Entry]
Type=Application
Exec=sudo /usr/local/bin/vnc-display.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_CA]=monitor check
Name=monitor check
Comment[en_CA]=Check if display port monitor is plugged in and enable dummy for VNC if not
Comment=Check if display port monitor is plugged in and enable dummy for VNC if not

Then my script looks like this (log files just for my debugging):

#!/bin/bash
# Check connected displays
LOG_FILE="/var/log/vnc_script.log"

DUMMY_DISABLED="/etc/X11/xorg.conf.d/97-dummy.conf.disabled"


if [ -e $DUMMY_DISABLED ]; then

  if xrandr | grep -q "DP-[0-9]\+\(\.[0-9]\+\)\? connected"; then
    # If yes, disable the dummy driver configuration by renaming the file
    echo "display port was detected" >> "$LOG_FILE"
    mv /etc/X11/xorg.conf.d/97-dummy.conf /etc/X11/xorg.conf.d/97-dummy.conf.disabled
  else
    echo "display port was not detected" >> "$LOG_FILE"
    # If no, enable the dummy driver configuration by restoring the file
    mv /etc/X11/xorg.conf.d/97-dummy.conf.disabled /etc/X11/xorg.conf.d/97-dummy.conf
    #X :0 -config /etc/X11/xorg.conf.d/97-dummy.conf &
    sleep 30
    service gdm restart
    sleep 10
  fi  

else
  mv /etc/X11/xorg.conf.d/97-dummy.conf /etc/X11/xorg.conf.d/97-dummy.conf.disabled
fi

So now when I boot up, it looks for if the display port monitor is connected. If it isn’t, then it activates my dummy.conf file (by renaming) and restarts gdm.

I would love to know a better way – especially one that would allow hot plugging. I messed around with systemd services quite a bit, as well as other ways of autostarting, but it seems a whole bunch of stuff has to be up and running before I can detect the display port connection with xrandr, which is why I ended up going the .config/autostart route. I also couldn’t figure out how to detect the display port being plugged/unplugged.

Also, I’m not using vino-server.service because see here: Vino-server autostarting but then stopping automatically on Orin Nano - #7 by KevinFFF

vino-server is working fine for me when I use a ~/.config/autostart .desktop file to launch it.

These were issues I never had with my Xavier NX dev kit, so clearly things have changed with the Orin Nano dev kit.

Using a real monitor or dummy monitor would need the different xorg config so that it would be fine with your current approach using script to switch.

Or you could run the following command after configuring the correct /etc/X11/xorg.conf.

$ sudo systemctl restart display-manager

Are you using Xavier NX with R35.x release? Which Jetpack version are you using?

May I know what’s your use case? Would you switch between real monitor and dummy monitor frequently?

Maybe such a dummy plug would solve your problem. Either insert your display cable or the dummy display plug.

With the dummy plug inserted the computer thinks a display is attached and will configure the output accordingly. No software required. The resoution of the dummy display is coded within the eeprom inside the dummy plug, so choose a dummy plug with the desired configuration.

fchk

I’m running L4T 32.7.2 on my Xavier NX. The use case is a research multicopter. It obviously has to run headless when flying around, but it is nice to plug it in to a monitor when working on it, so switching between dummy monitor and real monitor is pretty frequent.

Your previous approach should work for your use case, or you could just refer to fchkjwisq suggested using a dummy plug.

We would also use xrandr to detect if any monitor is connected.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.