You are not logged in.

#1 2020-11-16 15:57:19

Blåklinten
Member
From: Gothenburg
Registered: 2017-12-29
Posts: 9

[Solved] Lenovo Yoga freezes on suspend

Hi,

History

My Lenovo Yoga 530-14ARR has been running Manjaro for some time but I've had problems with the "suspend"-functionality.
The laptop worked fine for a couple of weeks but started to freeze on every fourth or fifth "suspend", which was very annoying.
I looked around but could not find anything obvious (tried booting with different command-line parameters and different configs but nothing fixed the issue.
I installed Arch, thinking it might solve the issue but on Arch the problem was instantly present on a fresh install.
I then tried installing Fedora and after a week or two the same thing happened there, it started to freeze when I tried to suspend the laptop.
I moved on to Linux Mint and a week into that I decided to try Arch, again (and this time ask you guys for help smile ).

The problem

On Arch the problem occurs instantly, i.e. when running `systemctl suspend` on a fresh install the system always freezes and I need to reboot.
I have tried following the solutions in this topic since it seems to be the same issue but it only resulted in my laptop not finding a screen and so I could not start X at all.
By reading, I have started to believe this is problem with the amdgpu driver, somehow and i am starting to loose hope.

What I am looking for

I need inspiration!
What might be the cause of this?
To me, it feels like a timing issue of sorts, i.e. the kernel and drivers are not getting along.
But how can it work (for some time, at least) on other distros then? 
How can I debug this issue further?
I have tried reading/following these steps, without much success (I am not really sure in how to interpret the results).

Does anyone here have a suggestion on what I might do next?
It would really feel like a loss to leave this unsolved.
Thanks,
/L

Last edited by Blåklinten (2021-03-03 20:45:42)

Offline

#2 2020-11-16 16:03:14

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [Solved] Lenovo Yoga freezes on suspend

Post info, hardware information and graphical setup.
Otherwise it's shooting in the dark.

More importantly, what have you done with your system thus far?


My reposSome snippets

Heisenberg might have been here.

Offline

#3 2020-11-17 15:58:41

Blåklinten
Member
From: Gothenburg
Registered: 2017-12-29
Posts: 9

Re: [Solved] Lenovo Yoga freezes on suspend

My system is a Lenovo Yoga 530-14ARR (AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx).
The output of `lspci -k`:

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.7 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter
02:00.0 Non-Volatile memory controller: Sandisk Corp Device 5005 (rev 01)
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c3)
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller
03:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
03:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
03:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
03:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor
03:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
03:00.7 Non-VGA unclassified device: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver 

I have no special graphical setup, mostly just the laptop screen but sometimes I also use an external HDMI-screen (do you mean something else but what screens I am using?).

At the moment I am running a vanilla Arch install with additions such as the GNOME-desktop environment (have also used Bspwm with the same result), Firefox, Git, GNUpg, OpenSSH among others. No display manager, I am manually starting X upon login.
I have tried adding the command line option "amd_iommu=off", this had no effect as far as I could tell.
Also tried adding amdgpu to MODULES in /etc/mkinitcpio.conf and created the configuration file `/etc/X11/xorg.conf.d/20-amdgpu.conf` as

Section "Device"
        Identifier "AMDGPU"
        Driver "amdgpu"
        Option "DRI" "3"
        Option "TearFree" "true"
EndSection

which resulted in X not starting, due to X not being able to any monitor.

I have tried downgrading the kernel to version 5.6.11 by means of the Arch Linux Archive (adding a server directive to /etc/pacman.conf and disabling integrity checks) but have not been able to succeed with this, I am getting package conflicts and I do not know how to resolve them.

As of now my system will freeze (i.e. keyboard backlight and power light still on but black screen, no SSH access and it is not possible to switch to another tty) if it is allowed to enter sleep/timeout/suspend.
Here are the output from `journalctl` regarding the last time the computer sat unused until it suspended;

Nov 17 15:54:54 Lenny tracker-miner-f[865]: Running on battery
Nov 17 15:55:20 Lenny tracker-miner-f[865]: Running on AC power
Nov 17 16:10:32 Lenny gnome-session[505]: gnome-session-binary[505]: WARNING: Could not get session path for session. Check that logind is properly installed and pam_systemd is getting used at login.
Nov 17 16:10:32 Lenny gnome-session-binary[505]: WARNING: Could not get session path for session. Check that logind is properly installed and pam_systemd is getting used at login.
Nov 17 16:25:32 Lenny gnome-shell[2169]: An active wireless connection, in infrastructure mode, involves no access point?
-- Reboot --

Hope this information helps, if more is needed just let me know.

Offline

#4 2020-12-07 11:38:58

Blåklinten
Member
From: Gothenburg
Registered: 2017-12-29
Posts: 9

Re: [Solved] Lenovo Yoga freezes on suspend

[Update]
I have done some more digging and debugging and found that it is probably a kernel bug.

It seems as if any kernel prior to 5.8 works but 5.8 and newer does not.

I have therefore, by using `git bisect`, found  this commit that seems to be the root cause of my problem.
When manually reverting this commit on a kernel which prior to patching did not work, i.e. suspending made the computer freeze, the patched version works just fine.

I have started a conversation with the maintainer of the iommu subsystem to further investigate a possible fix to this issue.

/L

Offline

#5 2021-01-08 18:12:50

mlaggner
Member
Registered: 2021-01-08
Posts: 1

Re: [Solved] Lenovo Yoga freezes on suspend

are there any news on this? I've just set up my yoga with the latest ubuntu, but kernel 5.8 and 5.10 refuse to suspend.. only kernel 5.6 works

Offline

#6 2021-01-11 12:07:13

Blåklinten
Member
From: Gothenburg
Registered: 2017-12-29
Posts: 9

Re: [Solved] Lenovo Yoga freezes on suspend

No news yet. I am waiting for a response from the lead developer of the amd/IOMMU module and apparently he has been ill or otherwise not capable to work for some time. I have also tried CC:ing his temporary replacement but no response there either.

My fix to this, until a more permanent solution exists, is to manually compile my kernel after adding a patch that reverts the before-mentioned commit. This seems to work  for me, at least at kernel 5.8.

/L

Offline

#7 2021-03-03 20:03:26

rickiewars
Member
Registered: 2021-03-03
Posts: 1

Re: [Solved] Lenovo Yoga freezes on suspend

Hi Blåklinten,

I've also responded on your post on https://forum.manjaro.org/t/suspend-wor … es/38897/2
but just in case someone stumbles on the same problem and finds this post, the bug has been fixed in the recently released kernel version 5.11.
At least, after trying that kernel version, my Lenovo Yoga 530-14ARR didn't freeze in the suspend sequence and restored the session after a key-press.

Kind regards!

Offline

#8 2021-03-03 20:41:10

Blåklinten
Member
From: Gothenburg
Registered: 2017-12-29
Posts: 9

Re: [Solved] Lenovo Yoga freezes on suspend

Thank you for the information rickiewars, I checked it out and kernel 5.11 works for me too!

I also noticed someone else had filed the exact same bug as me but had been more successful in reaching the maintainer. I have still not yet received any answer to my bug report but hey, at least the bug is now fixed.

/L

Offline

Board footer

Powered by FluxBB