You are not logged in.

#1 2021-07-16 17:32:18

foreverts
Member
Registered: 2021-02-27
Posts: 6

Laptop can't sleep

Hello. I have similar problem as described here. Anyway, there wasn't proposed valid solution for systems with only one integrated video, but I hope to solve this problem by sharing as much information, as needed.

So, main issue is inability to send laptop (RedmiBook II) to sleep state - when manually issuing sleep from KDE power menu, screen goes off, but fan and power buttons stays on.

My kernel is 5.12.14-hardened1-1-hardened

% cat /etc/defaults/grub
# ...
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet apparmor=1 net.ifnames=0 amd_iommu=force_isolation iommu=pt lsm=lockdown,yama,apparmor mem_sleep_default=deep nowatchdog radeon.si_support=0 amdgpu.si_support=1"
GRUB_CMDLINE_LINUX="cryptdevice=/dev/nvme0n1p3:luks:allow-discards cryptkey=rootfs:/etc/cryptsetup-keys.d/cryptboot.key"
# ...
% sudo lspci -k
...
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir IOMMU
        Subsystem: Xiaomi Device 1955
...
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c2)
        Subsystem: Xiaomi Device 1955
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu
...

Log lines before sleep attempt:

Jul 16 20:01:38 laptop13 kscreenlocker_greet[15767]: Qt: Session management error: networkIdsList argument is NULL
Jul 16 20:01:39 laptop13 kscreenlocker_greet[15767]: libpng warning: iCCP: known incorrect sRGB profile
Jul 16 20:01:39 laptop13 systemd[1]: Reached target Sleep.
Jul 16 20:01:39 laptop13 systemd[1]: Starting System Suspend...
Jul 16 20:01:39 laptop13 systemd-sleep[15793]: Entering sleep state 'suspend'...
Jul 16 20:01:39 laptop13 kernel: PM: suspend entry (s2idle)
Jul 16 20:01:39 laptop13 kernel: Filesystems sync: 0.010 seconds

And manually waiting for a while (for lights and fan going off), after 4 min I decided it will never sleep, so I clicked power button to wake up my system:

Jul 16 20:05:55 laptop13 kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
Jul 16 20:05:55 laptop13 kernel: OOM killer disabled.
Jul 16 20:05:55 laptop13 kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Jul 16 20:05:55 laptop13 kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Jul 16 20:05:55 laptop13 kernel: queueing ieee80211 work while going to suspend
Jul 16 20:05:55 laptop13 kernel: queueing ieee80211 work while going to suspend
Jul 16 20:05:55 laptop13 kernel: ACPI: EC: interrupt blocked
Jul 16 20:05:55 laptop13 kernel: xhci_hcd 0000:03:00.4: refused to change power state from D0 to D3hot
Jul 16 20:05:55 laptop13 kernel: ACPI: EC: interrupt unblocked
Jul 16 20:05:55 laptop13 kernel: pci 0000:00:00.2: can't derive routing for PCI INT A
Jul 16 20:05:55 laptop13 kernel: pci 0000:00:00.2: PCI INT A: no GSI
Jul 16 20:05:55 laptop13 kernel: [drm] PCIE GART of 1024M enabled (table at 0x000000F400900000).
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: SMU is resuming...
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: dpm has been disabled
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: failed send message:      SetGfxCGPG (47)         param: 0x00000001 response 0xff
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: SMU is resumed successfully!
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power ungate SDMA!
Jul 16 20:05:55 laptop13 kernel: [drm] DMUB hardware initialized: version=0x01020008
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Failed to update WMTABLE!
Jul 16 20:05:55 laptop13 kernel: ata2: SATA link down (SStatus 0 SControl 300)
Jul 16 20:05:55 laptop13 kernel: ata1: SATA link down (SStatus 0 SControl 300)
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jul 16 20:05:55 laptop13 kernel: [drm:smu_v12_0_gfx_off_control [amdgpu]] *ERROR* disable gfxoff timeout and failed!
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Failed to disable gfxoff!
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Fail to set workload type 2
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power ungate VCN!
Jul 16 20:05:55 laptop13 kernel: [drm:amdgpu_dpm_enable_uvd [amdgpu]] *ERROR* Dpm enable uvd failed, ret = -5. 
Jul 16 20:05:55 laptop13 kernel: [drm] VCN decode and encode initialized successfully(under DPG Mode).
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power ungate JPEG!
Jul 16 20:05:55 laptop13 kernel: [drm:jpeg_v2_0_set_powergating_state [amdgpu]] *ERROR* Dpm enable jpeg failed, ret = -5. 
Jul 16 20:05:55 laptop13 kernel: [drm] JPEG decode initialized successfully.
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Jul 16 20:05:55 laptop13 kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jul 16 20:05:55 laptop13 kernel: OOM killer enabled.
Jul 16 20:05:55 laptop13 kernel: Restarting tasks ... done.
Jul 16 20:05:55 laptop13 kernel: PM: suspend exit

