在我的电脑上,我有两个离散的GPU。我一直在使用VFIO将第二个GPU传递给Windows来处理一些程序。现在我想把我更强大的第一个GPU传递给Windows,以便玩一些游戏。(如果需要的话,我可以创建第二个Windows,这不是问题)。
我已经用脚本检查了第一个GPU是否有自己的IOMMU组,而且它也有。
问题是,Gnome和gdm3在正常启动或传递第二个GPU时都没有问题,但是当我传递第一个GPU时就没有问题了。
监视器会根据通过的GPU打开或关闭。
我尝试过重新启动gdm3、杀死gnome-shell、重新启动,但是它似乎对DE没有任何影响。GDM3以某种方式启动,但它刚刚获得密码并返回到用户选择菜单。
脚本的输出:(不包括不必要的东西,只是两个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 k字符,我不能在这里发布)
系统的规格:
发布于 2023-02-12 13:53:35
这个答案解决了我的问题,因为无法用第二个GPU启动Gnome。
为了进入没有活动X会话的状态,我已经启动了第一个禁用的GPU。之后,我转到tty3并运行Xorg -configure。它创建了一个配置文件,有21个卡片和屏幕(奇怪,可能是用于所有PCI It )。
在删除了除第二个GPU之外的所有其他卡后,除了前三个屏幕之外,我还将配置文件复制到/etc/X11/xorg.conf中并重新启动。
起初,当我没有禁用第一个GPU并正常引导时,我想知道这是否有效。监视器的数量发生了变化,当我使用xrandr --listproviders检查时,具有0 ID的提供者是我的第二个GPU。之后,我重新启动并禁用了第一个GPU,它启动Gnome时没有出现问题。
我的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
EndSectionhttps://unix.stackexchange.com/questions/735172
复制相似问题