升级到 Ubuntu 19.10 后,关闭并重新打开笔记本电脑盖或直接激活挂起模式后,大约需要一分钟才能出现登录屏幕。
我尝试更改显示管理器,但 gdm3 和 lightdm 的问题仍然存在。
我可以在登录窗口出现之前切换到 tty1,它会显示一个基于文本的登录屏幕,但这个屏幕没有响应(不仅仅是在我输入密码时没有出现任何内容,按回车键或任何其他键也没有任何反应,我甚至无法输入用户名)。
专有图形驱动程序和 Noveau 图形驱动程序之间进行切换没有区别。
我已经尝试了两种解决方案这里,但似乎不起作用。登录屏幕出现所需的时间并没有随着时间的推移而增加。
我有一台配备 NVIDIA 显卡(TU106M [GeForce RTX 2060 Mobile])的联想 Legion Y540。
编辑:
输出free -h
:
total used free shared buff/cache available
Mem: 15Gi 3.8Gi 3.7Gi 271Mi 8.0Gi 11Gi
Swap: 7.4Gi 0B 7.4Gi
输出sudo blkid
:
/dev/nvme0n1p4: UUID="8b3b6bcf-7b5c-4549-b08b-e33d13f6f8b0" TYPE="swap" PARTUUID="631c1b82-46a4-42ae-90ca-75f265910d3c"
/dev/nvme0n1p5: UUID="81876321-3683-408e-ad1e-48ea9b6e3c07" TYPE="ext4" PARTUUID="b244a4c0-ff1f-4ea0-a0ea-f3c4877e5631"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/nvme0n1p1: LABEL="SYSTEM_DRV" UUID="4853-74EE" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="a684ddb8-dc0e-4259-bf8b-d1b91acfc56c"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="d8d4c311-0089-43bf-85a3-28753acb89c6"
/dev/nvme0n1p3: LABEL="Windows-SSD" UUID="04E853EAE853D88E" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="432f8784-5420-44ef-a3b9-2c33421804ac"
/dev/sda1: LABEL="Secondary Drive" UUID="698496af-197c-4bb4-88a4-f1213735f78d" TYPE="ext4" PARTUUID="6063bd84-a428-464e-8fcb-e929d0d3e415"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
/dev/loop13: TYPE="squashfs"
/dev/loop14: TYPE="squashfs"
/dev/loop15: TYPE="squashfs"
/dev/loop16: TYPE="squashfs"
/dev/loop17: TYPE="squashfs"
/dev/loop18: TYPE="squashfs"
/dev/loop19: TYPE="squashfs"
/dev/loop20: TYPE="squashfs"
输出cat /etc/fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p5 during installation
UUID=81876321-3683-408e-ad1e-48ea9b6e3c07 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=4853-74EE /boot/efi vfat umask=0077 0 1
# swap was on /dev/nvme0n1p4 during installation
UUID=8b3b6bcf-7b5c-4549-b08b-e33d13f6f8b0 none swap sw 0 0
目录/etc/initramfs-tools/conf.d
为空,文件/etc/initramfs-tools/conf.d/resume
不存在。
更新
更多信息:
如果我通过关闭笔记本电脑盖子并重新打开它来触发挂起,或者如果我运行,就会发生这种情况systemctl suspend
。
如果我搜索suspend
并运行出现的内容,有时会发生其他事情。我的电脑反而会立即进入登录屏幕。登录后屏幕空白,我不得不强制重启。
/etc/initramfs-tools/conf.d/resume
移除并再次运行(并重新启动)后sudo update-initramfs -c
,打开笔记本电脑盖时我看到的内容如下:
[ 61.999380] Freezing of task failed after 20.009 seconds (1 tasks refusing to freeze, wq_busy=0):
[ 82.151659] Freezing of tasks failed after 20.0007 seconds (1 tasks refusing to freeze, wq_busy=0):
[ 85.454177] iwlwifi 0000:00:14.3: Unhandled alg: 0x71b
[ 85.454812] iwlwifi 0000:00:14.3: Unhandled alg: 0x71b
[ 85.455339] iwlwifi 0000:00:14.3: Unhandled alg: 0x71b
不同的测试中出现了各种不同的 iwlwifi 消息,我相信它们没有关联。在系统启动之前,出现了以下几行:
[ 149.082244] ucsi_ccg 0-0008: failed to reset PPM!
[ 149.082249] ucsi_ccg 0-0008: PPM init failed (-110)
[ 188.166140] PM: dpm_run_callback(): ucsi_ccg_resume+0x0/0x20 [ucsi_ccg] returns -110
[ 188.266140] PM: Device 0-0008 failed to resume: error -110
有时还会出现这样的一行:
[95.820802] wlp0s20f3: failed to remove key (5, ff:ff:ff:ff:ff:ff) from hardware (-2)
有一次测试时,从挂起状态唤醒时出现了一些奇怪的图形损坏,这似乎影响了系统使用的某些图像和字体(但不会影响任何应用程序)。这里这是屏幕截图。此状态持续到重新启动。
输出dpkg -l *nvidia*
:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================================-==========================-============-=========================================================
un libgldispatch0-nvidia <none> <none> (no description available)
ii libnvidia-cfg1-435:amd64 435.21-0ubuntu2 amd64 NVIDIA binary OpenGL/GLX configuration library
un libnvidia-cfg1-any <none> <none> (no description available)
un libnvidia-common <none> <none> (no description available)
ii libnvidia-common-435 435.21-0ubuntu2 all Shared files used by the NVIDIA libraries
ii libnvidia-cfg1-435:amd64 435.21-0ubuntu2 amd64 NVIDIA binary OpenGL/GLX configuration library
un libnvidia-cfg1-any <none> <none> (no description available)
un libnvidia-common <none> <none> (no description available)
ii libnvidia-common-435 435.21-0ubuntu2 all Shared files used by the NVIDIA libraries
rc libnvidia-compute-418:amd64 430.40-0ubuntu0~gpu19.04.2 amd64 Transitional package for libnvidia-compute-430
rc libnvidia-compute-430:amd64 430.50-0ubuntu2 amd64 NVIDIA libcompute package
ii libnvidia-compute-435:amd64 435.21-0ubuntu2 amd64 NVIDIA libcompute package
ii libnvidia-compute-435:i386 435.21-0ubuntu2 i386 NVIDIA libcompute package
un libnvidia-decode <none> <none> (no description available)
ii libnvidia-decode-435:amd64 435.21-0ubuntu2 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-435:i386 435.21-0ubuntu2 i386 NVIDIA Video Decoding runtime libraries
un libnvidia-encode <none> <none> (no description available)
ii libnvidia-encode-435:amd64 435.21-0ubuntu2 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-435:i386 435.21-0ubuntu2 i386 NVENC Video Encoding runtime library
un libnvidia-fbc1 <none> <none> (no description available)
ii libnvidia-fbc1-435:amd64 435.21-0ubuntu2 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-435:i386 435.21-0ubuntu2 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
un libnvidia-gl <none> <none> (no description available)
ii libnvidia-gl-435:amd64 435.21-0ubuntu2 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-435:i386 435.21-0ubuntu2 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
un libnvidia-ifr1 <none> <none> (no description available)
ii libnvidia-ifr1-435:amd64 435.21-0ubuntu2 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-435:i386 435.21-0ubuntu2 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
un libnvidia-ml1 <none> <none> (no description available)
un nvidia-304 <none> <none> (no description available)
un nvidia-340 <none> <none> (no description available)
un nvidia-384 <none> <none> (no description available)
un nvidia-390 <none> <none> (no description available)
un nvidia-common <none> <none> (no description available)
rc nvidia-compute-utils-430 430.50-0ubuntu2 amd64 NVIDIA compute utilities
ii nvidia-compute-utils-435 435.21-0ubuntu2 amd64 NVIDIA compute utilities
rc nvidia-dkms-430 430.50-0ubuntu2 amd64 NVIDIA DKMS package
ii nvidia-dkms-435 435.21-0ubuntu2 amd64 NVIDIA DKMS package
un nvidia-dkms-kernel <none> <none> (no description available)
ii nvidia-driver-435 435.21-0ubuntu2 amd64 NVIDIA driver metapackage
un nvidia-driver-binary <none> <none> (no description available)
un nvidia-kernel-common <none> <none> (no description available)
rc nvidia-kernel-common-430 430.50-0ubuntu2 amd64 Shared files used with the kernel module
ii nvidia-kernel-common-435 435.21-0ubuntu2 amd64 Shared files used with the kernel module
un nvidia-kernel-source <none> <none> (no description available)
un nvidia-kernel-source-430 <none> <none> (no description available)
ii nvidia-kernel-source-435 435.21-0ubuntu2 amd64 NVIDIA kernel source package
un nvidia-legacy-304xx-vdpau-driver <none> <none> (no description available)
un nvidia-legacy-340xx-vdpau-driver <none> <none> (no description available)
un nvidia-opencl-icd <none> <none> (no description available)
un nvidia-persistenced <none> <none> (no description available)
ii nvidia-prime 0.8.13 all Tools to enable NVIDIA's Prime
ii nvidia-settings 440.26-0ubuntu0~gpu19.04.1 amd64 Tool for configuring the NVIDIA graphics driver
un nvidia-settings-binary <none> <none> (no description available)
un nvidia-smi <none> <none> (no description available)
un nvidia-utils <none> <none> (no description available)
ii nvidia-utils-435 435.21-0ubuntu2 amd64 NVIDIA driver support binaries
un nvidia-vdpau-driver <none> <none> (no description available)
ii xserver-xorg-video-nvidia-435 435.21-0ubuntu2 amd64 NVIDIA binary Xorg driver
答案1
sudo -H gedit /etc/initramfs-tools/conf.d/resume
# 创建此文件
有了这个内容...
RESUME=UUID=8b3b6bcf-7b5c-4549-b08b-e33d13f6f8b0
sudo update-initramfs -c
# 创建一个新的 initramfs 文件
reboot
# 重启系统
重新测试挂起/唤醒。
答案2
经过进一步搜索,我发现了这一点:https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1850238,它描述了我的具体问题并给出了解决方法。
suspend-fix.conf
我在 中创建了一个新文件,/etc/modprobe.d
内容为blacklist ucsi_ccg
。这解决了该问题。