蔡池新 發表於 2024-7-20 16:39:00

Deepin 20.9在GTX 1060显卡上安装Nvidia 550.100驱动

<h1 id="1-下载对应版本的显卡驱动">1 下载对应版本的显卡驱动</h1>
<p>下载地址:</p>
<ol>
<li>https://www.nvidia.com/Download/index.aspx</li>
<li>https://www.nvidia.cn/geforce/drivers/</li>
<li>https://www.nvidia.cn/drivers/lookup/</li>
<li>https://developer.nvidia.cn/cuda-gpus</li>
<li>https://developer.nvidia.com/cudnn</li>
</ol>
<pre><code class="language-shell">wget https://cn.download.nvidia.com/XFree86/Linux-x86_64/550.100/NVIDIA-Linux-x86_64-550.100.run
</code></pre>
<h1 id="2-安装对应版本的显卡驱动">2 安装对应版本的显卡驱动</h1>
<ol>
<li>设置root用户密码并进入</li>
</ol>
<pre><code class="language-shell"># 设置root密码
sudo passwd

# 进入root用户
su root
</code></pre>
<ol start="2">
<li>重启系统进入命令行模式</li>
</ol>
<pre><code class="language-shell"># 进入tty2终端
ctrl + alt + F2

# 登录root用户
login: root
</code></pre>
<ol start="3">
<li>关闭桌面的显示服务进程</li>
</ol>
<pre><code class="language-shell">service lightdm stop
</code></pre>
<ol start="4">
<li>卸载原有的显卡驱动</li>
</ol>
<pre><code class="language-shell"># 如果是apt命令安装,通过下面命令卸载
apt update
apt purge nvidia*

# 如果使用安装包安装,通过下面命令卸载
nvidia-uninstall
</code></pre>
<ol start="5">
<li>安装新版本显卡驱动</li>
</ol>
<pre><code class="language-shell"># 安装显卡驱动
chmod +x NVIDIA-Linux-x86_64-550.100.run
./NVIDIA-Linux-x86_64-550.100.run --no-cc-version-check
</code></pre>
<pre><code class="language-txt"># 安装配置选择
1.if you plan to no longer use the NVIDIA driver, you should make sure that no X screens are configured to use the NVIDIA X driver in your X configuration file. If you used nvidia-xconfig to configure X, it may have created a backup of your original configuration. Would you like to run nvidia-xconfig --restore-original-backup to attempt restoration of the original X configuration file?

- No

2.The target kernel has CONFIG_MODULE SIG set, uhich means that it supports cryptographic signatures on kernel modules. On some systems, the kernel may refuse
to load modules uithouta valid signature from a trusted keu. This sustem also has UEFISecure Boot enabled; many distributions enforce module signature
verification on UEFI systens when Secure Boot is enabled. Would you like to sign the NVIDIA kernel module?

- Install without signing

3.Install NVIDIA'S 32-bit compatibility libraries?

- Yes

4.Would you like to register the kernel module sources uith DKMS? This uil1 allou DKMS to automatically build a ∏eu nodule, if your kernel changes.

- Yes

5. Would you like to register the kernel nodule sources uith DKMS? This uill allou DKMS to automatically build a neu module, if your kernel changes later.

- Yes

6. The initranfs will likely need to be rebuilt due to the following condition(s):
Nouveau is present in the initranfs.
Would you like to rebuild the initranfs?

- Rebuild initramfs

7. Would you like to run the nvidia-xconfig utility to autonatically update your x configuration file so that the NVIDIA X driver uill be used uhen you restart
X? Any pre- existing X configuration file uill be backed up.

- No
</code></pre>
<ol start="6">
<li>禁用通用显卡驱动</li>
</ol>
<pre><code class="language-shell"># 编写禁用配置
vim /etc/modprobe.d/blacklist-nouveau.conf

blacklist nouveau
options nouveau modeset=0

# 生效配置文件
update-initramfs -u

# 查看显卡驱动
lsmod | grep nouveau

lsmod | grep nvidia

nvidia-smi
</code></pre>
<ol start="7">
<li>启动桌面的显示服务进程</li>
</ol>
<pre><code class="language-shell">service lightdmstart

reboot
</code></pre>
<h1 id="3-安装过程可能遇到的问题">3 安装过程可能遇到的问题</h1>
<ol>
<li>开机画面显示如下命令错误,表示pcspkr设备加载错误,通过禁用pcspkr解决这个问题。</li>
</ol>
<pre><code class="language-txt">Error:Driver 'pcspkr' is already registered, aborting ......
</code></pre>
<pre><code class="language-shell"># 编写禁用配置
sudo vim /etc/modprobe.d/blacklist-pcspkr.conf

blacklist pcspkr

# 生效配置文件
sudo update-inittramfs -u
</code></pre>
<ol start="2">
<li>开机画面显示动画加载错误,可以禁用开机动画解决这个问题。</li>
</ol>
<pre><code class="language-shell"># 修改启动配置
sudo vim /etc/defual/grub

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash nomodeset”

# 生效启动配置
sudo update-grub2
</code></pre>
<ol start="3">
<li>开机画面显示命令如下错误,表示TPM加载错误,可以通过禁用TPM解决这个问题。</li>
</ol>
<pre><code class="language-txt">tpm_crb MSFT0101:00: : ACPI region does not cover the entire command/response buffer. vs fed40080 f80
</code></pre>
<pre><code class="language-txt">重启进入BIOS设置:Security Settings -&gt; firmware TPM -&gt; disable
</code></pre>
<ol start="4">
<li>系统启动后笔记本内置显示屏和外接显示屏只有一个可以显示,而另外一个无法正常显示,是因为xorg.conf配置错误,可用通过修改xorg.conf文件解决这个问题。</li>
</ol>
<pre><code class="language-shell"># 生成xorg.con文件
sudo nvidia-xconfig

# 修改xorg.conf文件
sudo vim /etc/X11/xorg.conf

# 下面的内容
Section "Device"
    Identifier   "Device0"
    Driver         "nvidia"
    VendorName   "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

# 修改为如下
Section "Device"
    Identifier   "Device0"
    VendorName   "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

# 重启显示服务进程
service lightdm restart
</code></pre>
<ol start="5">
<li>系统关机时提升如下问题,可用通过设置启动方式为手动解决这个问题。</li>
</ol>
<pre><code class="language-txt">unattended upgrades Shutdown - Stop ongoing upgrades of perform upgrades before shutdown
</code></pre>
<pre><code class="language-txt">1. 打开系统监视器-&gt;系统服务。
2. 搜索upgrade,找到unattended-upgrades。
3. 右键点击,设置启动方式-&gt;手动。
</code></pre>
<p>参考网址:</p>
<ol>
<li>deepin20.3+nvidia460.27+cuda11.2+cudnn8.1.1+anconda3.2021.11+paddle2.1.2</li>
<li>Deepin 20关机提示Unattended Upgrades Shutdown的解决方法</li>
</ol><br><br>
来源:https://www.cnblogs.com/d442130165/p/18313354
頁: [1]
查看完整版本: Deepin 20.9在GTX 1060显卡上安装Nvidia 550.100驱动