我正在努力暂停在我的桌面上工作,但systemctl suspend
都不起作用systemctl hybrid
。
然后我尝试systemd-inhibit --list --mode=block
:
WHO UID USER PID COMM WHAT WHY MODE
zyf 1000 zyf 4934 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses block
1 inhibitors listed.
所以我直接终止了该进程。但是,暂停仍然不起作用。
消息没有提及暂停。
最后我尝试了一下pm-is-supported --suspend
,但什么都没有输出。
这是我的inxi -F
输出:
System:
Host: MSI-Ubuntu2110 Kernel: 6.5.0-10-generic arch: x86_64 bits: 64
Desktop: GNOME v: 45.0 Distro: Ubuntu 23.10 (Mantic Minotaur)
Machine:
Type: Desktop System: Micro-Star product: MS-7B89 v: 1.0
serial: <superuser required>
Mobo: Micro-Star model: B450M MORTAR MAX (MS-7B89) v: 1.0
serial: <superuser required> UEFI: American Megatrends v: 2.20
date: 08/30/2019
CPU:
Info: 8-core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP cache: L2: 4 MiB
Speed (MHz): avg: 3828 min/max: N/A cores: 1: 3600 2: 3648 3: 3599 4: 4203
5: 4238 6: 4298 7: 3600 8: 3600 9: 3600 10: 3595 11: 3478 12: 4201 13: 4097
14: 4255 15: 3649 16: 3600
Graphics:
Device-1: NVIDIA TU104 [GeForce RTX 2070 SUPER] driver: nvidia v: 545.23.06
Device-2: Lite-On HP HD Camera driver: uvcvideo type: USB
Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 23.2.0 driver: X:
loaded: nvidia unloaded: fbdev,modesetting,nouveau,vesa
gpu: nvidia,nvidia-nvswitch resolution: 1920x1080
API: OpenGL v: 4.6.0 NVIDIA 545.23.06 renderer: NVIDIA GeForce RTX 2070
SUPER/PCIe/SSE2
Audio:
Device-1: NVIDIA TU104 HD Audio driver: snd_hda_intel
Device-2: AMD Starship/Matisse HD Audio driver: snd_hda_intel
API: ALSA v: k6.5.0-10-generic status: kernel-api
Server-1: PipeWire v: 0.3.79 status: active
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
driver: r8169
IF: enp34s0 state: down mac:
Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi
IF: wlp37s0 state: up mac:
IF-ID-1: br-01229312feac state: down mac:
IF-ID-2: br-8a63d4d5435d state: up speed: 10000 Mbps duplex: unknown
mac:
IF-ID-3: docker0 state: down mac:
IF-ID-4: utun state: unknown speed: 10000 Mbps duplex: full mac: N/A
IF-ID-5: veth25a8a46 state: up speed: 10000 Mbps duplex: full
mac:
IF-ID-6: veth7c267d5 state: up speed: 10000 Mbps duplex: full
mac:
IF-ID-7: veth842d78a state: up speed: 10000 Mbps duplex: full
mac:
IF-ID-8: vethc3b121b state: up speed: 10000 Mbps duplex: full
mac:
Bluetooth:
Device-1: Realtek Bluetooth Radio driver: btusb type: USB
Report: hciconfig ID: hci0 state: up address: bt-v: 5.1
Drives:
Local Storage: total: 2.68 TiB used: 460.81 GiB (16.8%)
ID-1: /dev/nvme0n1 vendor: Yangtze Memory model: ZHITAI TiPlus7100 1TB
size: 953.87 GiB
ID-2: /dev/sda vendor: Gloway model: STK960GS3-S7 size: 894.25 GiB
ID-3: /dev/sdb vendor: KIOXIA model: EXCERIA SATA SSD size: 894.25 GiB
Partition:
ID-1: / size: 147.09 GiB used: 105.8 GiB (71.9%) fs: ext4
dev: /dev/nvme0n1p5
ID-2: /boot/efi size: 399.2 MiB used: 36.1 MiB (9.0%) fs: vfat
dev: /dev/nvme0n1p1
ID-3: /home size: 462.34 GiB used: 296.66 GiB (64.2%) fs: ext4
dev: /dev/nvme0n1p7
Swap:
ID-1: swap-1 type: partition size: 32 GiB used: 0 KiB (0.0%)
dev: /dev/nvme0n1p6
Sensors:
System Temperatures: cpu: 33.0 C mobo: 33.0 C gpu: nvidia temp: 43 C
Fan Speeds (rpm): fan-1: 0 fan-2: 932 fan-3: 991 fan-4: 376 fan-5: 0
gpu: nvidia fan: 0%
Info:
Processes: 503 Uptime: 1h 0m Memory: total: 48 GiB available: 46.98 GiB
used: 7.65 GiB (16.3%) Shell: Bash inxi: 3.3.29
更新:pm-suspend
现在可以了
我尝试了一下pm-suspend
,dmesg 中出现了以下几行:
[ 4304.972923] PM: suspend entry (deep)
[ 4304.992580] printk: Suspending console(s) (use no_console_suspend to debug)
[ 4305.181498] NVRM: GPU 0000:26:00.0: PreserveVideoMemoryAllocations module parameter is set. System Power Management attempted without driver procfs suspend interface. Please refer to the 'Configuring Power Management Support' section in the driver README.
[ 4305.181502] nvidia 0000:26:00.0: PM: pci_pm_suspend(): nv_pmops_suspend+0x0/0x30 [nvidia] returns -5
[ 4305.181863] nvidia 0000:26:00.0: PM: dpm_run_callback(): pci_pm_suspend+0x0/0x1b0 returns -5
[ 4305.181870] nvidia 0000:26:00.0: PM: failed to suspend async: error -5
[ 4305.222188] PM: Some devices failed to suspend, or early wake event detected
[ 4307.412089] PM: suspend exit
然后我发现了这篇文章:https://bbs.archlinux.org/viewtopic.php?id=283875,这建议我编辑/etc/modprobe.d/nvidia-power-management.conf
并删除以下行:
options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/tmp/nvidia
重启后,pm-suspend
运行良好,但都不pm-is-supported
是systemctl suspend
。