如題,我的設備型號是聯想 LegionR7000 2021,安裝了 openSUSE 20211120,內核版本爲 x86_64 Linux 5.15.2-1-default,CPU 型號是 AMD Ryzen 7 5800H with Radeon Graphics,使用的顯卡型號爲 GeForce RTX 3050 Mobile,通過 zypper 安裝了 Nvidia 的私有驅動,沒有對 nouveau 進行任何更改。安裝過程爲
zypper addrepo --refresh https://download.nvidia.com/opensuse/tumbleweed NVIDIA
zypper in x11-video-nvidiaG05
安裝后發現在執行 systemctl suspend 以後,無法恢復。具體表現是,敲擊鍵盤試圖恢復,但屏幕沒有顯示,完全無供電,類似關機狀態,但指示燈等正常顯示,無法進入 tty。
由於 sysrq 可以正常使用,所以我認爲應該是 Nvidia 驅動的問題。我查閱了資料,主要是:1.https://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/powermanagement.html
以及
https://gist.github.com/bmcbm/375f14eaa17f88756b4bdbbebbcfd029 上的腳本試圖修復。我嘗試着:
- 找到
nvidia-suspend.service
,nvidia-resume.service
這兩個單元並手動安裝它們
sudo install /usr/lib/systemd/system-sleep/nvidia /lib/systemd/system-sleep
sudo install /usr/share/nvidia /lib/systemd/system-sleep
sudo install --mode 644 /usr/lib/systemd/system/nvidia-resume.service /etc/systemd/system
sudo install --mode 644 /usr/lib/systemd/system/nvidia-hibernate.service /etc/systemd/system
- 更改/etc/modprobe.d/nvidia.conf ,添加
options nvidia NVreg_PreserveVideoMemoryAllocations=0
,由於沒有這個文件,我自行創建了它。
3 使用 dracut -f 重新生成 initramfs 鏡像。
但以上嘗試都沒有效果。使用systemctl status nvidia-suspend
顯示爲
○ nvidia-suspend.service - NVIDIA system suspend actions
Loaded: loaded (/etc/systemd/system/nvidia-suspend.service; enabled; vendor preset: disabled)
Active: inactive (dead)
由於無法進入 tty,我也無法獲取 dmesg 信息,我查看了/sys/fs/pstore/
內的殘留信息,截取了部分如下。
…(從恢復 suspend 開始,一直到 sysrq 關機爲止)
<6>[ 100.143082][ T2322] CPU14 is up
<6>[ 100.143104][ T2322] smpboot: Booting Node 0 Processor 15 APIC 0xf
<6>[ 100.143325][ T102] ACPI: _SB_.PLTF.C00F: Found 3 idle states
<6>[ 100.143778][ T2322] CPU15 is up
<6>[ 100.144834][ T2322] ACPI: PM: Waking up from system sleep state S3
<6>[ 100.145409][ T2322] ACPI: EC: interrupt unblocked
<6>[ 100.318201][ T2322] ACPI: EC: event unblocked
<4>[ 100.318719][ T122] pci 0000:00:00.2: can’t derive routing for PCI INT A
<4>[ 100.318723][ T122] pci 0000:00:00.2: PCI INT A: no GSI
<6>[ 100.396126][ T2342] nvme nvme0: 16/0/0 default/read/poll queues
<6>[ 100.574224][ T2364] usb 3-4: reset high-speed USB device number 2 using xhci_hcd
<6>[ 100.631470][ T214] ata1: SATA link down (SStatus 0 SControl 300)
<6>[ 100.631472][ T216] ata2: SATA link down (SStatus 0 SControl 300)
<6>[ 100.728861][ T2322] OOM killer enabled.
<6>[ 100.728863][ T2322] Restarting tasks … done.
<6>[ 100.730060][ T2322] video LNXVIDEO:00: Restoring backlight state
<6>[ 100.730082][ T2322] video LNXVIDEO:01: Restoring backlight state
<6>[ 100.824773][ T2322] PM: suspend exit
<6>[ 101.404561][ T908] Generic FE-GE Realtek PHY r8169-0-300:00: attached PHY driver (mii_bus:phy_addr=r8169-0-300:00, irq=MAC)
<6>[ 101.590574][ T1638] r8169 0000:03:00.0 eno1: Link is Down
<6>[ 103.095140][ T1641] Bluetooth: hci0: Device setup in 2310405 usecs
<6>[ 169.138203][ C6] sysrq: Power Off
我原來使用的是比較老的電腦,沒有出現過這樣的問題。大家要是有什麼主意希望不吝賜教