Setting up your DGX SPARK for Remote Virtual Desktop (with Headless Sunshine Setup)

Don’t have a display and want to use your DGX SPARK In its native Desktop Environment? I put together this repo ( GitHub - eelbaz/dgx-spark-headless-sunshine: Headless remote desktop setup for NVIDIA DGX SPARK using Sunshine streaming ) which provides an Automated setup for headless native remote desktop streaming for the NVIDIA DGX SPARK system using Sunshine and a moonshine client. With it, you extend use your DGX usage beyond ssh/cli to leverage Spark’s native desktop environment remotely.

8 Likes

This worked flawlessly, lets me work from halfway around the world on the native Spark GUI. Thanks for this.

does this script assume a monitor? I wasn’t successful getting the script to work. I did this with the Oct19th version and manually modified to use a different release url that functioned.

generally sunshine was unable to get access to the display.

LOL, wish I saw this about an hour ago. I just used gpt-oss:120b on my spark to do this for me from scratch, had to export a .bin from my monitor to use.

Have you been able to get anything over 60hz at 3840 x 2160? The best I could do is 1440p @ 120Hz

It stated ‘The GB10’s internal display controller has a 165 MHz maximum pixel clock limitation (we saw this earlier), which can’t handle the bandwidth required for 4K from your M32U EDID’

You’re the GOAT!

I’m on a mac – When the PIN was failing, I had to toggle moonlight ON > OFF > ON in the “local network” settings

Thanks for this, not only do I have remote access but for some reason the HDMI connection started working as well. Before that just a black screen.

I tried all kind of configs but I could not go beyond 1600x900. Did anyBody found a way to increase resolution? If so… which one did you manage to ? I might be too bold trying 2560x1440…

you have to modify the headless-xrandr.desktop file in $HOME/.config/autostart/

You can set the 1600x900 parameter. Instead, I used mine to use nvidia-settings via a script.

Exec=/bin/sh -c '/home/dgx/res-modes/2192x1565.sh; sleep 5; if ! pgrep -x sunshine >/dev/null 2>&1; then DISPLAY=:0 XAUTHORITY=/run/user/1001/gdm/Xauthority XDG_RUNTIME_DIR=/run/user/1001 /usr/bin/sunshine & fi'

2192x1565.sh:

/bin/sh -c 'nvidia-settings -a CurrentMetaMode="HDMI-0: nvidia-auto-select { ViewPortIn=2192x1565, ViewPortOut=2192x1565+0+0 }"'

Note: the user ids and other parameters might be different, just modify it to your system requirements.

1 Like

Thank you very much. What I ended up doing is:
a) Adding Modevalidation in xorg.conf to avoid nvidia testing if the mode is correct for a monitor that I don’t have…

Section “Device”
Identifier     “Device0”
Driver         “nvidia”
VendorName     “NVIDIA Corporation”
BoardName      “NVIDIA GB10”
Option         “AllowEmptyInitialConfiguration” “True”
Option         “VirtualHeads” “1”
Option         “ConnectedMonitor” “DFP-0”
Option         “Coolbits” “28”
Option         “ModeValidation” “AllowNonEdidModes, NoMaxPClkCheck, NoEdidMaxPClkCheck, NoHorizSyncCheck, NoVertRefreshCheck”
EndSection


Also I modified the screen section:

Section “Screen”
Identifier     “Screen0”
Device         “Device0”
Monitor        “Monitor0”
DefaultDepth    24
Option         “MetaModes” “HDMI-0: 2560x1440 +0+0”
SubSection     “Display”
Virtual     2560 1440
Depth       24
EndSubSection
EndSection


b) I created a new mode (don’t know if i need it or if it helped, as I was doing lots of testing)

cvt -r 2560 1400 60

xrandr --newmode “2560x1400R”  234.75  2560 2608 2640 2720  1400 1403 1413 1440 +hsync -vsync
xrandr --addmode HDMI-0 “2560x1400R”

As I say I would bet this step is not needed, but I cannot know for certain.

c) I changed headless-xrandr.desktop for it to create a bigger virtual display (I guess it is that that it does)

[Desktop Entry]
Type=Application
Exec=/bin/sh -c ‘/usr/bin/xrandr --output HDMI-0 --mode 2560x1400; sleep 5; if ! pgrep -x sunshine >/dev/null 2>&1; then DISPLAY=:0 XAUTHORITY=/run/user/1000/gdm/Xauthority XDG_RUNTIME_DIR=/run/user/1000 /usr/bin/sunshine & fi’
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Headless Display Mode

With this, it worked.

1 Like

Nice, I haven’t had much success with adding a new mode using xrandr, that’s why I just ended up using nvidia-settings but whew that looks like a lot of work.