[筆記] 在 DGX Spark 上架設 Sunshine + Moonlight 串流遠端桌面
No Comments

更新於 2026-03-30 21:38:39

前言

最近收了一台微星的 DGX Spark (MSI EdgeExpert),搞遠端桌面其實有點花費時間,寫這篇作為筆記。以免日後忘記。

安裝

我按照這篇直接運行指令安裝:

https://github.com/eelbaz/dgx-spark-headless-sunshine

git clone https://github.com/eelbaz/dgx-spark-headless-sunshine.git
cd dgx-spark-headless-sunshine
sudo ./configure_headless_sunshine.sh

基本上就大功告成!

但是配對 Pin 網址是 localhost 才能配對,如果輸入 IP 訪問的話,會有一些問題。需要改一些配置。

修改 CSRF Allowed Origin

nano ~/.config/sunshine/sunshine.conf

插入類似下面的新行,允許私有 IP。

csrf_allowed_origins = https://192.168.0.100:47990

這樣就可以直接透過 https://192.168.0.100:47990 連線不會出問題。

解析度

默認我沒有插入 HDMI 時,由於讀不到 HDMI 螢幕,所以我的默認解析度是 1600 x 900,我需要手動修改回 1920 x 1080。

可以修改 /etc/X11/xorg.conf 的配置。

找到各區塊,修改如下:

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Virtual"
    ModelName      "Headless"
    HorizSync      28.0 - 80.0
    VertRefresh    48.0 - 75.0
    Modeline       "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
    Option         "DPMS"
EndSection

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" "NoMaxPClkCheck, NoEdidMaxPClkCheck, NoVesaModes, NoXServerModes, AllowNonEdidModes"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "MetaModes" "HDMI-0: 1920x1080_60.00 +0+0"
    SubSection     "Display"
        Virtual     1920 1080
        Depth       24
    EndSubSection
EndSection

重新啟動 GDM,即可生效。

sudo systemctl restart gdm

完成

之後每次開機默認就是 1080P 解析度,並自動開啟 Sunshine 軟體,允許透過 Moonlight 存取 DISPLAY :0。

By Weil Jimmer


This entry was posted in General, DGX, Experience, Note By Weil Jimmer.

About Weil Jimmer

Hi! Everyone! My name is Weil Jimmer. This is my personal blog. I'm a webmaster of this site. I hope the site will be popular. Now, Let's go! Enjoy gaining more knowledge.
More Details About Me : https://weils.net/profile.php


Leave a message.

Only the first 10 comment will show.