Ubuntu 在没有 nvidia 的情况下也能工作,但使用 nvidia 时卡在登录界面

Ubuntu 在没有 nvidia 的情况下也能工作,但使用 nvidia 时卡在登录界面

我安装了 Nvidia 显卡,Ubuntu 直到昨天都运行正常。不幸的是,它现在卡在登录屏幕上。我切换到终端模式(Ctrl+Alt+F1)并使用以下命令删除了 Nvidia 驱动程序:

sudo apt-get purge nvidia-*

成功了!但是我想使用 Nvidia 驱动程序,因此成功登录后,我从 Ubuntu 中“软件和更新”下的“附加驱动程序”安装了 Nvidia 驱动程序。重启后,它再次卡在登录屏幕上。

.Xauthority以下是文件的权限信息:

ravi@lab:~$ ls -la .X*
-rw------- 1 ravi ravi 48 Feb 20 11:43 .Xauthority
-rw------- 1 ravi ravi 48 Feb 20 11:27 .Xauthority.bak

我无法找出问题的原因。以下是 dmesg 的内容:

[    1.342426] init: plymouth-upstart-bridge main process ended, respawning
[    1.544607] Adding 16734204k swap on /dev/sda3.  Priority:-1 extents:1 across:16734204k SSFS
[    1.594473] systemd-udevd[359]: starting version 204
[    1.596107] tsc: Refined TSC clocksource calibration: 3600.032 MHz
[    1.620273] lp: driver loaded but no devices found
[    1.631667] ppdev: user-space parallel port driver
[    1.649728] wmi: Mapper loaded
[    1.651556] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[    1.681165] [drm] Initialized drm 1.1.0 20060810
[    1.690956] type=1400 audit(1550630628.420:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/sbin/dhclient" pid=487 comm="apparmor_parser"
[    1.690962] type=1400 audit(1550630628.420:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=487 comm="apparmor_parser"
[    1.690965] type=1400 audit(1550630628.420:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=487 comm="apparmor_parser"
[    1.691995] type=1400 audit(1550630628.420:5): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/sbin/dhclient" pid=493 comm="apparmor_parser"
[    1.691999] type=1400 audit(1550630628.420:6): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=493 comm="apparmor_parser"
[    1.692002] type=1400 audit(1550630628.420:7): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=493 comm="apparmor_parser"
[    1.693989] snd_hda_intel 0000:00:1f.3: irq 182 for MSI/MSI-X
[    1.768260] checking generic (d1000000 7f0000) vs hw (c0000000 10000000)
[    1.768261] checking generic (d1000000 7f0000) vs hw (d0000000 2000000)
[    1.768262] fb: conflicting fb hw usage nouveaufb vs EFI VGA - removing generic driver
[    1.768280] Console: switching to colour dummy device 80x25
[    1.768906] nouveau E[  DEVICE][0000:01:00.0] unknown chipset, 0x134000a1
[    1.768910] nouveau E[     DRM] failed to create 0x80000080, -22
[    1.769175] nouveau: probe of 0000:01:00.0 failed with error -22
[    2.019597] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro
[    2.229627] init: failsafe main process (750) killed by TERM signal
[    2.415213] Bluetooth: Core ver 2.17
[    2.415250] NET: Registered protocol family 31
[    2.415251] Bluetooth: HCI device and connection manager initialized
[    2.415255] Bluetooth: HCI socket layer initialized
[    2.415257] Bluetooth: L2CAP socket layer initialized
[    2.415259] Bluetooth: SCO socket layer initialized
[    2.418438] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.418447] Bluetooth: BNEP filters: protocol multicast
[    2.418451] Bluetooth: BNEP socket layer initialized
[    2.425587] Bluetooth: RFCOMM TTY layer initialized
[    2.425608] Bluetooth: RFCOMM socket layer initialized
[    2.425634] Bluetooth: RFCOMM ver 1.11
[    2.446701] type=1400 audit(1550630629.176:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=837 comm="apparmor_parser"
[    2.446704] type=1400 audit(1550630629.176:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cupsd" pid=837 comm="apparmor_parser"
[    2.465787] init: cups main process (842) killed by HUP signal
[    2.465817] init: cups main process ended, respawning
[    2.497078] type=1400 audit(1550630629.224:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cups-browsed" pid=916 comm="apparmor_parser"
[    2.558491] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    2.588489] init: alsa-restore main process (1031) terminated with status 19
[    2.598291] Switched to clocksource tsc

有什么解决方法吗?我猜想一些 Nvidia 配置文件需要正确清理。

答案1

问题是

[    1.768906] nouveau E[  DEVICE][0000:01:00.0] unknown chipset, 0x134000a1
[    1.768910] nouveau E[     DRM] failed to create 0x80000080, -22
[    1.769175] nouveau: probe of 0000:01:00.0 failed with error -22

您的显卡不受新驱动程序支持。这可能就是您首先安装 NVIDIA 专有驱动程序的原因。

您可以重新安装 NVIDIA 驱动程序并禁用 nouveau 驱动程序(请确保将 nouveau 列入黑名单!)或降级为类似 VGA 的驱动程序。

要将 noveau 驱动程序列入黑名单,请插入

blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off

并重新启动/etc/modprobe.d/blacklist.conf,然后安装 NVidia 驱动程序。

(最后一部分引自https://askubuntu.com/questions/481414/install-nvidia-driver-instead-of-nouveau这是我在谷歌上找到的,但我还没有尝试过)。

答案2

看来这个软件包shim-signed是罪魁祸首。因此,在删除它之后,我重新安装了 NVIDIA。我们需要重新启动 PC,它就可以正常工作了

sudo apt-get remove shim-signed
sudo apt-get install nvidia-384

我的电脑的安全启动已从 BIOS 菜单禁用。请注意,答案最初发布于这里

相关内容