![NVIDIA RTX 3070 笔记本电脑无法在 Xubuntu 20.04 上运行](https://linux22.com/image/934482/NVIDIA%20RTX%203070%20%E7%AC%94%E8%AE%B0%E6%9C%AC%E7%94%B5%E8%84%91%E6%97%A0%E6%B3%95%E5%9C%A8%20Xubuntu%2020.04%20%E4%B8%8A%E8%BF%90%E8%A1%8C.png)
我清除了所有内容,然后从头开始重新安装了驱动程序 460。执行该操作后,grub 出现错误。但使用在 live ubuntu 上修复 grub 的工具修复了该错误。
现在启动 nvidia-smi 会出现此错误
➜ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
但
➜ dkms status
nvidia, 460.39, 5.4.0-65-generic, x86_64: installed
virtualbox, 6.1.16, 5.4.0-62-generic, x86_64: installed
virtualbox, 6.1.16, 5.4.0-65-generic, x86_64: installed
答案1
我发现这是解决方案。仔细阅读步骤,从内核更新开始。
这是该帖子的原始副本。版权请参见下面的链接。
1. Get the latest Kernel. Currently it is 5.10.14
2. Download all files from this URL https://people.freedesktop.org/~agd5f/radeon_ucode/gs/ and copy them to
/lib/firmware/amdgpu Make sure they all have the same owner and permissions like the other files in the same folder.
3. sudo wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/module.lds.S -O /usr/src/linux-headers-5.10.2-051002-generic/scripts/module.lds
4. sudo sed -i '$ d' /usr/src/linux-headers-5.10.2-051002-generic/scripts/module.lds
Make sure you put the correct kernel version instead of "5.10.2-051002"
1. sudo update-initramfs -u
2. sudo add-apt-repository ppa:graphics-drivers/ppa
3. Reboot and install the NVIDIA driver from “System → Preferences → Hardware → Additional Drivers”
确保将 amdgpu bin 文件复制到正确的内核路径,因为它会随着时间而改变,所以您最终会得到不同的数字。