Issue is very strange and I have no idea why this happens. Would be grateful for any help. Thanks!

P.S. Sorry for bad English if any.

Offline

#2 2021-07-16 20:08:05

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Laptop can't sleep

The other user has "only" the renoir IGP as well - and rather fails to *wake* from sleep.
Did you try disabling dpm?
(And also: the "regular" kernel?)

Why is there the explicit "mem_sleep_default=deep"?
What's the default? What made you assume switching(?) to deep will work?

Offline

#3 2021-07-17 06:05:39

foreverts
Member
Registered: 2021-02-27
Posts: 6

Re: Laptop can't sleep

Thanks for your reply! I have tried solutions you have mentioned.

seth wrote:

Did you try disabling dpm?

Disabling dpm unfortunately doesn't solve my issue, I still have errors and laptop actually doesn't sleep (but logs say it is)

% cat /sys/module/amdgpu/parameters/dpm
0
seth wrote:

(And also: the "regular" kernel?)

I have tried booting into latest linux mainline kernel from Arch repos, but this also doesn't solve the issue and produces the same results.

seth wrote:

Why is there the explicit "mem_sleep_default=deep"?
What's the default? What made you assume switching(?) to deep will work?

I was experimenting with different sleep modes while doing my own research (but without any results), but as I see now, only one available sleep mode is s2idle, and any attempts to change it via kernel parameters are unsuccessful, so with or without this parameter nothing changes to (I have checked).

Latest logs under "sleep":

Jul 17 08:51:22 laptop13 systemd[1]: Reached target Sleep.
Jul 17 08:51:22 laptop13 systemd[1]: Starting System Suspend...
Jul 17 08:51:22 laptop13 systemd-sleep[811]: Entering sleep state 'suspend'...
Jul 17 08:51:22 laptop13 kernel: PM: suspend entry (s2idle)
Jul 17 08:52:02 laptop13 kernel: Filesystems sync: 0.006 seconds
Jul 17 08:52:02 laptop13 kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
Jul 17 08:52:02 laptop13 kernel: OOM killer disabled.
Jul 17 08:52:02 laptop13 kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Jul 17 08:52:02 laptop13 kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Jul 17 08:52:02 laptop13 kernel: [drm:amdgpu_device_ip_suspend_phase2 [amdgpu]] *ERROR* SMC failed to set mp1 state 0, -95
Jul 17 08:52:02 laptop13 kernel: ACPI: EC: interrupt blocked
Jul 17 08:52:02 laptop13 kernel: xhci_hcd 0000:03:00.3: refused to change power state from D0 to D3hot
Jul 17 08:52:02 laptop13 kernel: ACPI: EC: interrupt unblocked
Jul 17 08:52:02 laptop13 kernel: pci 0000:00:00.2: can't derive routing for PCI INT A
Jul 17 08:52:02 laptop13 kernel: pci 0000:00:00.2: PCI INT A: no GSI
Jul 17 08:52:02 laptop13 kernel: [drm] DMUB hardware initialized: version=0x01020008

Offline

#4 2021-07-17 06:59:52

seth
Member
Registered: 2012-09-03
Posts: 49,981

Offline

#5 2021-07-17 07:04:14

foreverts
Member
Registered: 2021-02-27
Posts: 6

Re: Laptop can't sleep

seth, well, I already have tried that, but something was failed at decompilation stage. Would experiment with older kernel versions...

Last edited by foreverts (2021-07-17 07:29:04)

Offline

#6 2021-07-17 13:37:59

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Laptop can't sleep

Please upload your dsdt.aml somewhere - http://ix.io/2Ngk looks trivially fixable, eg. https://forums.gentoo.org/viewtopic-t-1 … art-0.html

Offline

Board footer

Powered by FluxBB