每次我启动 cinnamon 时,我都会看到“cinnamon 当前在没有硬件加速的情况下运行,因此,您可能会观察到比正常 CPU 使用率高得多”,而且我的 nvidia 卡似乎没有做任何工作。这是我的安装过程
uname -a
Linux myhostname 5.7.0-1-amd64 #1 SMP Debian 5.7.6-1 (2020-06-24) x86_64 GNU/Linux
/etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ testing main contrib non-free
deb-src http://ftp.us.debian.org/debian/ testing main contrib non-free
deb http://security.debian.org/debian-security testing-security main contrib non-free
deb-src http://security.debian.org/debian-security testing-security main contrib non-free
$ nvidia-detect
Detected NVIDIA GPUs:
01:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 960M] [10de:139b] (rev a2)
Checking card: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
Your card is supported by all driver versions.
Your card is also supported by the Tesla 440 drivers series.
Your card is also supported by the Tesla 418 drivers series.
It is recommended to install the
nvidia-driver
package.
所以我的sudo apt install nvidia-driver
安装非常顺利,除了我必须确认的一条消息:
Conflicting nouveau kernel module loaded
The free nouveau kernel module is currently loaded and conflicts with the non-free nvidia kernel module.
The easiest way to fix this is to reboot the machine once the installation has finished.
安装后我已将 nouveau 列入黑名单:
$ cat /etc/modprobe.d/nvidia-blacklists-nouveau.conf
# You need to run "update-initramfs -u" after editing this file.
# see #580894
blacklist nouveau
重启后,有一些东西lsmod
$ lsmod | grep -i nvidia
nvidia_drm 53248 0
nvidia_modeset 1118208 1 nvidia_drm
nvidia 20717568 22 nvidia_modeset
ipmi_msghandler 73728 2 ipmi_devintf,nvidia
drm_kms_helper 249856 2 nvidia_drm,i915
drm 606208 6 drm_kms_helper,nvidia_drm,i915
从lspci
我得到
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06) (prog-if 00 [VGA controller])
对于 nvidia 卡
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
Subsystem: Dell XPS 15 9550
Flags: bus master, fast devsel, latency 0, IRQ 143, IOMMU group 1
Memory at dc000000 (32-bit, non-prefetchable) [size=16M]
Memory at b0000000 (64-bit, prefetchable) [size=256M]
Memory at c0000000 (64-bit, prefetchable) [size=32M]
I/O ports at e000 [size=128]
Expansion ROM at dd000000 [virtual] [disabled] [size=512K]
Capabilities: <access denied>
Kernel driver in use: nvidia
Kernel modules: nvidia
$ nvidia-settings --verbose
WARNING: NV-CONTROL extension not found on this Display.
ERROR: Unable to load info from any available system
搜索周围我看到很多关于使用 ubuntu 命令的参考prime-select
。有 debian 的建议吗?
答案1
似乎加载了 nouveau 驱动程序而不是非免费的 nvidia 驱动程序。在维基百科中建议您为nvidia驱动程序配置Xorg,黑名单nouveau,然后重新启动。
您应该首先检查 Xorg 是否已配置(查看/etc/X11/xorg.conf.d/20-nvidia.conf
或类似),如果未配置,请安装该nvidia-xconfig
包并使用 sudo 运行它以自动生成。 (按照建议这里)
然后,通过运行以下命令将 nouveau 列入黑名单:
sudo echo "blacklist nouveau" > /etc/modprobe.d/blacklist-nvidia-nouveau.conf
sudo echo "options nouveau modeset=0" >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf
然后重新启动。