我使用的是相对较新的 Dell XPS,运行的是 Ubuntu 18.04。它有一个 Intel VGA 控制器和一个 Nvidia 3D 控制器。
几天前,笔记本电脑的分辨率卡在了 960x540,所以我通过NVIDIA-Linux-x86_64-390.116.run
以下网址安装了 Nvidia 驱动程序 v390:https://www.nvidia.com/object/unix.html.(为安全 UEFI 启动而对内核模块进行签名是一次冒险)。
编辑2:我禁用了安全启动,删除了手动安装的nvidia-390,并使用
sudo add-apt-repository ppa:oibaf/graphics-drivers && sudo apt update
,然后改为sudo ubuntu-drivers-autoinstall
。这不会带来任何变化,只是nvidia kernel module
现在已加载gpu-manager.log
(如下所述)。
我禁用了 Wayland 作为 XDG_SESSION_TYPE、将 nouveau 列入黑名单等等。
昨晚我的系统成功启动,并提供了各种分辨率选项。然而,今天启动笔记本电脑时,屏幕变黑(尽管它发出了登录屏幕通常会发出的恼人声音)。
我设法按 Ctrl-Alt-F4 进入终端并稍微弄了一下,但无济于事。最后,当我在以前的内核版本上以恢复模式启动时,我能够启动 X 服务器。
编辑:重新启动进入不良状态并获取所有实际信息,现已发布在下面。
以下是一些相关命令的输出。
系统信息
$ uname -r
4.18.0-22-generic
$ lspci -k | grep -A 2 VGA
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b
Subsystem: Dell Device 087c
Kernel modules: i915
$ lspci -k | grep -A 2 3D
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)
Subsystem: Dell GP107M [GeForce GTX 1050 Ti Mobile]
Kernel driver in use: nvidia
$ lshw -c video
*-display
description: 3D controller
product: GP107M [GeForce GTX 1050 Ti 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 rom
configuration: driver=nvidia latency=0
resources: irq:145 memory:ec000000-ecffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:3000(size=128) memory:ed000000-ed07ffff
*-display UNCLAIMED
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
configuration: latency=0
resources: memory:eb000000-ebffffff memory:80000000-8fffffff ioport:4000(size=64) memory:c0000-dffff
$ lsmod | grep i915
i915 1740800 0
i2c_algo_bit 16384 1 i915
drm_kms_helper 172032 2 nvidia_drm,i915
drm 458752 5 drm_kms_helper,nvidia_drm,i915
video 45056 3 dell_wmi,dell_laptop,i915
$ lsmod | grep nvidia
nvidia_drm 40960 1
nvidia_modeset 1048576 2 nvidia_drm
nvidia 14376960 62 nvidia_modeset
ipmi_msghandler 102400 2 ipmi_devintf,nvidia
drm_kms_helper 172032 2 nvidia_drm,i915
drm 458752 5 drm_kms_helper,nvidia_drm,i915
日志
$ cat /var/log/gpu-manager.log
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/4.18.0-22-generic/updates/dkms
Looking for amdgpu modules in /lib/modules/4.18.0-22-generic/updates/dkms
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? yes ### Changed no -> yes after `ubuntu-drivers autoinstall`
Is amdgpu kernel module available? no
Vendor/Device Id: 8086:3e9b
BusID "PCI:0@0:2:0"
Is boot vga? yes
Error: can't access /sys/bus/pci/devices/0000:00:02.0/driver
The device is not bound to any driver.
Vendor/Device Id: 10de:1c8c
BusID "PCI:1@0:0:0"
Is boot vga? no
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Does it require offloading? no
last cards number = 2
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
Has the system changed? No
Intel IGP detected
Desktop system detected
or laptop with open drivers
Nothing to do
$ grep "intel" /var/log/Xorg.0.log
[ 17.851] (II) LoadModule: "intel"
[ 17.851] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[ 17.853] (II) Module intel: vendor="X.Org Foundation"
[ 17.854] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
[ 17.854] (II) intel: Driver for Intel(R) HD Graphics
[ 17.854] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[ 17.854] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[ 17.885] (II) UnloadModule: "intel"
[ 17.885] (II) Unloading intel
$ grep -i "nvidia" /var/log/Xorg.0.log
[ 17.824] (**) OutputClass "Nvidia Prime" ModulePath extended to "/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules"
[ 17.847] (II) LoadModule: "nvidia"
[ 17.847] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 17.851] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 17.911] (II) NVIDIA(0): [DRI2] VDPAU driver: nvidia
最后,精选如下dmesg | grep -i intel
:
[ 0.000000] Reserving Intel graphics memory at [mem 0x7b800000-0x7f7fffff]]
...
[ 16.776901] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[ 16.788741] snd_hda_intel 0000:00:1f.3: failed to add i915 component master (-19)
问题
出现的情况是,nvidia 驱动程序成功加载,但由于某种原因,intel 驱动程序没有与 Intel VGA 设备关联,但我不知道原因。
我如何让 Ubuntu 再次将英特尔驱动程序绑定到我的 VGA 卡?正确方向的指针将会很有帮助。
答案1
啊哈,那是因为我排nomodeset
在/etc/default/grub
队伍里
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset i915.alpha_support=1"
并且 i915 驱动程序需要能够设置模式。感谢 archlinux wiki 指出这一点:https://wiki.archlinux.org/index.php/Intel_graphics#Loading
另一方面,我现在又回到了我的最大分辨率是 960x540 的问题,但那是另一回事......