我全新安装了 Ubuntu 22.04 LTS,并且想要安装 DisplayLink 驱动程序,以便我可以使用各种 DisplayLink 外围设备,并且我尝试了一些官方段落,但我在鼠标周围出现了一个方块,并被迫使用 nvidia 专有驱动程序( AMD 显卡也是如此)。
一段时间没有使用我的一个游戏手柄后,我连接了它,当我使用 dmesg 时,结果是:
[103344.474003] usb 1-5.1: new full-speed USB device number 47 using xhci_hcd
[103344.605410] usb 1-5.1: New USB device found, idVendor=1038, idProduct=1430, bcdDevice= 1.75
[103344.605413] usb 1-5.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[103344.605415] usb 1-5.1: Product: SteelSeries Stratus Duo
[103344.616743] input: SteelSeries Stratus Duo as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1:1.1/0003:1038:1430.004F/input/input53
[103344.616834] hid-generic 0003:1038:1430.004F: input,hidraw5: USB HID v1.11 Mouse [SteelSeries Stratus Duo] on usb-0000:00:14.0-5.1/input1
[103344.617505] hid-generic 0003:1038:1430.0050: hiddev3,hidraw6: USB HID v1.11 Device [SteelSeries Stratus Duo] on usb-0000:00:14.0-5.1/input2
[103344.644176] kauditd_printk_skb: 241 callbacks suppressed
如果我的解释正确的话,它会提供控制器鼠标驱动程序。我尝试了其他一些控制器,得到了相同的结果。控制器亮起,好像仍在连接,但我无法使用它。我在 Ubuntu 22.04 上使用 Wayland。
问题
不管我是如何到达这里的,我真的只想完全删除 nvidia 和 cuda 驱动程序并重新安装它们。但是,无论我做什么,我都无法摆脱它们。
背景
我使用的是 Ubuntu 22.04,我使用的是可用的 nvidia-535 驱动程序并成功安装了 cuda 11-8(使用此处的说明)。
现在,由于某些(对我来说)未知的原因(可能是某些更新)cuda 停止工作(即 gpu 未在稳定扩散中使用)并nvidia-smi
返回
Failed to initialize NVML: Driver/library version mismatch
NVML library version: 535.161
因此想尝试删除所有与 cuda 和 nvidia 相关的内容并重新开始,因为我知道它以前工作正常。
我努力了
sudo apt remove --purge nvidia*
回报
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'nvidia-driver-550-server' for glob 'nvidia*'
Note, selecting 'nvidia-firmware-535-535.154.05' for glob 'nvidia*'
Note, selecting 'nvidia-docker2' for glob 'nvidia*'
... [ca. 300 similar rows] ...
Package 'nvidia-egl-wayland-common' is not installed, so not removed
Note, selecting 'nvidia-settings' instead of 'nvidia-settings-binary'
Package 'nvidia-390' is not installed, so not removed
Note, selecting 'libnvtt-bin' instead of 'nvidia-texture-tools'
Package 'nvidia-libopencl1-dev' is not installed, so not removed
Package 'nvidia-current' is not installed, so not removed
Package 'nvidia-current-updates' is not installed, so not removed
Package 'nvidia-libopencl1' is not installed, so not removed
Package 'nvidia' is not installed, so not removed
... [ca. 500 similar rows] ...
Package 'nvidia-container-toolkit-base' is not installed, so not removed
Package 'nvidia-firmware-545-545.29.02' is not installed, so not removed
Package 'nvidia-firmware-550-550.40.07' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
cuda-drivers-535 : Depends: nvidia-compute-utils-535 (>= 535.129.03) but it is not going to be installed
Depends: nvidia-dkms-535 (>= 535.129.03)
Depends: nvidia-driver-535 (>= 535.129.03) but it is not going to be installed
Depends: nvidia-kernel-common-535 (>= 535.129.03) but it is not going to be installed
Depends: nvidia-kernel-source-535 (>= 535.129.03) but it is not going to be installed or
nvidia-kernel-open-535 (>= 535.129.03) but it is not going to be installed
Depends: nvidia-utils-535 (>= 535.129.03) but it is not going to be installed
Depends: nvidia-modprobe (>= 535.129.03) but it is not going to be installed
Depends: nvidia-settings (>= 535.129.03) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
- 按照建议,我尝试了:
sudo apt --fix-broken install
返回:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libsbc1 nvidia-firmware-535-535.146.02 nvidia-firmware-535-535.161.07
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
nvidia-kernel-common-535
The following packages will be upgraded:
nvidia-kernel-common-535
1 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.
2 not fully installed or removed.
Need to get 0 B/38,3 MB of archives.
After this operation, 45,1 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 256847 files and directories currently installed.)
Preparing to unpack .../nvidia-kernel-common-535_535.161.07-0ubuntu1_amd64.deb ...
Unpacking nvidia-kernel-common-535 (535.161.07-0ubuntu1) over (535.154.05-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-kernel-common-535_535.161.07-0ubuntu1_amd64.deb (--unpack)
:
trying to overwrite '/lib/firmware/nvidia/535.161.07/gsp_ga10x.bin', which is also in package nvidia-firmware-535-535.1
61.07 535.161.07-0ubuntu0.22.04.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-kernel-common-535_535.161.07-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt autoremove
给出:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
nvidia-dkms-535 : Depends: nvidia-kernel-common-535 (= 535.161.07-0ubuntu1) but 535.154.05-0ubuntu1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
sudo apt remove --purge "*cuda*"
返回:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libcuda-10.2-1' for glob '*cuda*'
Note, selecting 'libcudart.so.12' for glob '*cuda*'
... [ ca. 800 rows ] ...
Package 'libcudss0-cuda-12' is not installed, so not removed
Package 'libcudss0-dev-cuda-12' is not installed, so not removed
Package 'libcudss0-static-cuda-12' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libcublas-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libcufft-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libcufile-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libcurand-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libcusolver-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libcusparse-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libnpp-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libnvjpeg-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
nvidia-dkms-535 : Depends: nvidia-kernel-common-535 (= 535.161.07-0ubuntu1) but 535.154.05-0ubuntu1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
正如另一个问题中所述,我试图找到卸载程序:
sudo /usr/local/cuda-11.4/bin/cuda-uninstaller
但下没有cuda或nvidia目录/usr/local/
。我检查过
/etc/apt/sources.list
,没有“nvidia”或“cuda”的实例(即不cat /etc/apt/sources.list | grep nvidia
返回任何内容。按照附加问题中的说明,
sudo apt-get --purge remove "*cublas*" "cuda*" "nsight*"
返回:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'cublasmp-cuda-11' for glob '*cublas*'
Note, selecting 'cublasmp-cuda-12' for glob '*cublas*'
... [ >100 similar rows ] ...
Package 'libcublas-dev-12-4' is not installed, so not removed
Package 'nsight-compute-2024.1.0' is not installed, so not removed
Package 'nsight-systems-2023.4.4' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libcufft-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libcufile-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libcurand-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libcusolver-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libcusparse-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libnpp-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
libnvjpeg-11-8 : Depends: cuda-toolkit-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-config-common but it is not going to be installed or
cuda-cudart-11-2 but it is not installable
Depends: cuda-toolkit-11-8-config-common but it is not going to be installed
nvidia-dkms-535 : Depends: nvidia-kernel-common-535 (= 535.161.07-0ubuntu1) but 535.154.05-0ubuntu1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
总之,无论我尝试删除什么,它都不会因为未满足的依赖关系而让我删除。我尝试开始一一删除上面的最后一个软件包(例如 libcufft-11-8),但我只是得到一个非常相似的输出,再次列出其他相关的软件包。
另外,
sudo apt update
返回:
Hit:1 https://download.docker.com/linux/ubuntu focal InRelease
Hit:2 http://se.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://se.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://se.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:5 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:6 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 InRelease
Get:7 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:8 https://ppa.launchpadcontent.net/graphics-drivers/ppa/ubuntu jammy InRelease
Hit:9 https://ppa.launchpadcontent.net/qbittorrent-team/qbittorrent-stable/ubuntu jammy InRelease
Get:10 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [848 kB]
Get:11 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages [597 kB]
Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [162 kB]
Fetched 1 716 kB in 2s (1 033 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
29 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: https://download.docker.com/linux/ubuntu/dists/focal/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
并且sudo apt upgrade
不起作用:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
nvidia-dkms-535 : Depends: nvidia-kernel-common-535 (= 535.161.07-0ubuntu1) but 535.154.05-0ubuntu1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
系统详情
Ubuntu 22.04.4 LTS
内核:6.5.0-21-generic
问题
某些图形应用程序会在终端中返回此错误并拒绝运行。最近更新和升级后出现此问题
DRI driver not from this Mesa build ('23.2.1-1ubuntu3.1~22.04.2' vs '24.1~git2403020600.63d2aa~oibaf~j (git-63d2aa4 2024-03-02 jammy-oibaf-ppa)')
failed to load driver: radeonsi
DRI driver not from this Mesa build ('23.2.1-1ubuntu3.1~22.04.2' vs '24.1~git2403020600.63d2aa~oibaf~j (git-63d2aa4 2024-03-02 jammy-oibaf-ppa)')
failed to load driver: radeonsi
DRI driver not from this Mesa build ('23.2.1-1ubuntu3.1~22.04.2' vs '24.1~git2403020600.63d2aa~oibaf~j (git-63d2aa4 2024-03-02 jammy-oibaf-ppa)')
DRI driver not from this Mesa build ('23.2.1-1ubuntu3.1~22.04.2' vs '24.1~git2403020600.63d2aa~oibaf~j (git-63d2aa4 2024-03-02 jammy-oibaf-ppa)')
failed to load driver: radeonsi
DRI driver not from this Mesa build ('23.2.1-1ubuntu3.1~22.04.2' vs '24.1~git2403020600.63d2aa~oibaf~j (git-63d2aa4 2024-03-02 jammy-oibaf-ppa)')
failed to load driver: radeonsi
DRI driver not from this Mesa build ('23.2.1-1ubuntu3.1~22.04.2' vs '24.1~git2403020600.63d2aa~oibaf~j (git-63d2aa4 2024-03-02 jammy-oibaf-ppa)')
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 130
Current serial number in output stream: 131
内核:5.15.0-92-generic
窗口管理: dwm
窗口系统显示服务器:x11/xorg
我正在使用 kernals aggpu 驱动程序
的输出lshw -c video
WARNING: you should run this program as super-user.
*-display
description: VGA compatible controller
product: Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0
bus info: pci@0000:03:00.0
logical name: /dev/fb0
version: c4
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom fb
configuration: depth=32 driver=amdgpu latency=0 resolution=1920,1080
resources: irq:42 memory:c0000000-cfffffff memory:d0000000-d01fffff ioport:1000(size=256) memory:d0500000-d057ffff memory:c0000-dffff
的输出lspci -k | grep -A 3 -E "(VGA|3D)"
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] (rev c4)
Subsystem: Lenovo Picasso
Kernel driver in use: amdgpu
Kernel modules: amdgpu
的输出inxi -G
Graphics:
Device-1: AMD Picasso/Raven 2 [Radeon Vega Series / Radeon Mobile Series]
driver: amdgpu v: kernel
Device-2: Chicony Integrated Camera type: USB driver: uvcvideo
Display: server: X.Org v: 1.21.1.4 driver: X: loaded: amdgpu gpu: amdgpu
resolution: 1920x1080~60Hz
OpenGL: renderer: N/A v: N/A
我假设发生这种情况是因为我没有 OpenGL 渲染器
我尝试过的事情
- 安装最新稳定版本的 Mesa 驱动程序
- 使用
amd-install
命令安装 amd gpu 堆栈 - 卸载并重新安装 x11、xorg 和 xserver-xorg-video-amdgpu
- 安装 freeglut3-dev (OpenGL)
此后,我删除了最新版本台面驱动程序的 ppa,因为这没有解决问题。我也删除了,amdgpu-install
因为安装 amd gpu 堆栈也没有解决问题。
当我安装 amd gpu 堆栈时,一些图形应用程序(例如 glxinfo)(但不是我的窗口管理器 dwm)将返回段错误
问题
有时,应用程序感觉渲染速度很慢。我不知道多个 GPU 中的哪一个正在为该特定应用程序执行工作。我想知道哪个 GPU 正在渲染窗口或应用程序。如何在每个窗口或每个进程的基础上找到这一点?
系统信息
我的桌面在 Intel Skull Canyon NUC 上运行 Ubuntu 23.10。它在同一个芯片上包含一个奇怪的 CPU/GPU 混合体,其中包含 Intel CPU和AMD GPU。
alan@nuc:~$ lscpu | grep Model\ name
Model name: Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz
alan@nuc:~$ lspci | grep AMD
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Polaris 22 XT [Radeon RX Vega M GH] (rev c0)
我还在 Thunderbolt 外壳中配备了一个外部 GPU。
alan@nuc:~$ lspci | grep GeForce
40:00.0 VGA compatible controller: NVIDIA Corporation
TU102 [GeForce RTX 2080 Ti Rev. A] (rev a1)
我将三台 1080p 显示器连接到 NVIDIA 2080 Ti。没有显示器连接到内部 HDMI 或 DisplayPort 连接器。
alan@nuc:~$ xrandr | grep "*"
1920x1080 60.00*+ 59.99 59.94 50.00
1920x1080 60.00*+ 59.94 50.00 29.97
1920x1080 60.00*+ 59.99 59.94 50.00
我正在运行最新版本的 Nvidia 驱动程序。
alan@nuc:~$ lsmod | grep ^nvidia\
nvidia 56811520 920 nvidia_uvm,nvidia_modeset
alan@nuc:~$ modinfo nvidia | grep ^version
version: 535.161.07
alan@nuc:~$ dpkg -l nvidia-driver* | grep ^ii
ii nvidia-driver-535 535.161.07-0ubuntu0.23.10.1 amd64
NVIDIA driver metapackage
编辑:添加此内容感谢以下来自 Alistair Buxton 的答案。有趣的是,AMD GPU 是“默认”(我怀疑这不是我想要的)。
所以答案是我需要使用switcheroo launch
或使用 GNOME 应用程序启动器启动。
alan@nuc:~$ switcherooctl list
Device: 0
Name: Advanced Micro Devices, Inc. [AMD®/ATI] Polaris 22 XT [Radeon RX Vega M GH]
Default: yes
Environment: DRI_PRIME=pci-0000_01_00_0
Device: 1
Name: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti Rev. A]
Default: no
Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only
我的工作流程
我通常从 GNOME Shell 启动器中的图标或从我手动运行的 shell 脚本启动应用程序,该脚本在启动时启动我的所有桌面应用程序。但是,启动器中还有“使用集成显卡启动”的选项。
例如,这是标准的 Steam 启动器图标菜单:
问题
有时,我感觉应用程序渲染速度很慢。
重述问题
我想知道如何知道进程或窗口正在使用哪个 GPU。
很高兴听到其他意见,例如:
- 你所看到的东西
- 这是缓慢的雷电
不愿意做任何这些::)
- 使用韦兰
- 使用开源nouveau驱动程序
- 删除 NVidia GPU
我知道内核 HWE 的驱动程序每六个月更新一次,发布 LTS。但我没有找到有关 GA 内核的其他信息。
你知道这个信息吗?
谢谢。
我没有找到切换到 1920x1080 的选项,尽管 Windows 支持它。Xrandr 可以将 60Hz 的 1920x 分辨率选项添加到分辨率选择器,但是当我单击“应用”时,GPU 或内部显示器会拒绝它,并且分辨率会被强制返回到 1024x768@60Hz。
$ xrandr --verbose
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 16384 x 16384
VGA-1 connected primary 1024x768+0+0 (0x42) normal (normal left inverted right x axis y axis) 0mm x 0mm
Identifier: 0x40
Timestamp: 66227
Subpixel: unknown
Gamma: 1.0:1.0:1.0
Brightness: 1.0
Clones:
CRTC: 0
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
link-status: Good
supported: Good, Bad
CTM: 2591090 1 7737 0 2017 -2147483648 41175 -2147483648 -1154733 0 44695 -2147483648 45328 0 21316 -2147483648
3727858 1
CONNECTOR_ID: 61
supported: 61
non-desktop: 0
range: (0, 1)
1024x768 (0x42) 65.000MHz -HSync -VSync *current
h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.36KHz
v: height 768 start 771 end 777 total 806 clock 60.00Hz
800x600 (0x43) 40.000MHz +HSync +VSync
h: width 800 start 840 end 968 total 1056 skew 0 clock 37.88KHz
v: height 600 start 601 end 605 total 628 clock 60.32Hz
800x600 (0x44) 36.000MHz +HSync +VSync
h: width 800 start 824 end 896 total 1024 skew 0 clock 35.16KHz
v: height 600 start 601 end 603 total 625 clock 56.25Hz
848x480 (0x45) 33.750MHz +HSync +VSync
h: width 848 start 864 end 976 total 1088 skew 0 clock 31.02KHz
v: height 480 start 486 end 494 total 517 clock 60.00Hz
640x480 (0x46) 25.175MHz -HSync -VSync
h: width 640 start 656 end 752 total 800 skew 0 clock 31.47KHz
v: height 480 start 490 end 492 total 525 clock 59.94Hz
$ lspci -k | grep -EA3 'VGA|3D|Display'
00:02.0 VGA compatible controller: Intel Corporation 4th Generation Core Processor Family Integrated Graphics Controller (rev 06)
Subsystem: Gigabyte Technology Co., Ltd 4th Generation Core Processor Family Integrated Graphics Controller
Kernel driver in use: i915
Kernel modules: i915
- 英特尔® 酷睿™ i3-4130 CPU @ 3.40GHz × 4
- 梅萨英特尔® 高清显卡 4400 (HSW GT2)
- 内存:4GB
我正在使用 Ubunut 22.04,我想安装 nvidia 驱动程序:sudo ./cuda_12.1.0_530.30.02_linux.run
,但我首先收到警告:
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Warning: Compiler version check failed:
The major and minor number of the compiler used to
compile the kernel:
x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38
does not match the compiler used here:
cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
我已经按照此解决方案将版本更改为 12.3,当我从终端检查时,我得到 gcc/g++ 版本 12.3。
最后我得到一个错误:cc: error: unrecognized command-line option '-ftrivial-auto-var-init=zero'
,你能告诉我如何解决这个问题吗?提前致谢。
我有一台运行 Ubuntu 22.04 的 Dell R720 家庭实验室。它配备了以下 GPU:
$ nvidia-smi -L
GPU 0: Tesla P40 (UUID: GPU-ac45b921-3664-d911-5dd7-e5b8d49551c3)
GPU 1: Tesla P40 (UUID: GPU-11fdf0e4-2c22-162a-a65e-f594c9a908ae)
GPU 2: NVIDIA GeForce GT 710 (UUID: GPU-6fabed11-9de9-cd98-3220-658b45c1e7e8)
我想使用两个 P40 作为 CUDA 计算卡并让 GT 710 运行桌面环境,但我在设置 Xorg 和/或 Gnome 时遇到问题。特别是,GT 710 仅在显示器上输出壁纸,但我看不到其他任何内容:没有鼠标指针或登录窗口,并且它不响应鼠标移动或击键。像这样:
如何获得可用的桌面环境?
的输出nvidia-smi
Tue Feb 6 17:32:33 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.223.02 Driver Version: 470.223.02 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Tesla P40 On | 00000000:04:00.0 Off | Off |
| N/A 28C P8 9W / 250W | 22MiB / 24451MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
| 1 Tesla P40 On | 00000000:42:00.0 Off | Off |
| N/A 29C P8 9W / 250W | 38MiB / 24451MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
| 2 NVIDIA GeForce ... On | 00000000:44:00.0 N/A | N/A |
| 50% 31C P8 N/A / N/A | 424MiB / 2002MiB | N/A Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 97708 G /usr/lib/xorg/Xorg 22MiB |
| 1 N/A N/A 97708 G /usr/lib/xorg/Xorg 38MiB |
+-----------------------------------------------------------------------------+
内容在/etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 470.223.02
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "AutoAddGPU" "off"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Tesla P40"
BusID "PCI:4:0:0"
Option "Coolbits" "28"
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Tesla P40"
BusID "PCI:66:0:0"
Option "Coolbits" "28"
EndSection
Section "Device"
Identifier "Device2"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "NVIDIA GeForce GT 710"
BusID "PCI:68:0:0"
Option "Coolbits" "28"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device2"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
我无法将内容粘贴到~/.local/share/xorg/Xorg.0.log
此处,因为帖子限制为 30000 个字符,但您可以在 Pastebin 上看到它。
问题: 尝试更新我的 nvidia 驱动程序后,我在重新启动时陷入持续黑屏。我能够返回桌面,但现在我的显示端口连接/双显示器无法工作。只有我的单个显示器上的 HDMI 可以工作。
背景: 这件事发生在一天之内。我试图让最新的《铁拳》工作,我想我应该从 525 更新我的 nvidia 驱动程序。我最初选择了 550,但我错过了这是测试版。最初尝试安装 550,我遇到了问题,所以我运行了以下命令:
sudo apt install nvidia-driver-550 --fix-missing
进而
sudo apt install nvidia-driver-550 --fix-broken install
我不记得这个输出到底发生了什么,然后我运行了这个命令:
apt --fix-broken install
从这 3 个命令中,我删除了一些我需要的 Nvidia 依赖项(我认为),并且我在终端中生活了一段时间,甚至无法返回桌面。通过我的日志,我确实看到了这个错误,但我不知道这是否是主要错误。
RmInitAdapter
rm_init_adapter failed
nvidia-drm Failed to allocate NvKMsKapiDevice
从这里的其他帖子和 nvidia 的表格中,最终我清除了所有 Nvidia 驱动程序,断开了我的 GPU,并能够通过 HDMI 从我的主板访问我的桌面。使用“软件和更新”>“其他驱动程序”,我重新安装了多个版本,因为我一直在尝试解决我的问题,但我已经没有办法了。我安装了这3个版本:nvidia驱动元包nvidia-525,535,现在我目前使用的是545。
日志/配置信息: 操作系统:Ubuntu 22.04,带 GNOME 内核:6.5.0-15-generic(并在 6.5.0-14-generic 上尝试过)
英伟达-SMI
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.06 Driver Version: 545.29.06 CUDA Version: 12.3 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 2070 Off | 00000000:01:00.0 On | N/A |
| 0% 38C P8 3W / 175W | 496MiB / 8192MiB | 3% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 1490 G /usr/lib/xorg/Xorg 143MiB |
| 0 N/A N/A 1755 G /usr/bin/gnome-shell 70MiB |
| 0 N/A N/A 3049 G ...irefox/3728/usr/lib/firefox/firefox 187MiB |
| 0 N/A N/A 4054 G ...39692028,3432445436170888676,131072 52MiB |
| 0 N/A N/A 5373 G ...,WinRetrieveSuggestionsOnlyOnDemand 36MiB |
+---------------------------------------------------------------------------------------+
dpkg -l | grep nvidia
rc glx-alternative-nvidia 1.2.1~deb11u1 amd64 allows the selection of NVIDIA as GLX provider
ii libnvidia-cfg1-545:amd64 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-545 545.29.06-0ubuntu0.22.04.2 all Shared files used by the NVIDIA libraries
rc libnvidia-compute-450-server:amd64 450.248.02-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-470-server:amd64 470.223.02-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-510:amd64 510.73.05-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-535:amd64 535.154.05-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-545:amd64 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA libcompute package
ii libnvidia-compute-545:i386 545.29.06-0ubuntu0.22.04.2 i386 NVIDIA libcompute package
ii libnvidia-decode-545:amd64 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-545:i386 545.29.06-0ubuntu0.22.04.2 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-egl-wayland1:amd64 1:1.1.9-1.1 amd64 Wayland EGL External Platform library -- shared library
ii libnvidia-eglcore:i386 515.48.07-1 i386 NVIDIA binary EGL core libraries
ii libnvidia-encode-545:amd64 545.29.06-0ubuntu0.22.04.2 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-545:i386 545.29.06-0ubuntu0.22.04.2 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-545:amd64 545.29.06-0ubuntu0.22.04.2 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-545:amd64 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-545:i386 545.29.06-0ubuntu0.22.04.2 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-545:amd64 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-545:i386 545.29.06-0ubuntu0.22.04.2 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii linux-objects-nvidia-525-open-6.5.0-15-generic 6.5.0-15.15~22.04.1+1 amd64 Linux kernel nvidia modules for version 6.5.0-15 (objects)
ii linux-objects-nvidia-525-open-6.5.0-15-lowlatency 6.5.0-15.15.1.1~22.04.1+1 amd64 Linux kernel nvidia modules for version 6.5.0-15 (objects)
rc nvidia-compute-utils-450-server 450.248.02-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-470-server 470.223.02-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-535 535.154.05-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
ii nvidia-compute-utils-545 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA compute utilities
rc nvidia-dkms-450-server 450.248.02-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-470-server 470.223.02-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-525-open 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package (open kernel module)
rc nvidia-dkms-535 535.154.05-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-535-open 535.154.05-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package (open kernel module)
ii nvidia-dkms-545 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA DKMS package
ii nvidia-driver-545 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA driver metapackage
ii nvidia-firmware-545-545.29.06 545.29.06-0ubuntu0.22.04.2 amd64 Firmware files used by the kernel module
rc nvidia-kernel-common-450-server 450.248.02-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-470-server 470.223.02-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-525 525.147.05-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-535 535.154.05-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-common-545 545.29.06-0ubuntu0.22.04.2 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-545 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.17.1 all Tools to enable NVIDIA's Prime
ii nvidia-settings 510.47.03-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-545 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18.2 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-545 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA binary Xorg driver
Nvidia 设置确实通过 HDMI 显示我的一台显示器,但不通过显示端口显示我的其他显示器。我不知道此时该怎么做才能使我的显示端口正常工作并使双显示器再次工作。
感谢您的任何帮助。
编辑 1 我更改为内核 5.15,因为我没有意识到 6.5 需要 gcc-12。然后我再次重新清理了我的 nvidia 驱动程序,并使用 gcc-11 重新安装了 nvidia-driver-525 ,但仍然没有运气。我尝试使用 gcc-12 回到 6.5,并尝试使用 545,但没有成功。但我让事情变得更糟,因为 nvidia-smi 在 5.15 上运行时不再出现此错误,并且在 6.5 中我无法再访问桌面。
Failed to initialize NVML: Driver/library version mismatch
这是更新的 grep 搜索
dpkg -l | grep nvidia
rc glx-alternative-nvidia 1.2.1~deb11u1 amd64 allows the selection of NVIDIA as GLX provider
ii libnvidia-cfg1-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-525 525.147.05-0ubuntu0.22.04.1 all Shared files used by the NVIDIA libraries
rc libnvidia-compute-450-server:amd64 450.248.02-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-470-server:amd64 470.223.02-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-510:amd64 510.73.05-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-525:i386 525.147.05-0ubuntu0.22.04.1 i386 NVIDIA libcompute package
rc libnvidia-compute-535:amd64 535.154.05-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-545:amd64 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA libcompute package
ii libnvidia-decode-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-525:i386 525.147.05-0ubuntu0.22.04.1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-egl-wayland1:amd64 1:1.1.9-1.1 amd64 Wayland EGL External Platform library -- shared library
ii libnvidia-eglcore:i386 515.48.07-1 i386 NVIDIA binary EGL core libraries
ii libnvidia-encode-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-525:i386 525.147.05-0ubuntu0.22.04.1 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-525:i386 525.147.05-0ubuntu0.22.04.1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-525:i386 525.147.05-0ubuntu0.22.04.1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii linux-objects-nvidia-525-open-6.5.0-15-generic 6.5.0-15.15~22.04.1+1 amd64 Linux kernel nvidia modules for version 6.5.0-15 (objects)
ii linux-objects-nvidia-525-open-6.5.0-15-lowlatency 6.5.0-15.15.1.1~22.04.1+1 amd64 Linux kernel nvidia modules for version 6.5.0-15 (objects)
rc nvidia-compute-utils-450-server 450.248.02-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-470-server 470.223.02-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
ii nvidia-compute-utils-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-535 535.154.05-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-545 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA compute utilities
rc nvidia-dkms-450-server 450.248.02-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-470-server 470.223.02-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
ii nvidia-dkms-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-525-open 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package (open kernel module)
rc nvidia-dkms-535 535.154.05-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-535-open 535.154.05-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package (open kernel module)
rc nvidia-dkms-545 545.29.06-0ubuntu0.22.04.2 amd64 NVIDIA DKMS package
ii nvidia-driver-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA driver metapackage
rc nvidia-fabricmanager-535 535.154.05-0ubuntu0.22.04.1 amd64 Fabric Manager for NVSwitch based systems.
rc nvidia-kernel-common-450-server 450.248.02-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-470-server 470.223.02-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-common-525 525.147.05-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-535 535.154.05-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-545 545.29.06-0ubuntu0.22.04.2 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.17.1 all Tools to enable NVIDIA's Prime
ii nvidia-settings 510.47.03-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18.2 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA binary Xorg driver
我不知道此时应该做什么才能让 6.5 或 5.15 正常工作。