我有一台配有两张显卡的笔记本电脑:
- 英特尔
- 英伟达
我有官方的 Nvidia 驱动程序并使用 Nvidia 卡。但是,当我通过 HDMI 插入显示器时,Ubuntu 显示应用程序和 xrandr 都无法识别它:
nakrule@mordor ~ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
1920x1080 144.00*+ 60.01 59.97 59.96 60.00 59.93
1680x1050 84.94 74.89 69.88 59.95 59.88
...
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
这是该命令的输出lshw
nakrule@mordor ~ sudo lshw -C display
*-display UNCLAIMED
description: VGA compatible controller
product: GP106M [GeForce GTX 1060 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 vga_controller bus_master cap_list
configuration: latency=0
resources: memory:ac000000-acffffff memory:80000000-8fffffff memory:90000000-91ffffff ioport:3000(size=128) memory:ad000000-ad07ffff
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:154 memory:ab000000-abffffff memory:40000000-4fffffff ioport:4000(size=64) memory:c0000-dffff
我也尝试使用我的英特尔卡,但这不起作用,除非我用 删除 Nvidia 驱动程序sudo apt purge nvidia-kernel-common-390
。然后,我的所有视频端口都被检测到。但是,由于使用了英特尔 GPU,性能会差很多。我怎么还能使用 Nvidia 卡并访问视频端口?
感谢您的帮助。
答案1
更改该行options nvidia-drm modeset=1
以options nvidia-drm modeset=0
解决我的问题。要查找此设置存在于哪个文件中,请运行以下命令:
grep modeset /etc/modprobe.d/*
grep modeset /lib/modprobe.d/*