我卡在低分辨率 Nvidia 驱动程序无法工作

我卡在低分辨率 Nvidia 驱动程序无法工作

我已升级到新发行版,但无法获得旧分辨率。我已尝试了所有方法,所以我尝试了此选项,并在此询问。到目前为止,我得到的是:

sudo apt-get remove --purge nvidia-* -y

我得到:

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-modules-nvidia-515-5.15.0-48-generic : Depends: nvidia-kernel-common-515 (<= 515.65.01-1) but it is not going to be installed
                                              Depends: nvidia-kernel-common-515 (>= 515.65.01) but it is not going to be installed
 linux-modules-nvidia-515-generic : Depends: nvidia-kernel-common-515 (<= 515.65.01-1) but it is not going to be installed
                                    Depends: nvidia-kernel-common-515 (>= 515.65.01) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

xradr 给我这个:

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1024 x 768, maximum 1024 x 768
default connected primary 1024x768+0+0 0mm x 0mm
   1024x768       0.00* 
   800x600        0.00  
   640x480        0.00  

这个 lspci | grep VGA 给我这个:

01:00.0 VGA compatible controller: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] (rev a2)

我尝试了很多方法,但都没有用,我想在不格式化所有内容的情况下解决问题。

打字sudo apt --fix-broken install

我得到:

   this: `(Reading database ... 298222 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-515_515.65.01-0ubuntu0.22.04.1_amd64.deb ..
.
dpkg-query: no packages found matching libnvidia-gl-510
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/l
ibGL.so.1.distrib by nvidia-340
dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-
gl-515'
  found 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-li
nux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-515_515.65.0
1-0ubuntu0.22.04.1_amd64.deb (--unpack):
 new libnvidia-gl-515:amd64 package pre-installation script subprocess returned 
error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-515_515.65.01-0ubuntu0.22.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
`

如果我使用apt --fix-broken install

i get:`The following additional packages will be installed:
  libnvidia-gl-515
The following NEW packages will be installed:
  libnvidia-gl-515
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
17 not fully installed or removed.
Need to get 0 B/189 MB of archives.
After this operation, 383 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 298222 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-515_515.65.01-0ubuntu0.22.04.1_amd64.deb ..
.
dpkg-query: no packages found matching libnvidia-gl-510
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/l
ibGL.so.1.distrib by nvidia-340
dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-
gl-515'
  found 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-li
nux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-515_515.65.0
1-0ubuntu0.22.04.1_amd64.deb (--unpack):
 new libnvidia-gl-515:amd64 package pre-installation script subprocess returned 
error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-515_515.65.01-0ubuntu0.22.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)`

我暂时用以下方式部分解决了这个问题:

sudo apt-get remove nvidia-driver-515
dpkg -l |grep nvidia
sudo apt-get clean
sudo dpkg --configure -a
sudo apt-get update
sudo apt --fix-broken install
sudo lshw -c video

分辨率恢复了,但系统说缺少一些插件,如果我尝试加载视频,则说图腾无法启动,缺少一些插件。

答案1

我通过执行以下操作解决了这个问题:

sudo apt-get remove nvidia-driver-515
dpkg -l |grep nvidia
sudo apt-get clean
sudo dpkg --configure -a
sudo apt-get update
sudo apt --fix-broken install
sudo lshw -c video

相关内容