VFIO GPUパススルーによりGnomeがハングします。

VFIO GPUパススルーによりGnomeがハングします。

私のコンピュータには2つの独立したGPUがあります。私はいくつかのプログラムのためにVFIOを使用して2番目のGPUをWindows VMに渡しました。今、より強力な最初のGPUをWindows VMに渡していくつかのゲームをプレイしたいと思います。 (必要に応じて2番目のWindows VMを作成できます。問題はありません。)

確認しましたスクリプト最初のGPUに独自のIOMMUグループがある場合

問題は、Gnome DEとgdm3が正常に起動するとき、または2番目のGPUから起動すると問題なく起動しますが、最初のGPUから起動すると問題なく起動することです。

通過するGPUに応じてディスプレイのオン/オフが切り替わります。

gdm3の再起動、kill、再起動もしてみましたgnome-shellが、DEエントリには何の影響もないようです。 GDM3は何とか起動しますが、パスワードを取得してユーザー選択メニューに戻ります。

スクリプト出力:(不要な項目を除く、2つのGPUのみ)

IOMMU Group 12:
    00:15.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0) [1002:43a0]
    05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series] [1002:68f9]
    05:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series] [1002:aa68]
IOMMU Group 14:
    01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] [1002:67ef] (rev cf)
    01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] [1002:aae0]

journalctl -u gdm開始時(通過なし):

Feb 11 17:29:53 Alienus-PC systemd[1]: Starting GNOME Display Manager...
Feb 11 17:29:54 Alienus-PC systemd[1]: Started GNOME Display Manager.
Feb 11 17:29:57 Alienus-PC gdm-autologin][1490]: gkr-pam: no password is available for user
Feb 11 17:30:00 Alienus-PC gdm-autologin][1490]: pam_unix(gdm-autologin:session): session opened for user alienus by (uid=0)

journalctl -u gdm起動しない場合(最初のGPUを通過):

Feb 11 17:25:58 Alienus-PC systemd[1]: Starting GNOME Display Manager...
Feb 11 17:25:58 Alienus-PC systemd[1]: Started GNOME Display Manager.
Feb 11 17:25:58 Alienus-PC gdm-autologin][2650]: gkr-pam: no password is available for user
Feb 11 17:25:58 Alienus-PC gdm-autologin][2650]: pam_unix(gdm-autologin:session): session opened for user alienus by (uid=0)
Feb 11 17:25:58 Alienus-PC gdm-autologin][2650]: gkr-pam: couldn't unlock the login keyring.
Feb 11 17:25:59 Alienus-PC gdm-autologin][2650]: pam_unix(gdm-autologin:session): session closed for user alienus
Feb 11 17:25:59 Alienus-PC gdm3[1359]: GdmDisplay: Session never registered, failing
Feb 11 17:25:59 Alienus-PC gdm-launch-environment][2659]: pam_unix(gdm-launch-environment:session): session opened for user gdm by (uid=0)
Feb 11 17:25:59 Alienus-PC gdm-launch-environment][2659]: pam_unix(gdm-launch-environment:session): session closed for user gdm
Feb 11 17:25:59 Alienus-PC gdm3[1359]: Child process -2688 was already dead.

journalctl -u gdmデバッグを有効にする(/etc/gdm3/custom.conf、最初のGPUを通過):https://paste.ubuntu.com/p/cSsDpBynyM/ (出力は約52,000文字なのでここに投稿できません)

システム仕様:

ベストアンサー1

この回答2番目のGPUでGnomeを起動できない問題を修正しました。

アクティブなXセッションがない状態に入るために、最初のGPUを無効にした状態で起動しました。その後私はに切り替えて走りtty3ましたXorg -configure。 21枚のカードと画面を含むプロファイルを作成します(以上はすべてのPCI IDに対して機能する可能性があります)。

2番目のGPUを除くすべてのカードと最初の3つを除くすべての画面を削除した後、ここに設定ファイルをコピーし/etc/X11/xorg.confて再起動しました。

最初は、最初のGPUを無効にして、正常に起動しなかったときにこれが動作することを確認したかったのです。モニターの数が変更され、xrandr --listprovidersプロバイダーに確認してみると、ID 0が私の2番目のGPUでした。その後、再起動して最初のGPUを無効にし、問題なくGnome DEを起動しました。

私のxorg.confファイル:

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen2" RightOf "Screen1"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/X11/misc"
    FontPath     "/usr/share/fonts/X11/cyrillic"
    FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath     "/usr/share/fonts/X11/Type1"
    FontPath     "/usr/share/fonts/X11/100dpi"
    FontPath     "/usr/share/fonts/X11/75dpi"
    FontPath     "built-ins"
EndSection

Section "Module"
    Load  "glx"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option      "Protocol" "auto"
    Option      "Device" "/dev/input/mice"
    Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
EndSection

Section "Monitor"
    Identifier   "Monitor1"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
EndSection

Section "Monitor"
    Identifier   "Monitor2"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "Accel"                 # [<bool>]
        #Option     "SWcursor"              # [<bool>]
        #Option     "EnablePageFlip"        # [<bool>]
        #Option     "SubPixelOrder"         # [<str>]
        #Option     "ZaphodHeads"           # <str>
        #Option     "AccelMethod"           # <str>
        #Option     "DRI3"                  # [<bool>]
        #Option     "DRI"                   # <i>
        #Option     "ShadowPrimary"         # [<bool>]
        #Option     "TearFree"              # [<bool>]
        #Option     "DeleteUnusedDP12Displays"  # [<bool>]
        #Option     "VariableRefresh"       # [<bool>]
    Identifier  "Card0"
    Driver      "amdgpu"
    BusID       "PCI:5:0:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

Section "Screen"
    Identifier "Screen1"
    Device     "Card1"
    Monitor    "Monitor1"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

Section "Screen"
    Identifier "Screen2"
    Device     "Card2"
    Monitor    "Monitor2"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

おすすめ記事