我最近买了一台新笔记本电脑,它集成了 AMD gpu 和专用的 Nvidia GTX gpu,我决定让它成为 Windows/Ubuntu 双启动。我正在做一些 GPU 编程,所以我想至少有一个显卡可以与 OpenCL/OpenGL 配合使用,如果可能的话,最好是 Nvidia 显卡,如果两者都能用就更好了。
当我安装 Ubuntu 时,Nvidia 驱动程序出现了一些问题,导致冻结和登录循环,但我用它修复了它prime-select intel
(我不明白命令中的“intel”是什么意思,因为我没有 intel gpu)。目前,我认为我的 amd gpu 已被检测到,因为我可以毫无问题地登录 gnome,但它没有被 OpenCl 检测到,所以我决定安装 amdgpu-pro 驱动程序。
重启后,grub 菜单后我就会卡在一个空白屏幕上。我在恢复模式下摆弄了一下(因为我之前没有接触过内核模块,所以可能在那时我破坏了一些东西,尽管我 99% 确定我没有影响 gpu 驱动程序以外的任何东西),nomodeset
在内核命令行中添加了一些内容后,我就可以继续启动到登录屏幕。现在,我的 Ubuntu 桌面环境陷入了登录循环,即使我卸载了 amdgpu-pro,但我可以正常登录 i3wm。
据我所知,我的驱动程序存在错误,使用模式设置启动时会出现空白屏幕,并且 Xorg 崩溃,这就是为什么我尝试登录 Ubuntu 时会出现登录循环。我在尝试以恢复模式启动 failsafeX 时也遇到错误。
我的 GPU:
$ sudo lshw -c video
*-display UNCLAIMED
description: 3D controller
product: GP107M [GeForce GTX 1050 Mobile]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: latency=0
resources: memory:f6000000-f6ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:f000(size=128) memory:f7000000-f707ffff
*-display UNCLAIMED
description: VGA compatible controller
product: Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0
bus info: pci@0000:04:00.0
version: c4
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi msix vga_controller bus_master cap_list
configuration: latency=0
resources: memory:e0000000-efffffff memory:f0000000-f01fffff ioport:d000(size=256) memory:f7700000-f777ffff
我尝试登录 Ubuntu 后,Xorg.0.log 中出现错误:
[ 364.970] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 364.970] (II) FBDEV: driver for framebuffer: fbdev
[ 364.970] (II) VESA: driver for VESA chipsets: vesa
[ 364.970] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[ 364.970] (EE) open /dev/dri/card0: No such file or directory
[ 364.970] (WW) Falling back to old probe method for modesetting
[ 364.970] (EE) open /dev/dri/card0: No such file or directory
[ 364.970] (II) Loading sub module "fbdevhw"
[ 364.970] (II) LoadModule: "fbdevhw"
[ 364.970] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 364.970] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 364.970] compiled for 1.19.6, module version = 0.0.2
[ 364.970] ABI class: X.Org Video Driver, version 23.0
[ 364.970] (**) FBDEV(1): claimed PCI slot 4@0:0:0
[ 364.970] (II) FBDEV(1): using default device
[ 364.970] (WW) Falling back to old probe method for vesa
[ 364.970] (EE) Screen 0 deleted because of no matching config section.
[ 364.970] (II) UnloadModule: "modesetting"
[ 364.970] (II) FBDEV(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 364.970] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
[ 364.970] (==) FBDEV(0): RGB weight 888
--
[ 364.971] (==) FBDEV(0): Backing store enabled
[ 364.971] (==) FBDEV(0): DPMS enabled
[ 364.972] (==) RandR enabled
[ 364.976] (II) SELinux: Disabled on system
[ 364.976] (II) AIGLX: Screen 0 is not DRI2 capable
[ 364.976] (EE) AIGLX: reverting to software rendering
[ 364.988] (EE) AIGLX error: amdgpu does not export required DRI extension
[ 364.988] (EE) GLX: could not load software renderer
[ 364.988] (II) GLX: no usable GL providers found for screen 0
[ 365.030] (II) config/udev: Adding input device Power Button (/dev/input/event3)
[ 365.030] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[ 365.030] (II) LoadModule: "libinput"
[ 365.030] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
Xorg.failsafe.log 中的错误:
[ 18.074] (II) Loading /usr/lib/xorg/modules/libint10.so
[ 18.074] (II) Module int10: vendor="X.Org Foundation"
[ 18.074] compiled for 1.19.6, module version = 1.0.0
[ 18.074] ABI class: X.Org Video Driver, version 23.0
[ 18.074] (II) VESA(0): initializing int10
[ 18.075] (EE) VESA(0): Cannot read int vect
[ 18.075] (II) UnloadModule: "vesa"
[ 18.075] (II) UnloadSubModule: "int10"
[ 18.075] (II) Unloading int10
[ 18.075] (II) UnloadSubModule: "vbe"
[ 18.075] (II) Unloading vbe
[ 18.075] (EE) Screen(s) found, but none have a usable configuration.
[ 18.075] (EE)
Fatal server error:
[ 18.075] (EE) no screens found(EE)
[ 18.075] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 18.075] (EE) Please also check the log file at "/var/log/Xorg.failsafe.log" for additional information.
[ 18.075] (EE)
[ 18.086] (EE) Server terminated with error (1). Closing log file.
我还在 syslog 和 dmesg 中发现了一些与 gpu 相关的错误,但我不确定哪些是相关的,哪些不相关。
有人知道我下一步该做什么吗?我有点不知所措。
提前致谢。