VFIO GPU 패스스루로 인해 Gnome이 중단됩니다.

VFIO GPU 패스스루로 인해 Gnome이 중단됩니다.

내 컴퓨터에는 2개의 독립 GPU가 있습니다. 저는 VFIO를 사용하여 일부 프로그램의 경우 두 번째 GPU를 Windows VM에 전달했습니다. 이제 더 강력한 첫 번째 GPU를 Windows VM에 전달하여 일부 게임을 플레이하고 싶습니다. (필요한 경우 두 번째 Windows VM을 만들 수 있습니다. 문제가 되지 않습니다.)

나는 확인했다스크립트첫 번째 GPU에 자체 IOMMU 그룹이 있는 경우

문제는 Gnome DE와 gdm3가 정상적으로 부팅하거나 두 번째 GPU를 통해 부팅할 때는 문제 없이 시작되지만 첫 번째 GPU를 통해 부팅할 때는 문제 없이 시작된다는 것입니다.

통과하는 GPU에 따라 디스플레이가 켜지거나 꺼집니다.

gdm3 재시작, kill , 재부팅도 해봤 gnome-shell지만 DE 진입에는 아무런 영향이 없는 것 같습니다. GDM3가 어떻게든 시작되지만 비밀번호를 가져오고 사용자 선택 메뉴로 돌아갑니다.

스크립트 출력: (불필요한 항목 제외, GPU 2개만)

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

이 답변두 번째 GPU로 Gnome을 시작할 수 없는 문제가 수정되었습니다.

활성 X 세션이 없는 상태로 들어가기 위해 첫 번째 GPU를 비활성화한 상태로 부팅했습니다. 그 후 나는 으로 전환하여 tty3달렸습니다 Xorg -configure. 21개의 카드와 화면이 포함된 프로필을 생성합니다(이상하지만 모든 PCI ID에 대해 작동할 수도 있습니다).

두 번째 GPU를 제외한 모든 카드와 처음 3개를 제외한 모든 화면을 제거한 후 여기에 구성 파일을 복사 /etc/X11/xorg.conf하고 재부팅했습니다.

처음에는 첫 번째 GPU를 비활성화하고 정상적으로 부팅하지 않았을 때 이것이 작동하는지 확인하고 싶었습니다. 모니터 수가 변경되었고 xrandr --listproviders공급자에게 확인해 보니 ID 0이 내 두 번째 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

관련 정보