You are not logged in.

#1 2022-08-15 18:39:09

Wild Penguin
Member
Registered: 2015-03-19
Posts: 321

Virtual consoles frozen after S3/S4 [amdgpu] [SOLVED]

Hi,

I've noticed that after suspend (or hibernate) all virtual consoles (CTRL+ALT+F[X]) are frozen and hence, nearly unusable. More specifically, they seem to display whatever was on the last VC shown (typically tty2) before suspend/hibernate. I can do anything blindly (such as log in and run commands I know should do something I can detect, such as eject the DVD drive tray).

The X.org sessions seems to work without issues, but obviously it would be nice to sometimes be able to use the virtual consoles after hibernation, too.

The system has an RX Vega64, and I'm currently on zen branch of the Kernel. I will test if I can recreate this on other branches.

$ uname -a
Linux ArkkiVille 5.18.16-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Wed, 03 Aug 2022 11:25:10 +0000 x86_64 GNU/Linux

(updating as I'm writing this)

I can not spot anything peculiar in the journal or kernel log after a suspend, though I have no idea what to look for. Here is the latest output of just grepping for 'amdgpu' over a hibernation:

Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: BACO reset
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring page0 uses VM inv eng 1 on hub 1
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring sdma1 uses VM inv eng 4 on hub 1
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring page1 uses VM inv eng 5 on hub 1
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring uvd_0 uses VM inv eng 6 on hub 1
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring uvd_enc_0.0 uses VM inv eng 7 on hub 1
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring uvd_enc_0.1 uses VM inv eng 8 on hub 1
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring vce0 uses VM inv eng 9 on hub 1
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring vce1 uses VM inv eng 10 on hub 1
Aug 15 03:00:48 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring vce2 uses VM inv eng 11 on hub 1
Aug 15 03:06:49 ArkkiVille sensord[1269]: Chip: amdgpu-pci-2d00
Aug 15 03:36:49 ArkkiVille sensord[1269]: Chip: amdgpu-pci-2d00
Aug 15 04:06:51 ArkkiVille sensord[1269]: Chip: amdgpu-pci-2d00
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: BACO reset
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring page0 uses VM inv eng 1 on hub 1
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring sdma1 uses VM inv eng 4 on hub 1
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring page1 uses VM inv eng 5 on hub 1
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring uvd_0 uses VM inv eng 6 on hub 1
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring uvd_enc_0.0 uses VM inv eng 7 on hub 1
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring uvd_enc_0.1 uses VM inv eng 8 on hub 1
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring vce0 uses VM inv eng 9 on hub 1
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring vce1 uses VM inv eng 10 on hub 1
Aug 15 21:04:02 ArkkiVille kernel: amdgpu 0000:2d:00.0: amdgpu: ring vce2 uses VM inv eng 11 on hub 1
Aug 15 21:10:02 ArkkiVille sensord[1269]: Chip: amdgpu-pci-2d00

A full kernel log of recent boot is here.

Cheers!

Last edited by Wild Penguin (2022-09-05 08:52:11)

Offline

#2 2022-08-15 20:24:33

juftuf
Member
Registered: 2022-08-15
Posts: 2

Re: Virtual consoles frozen after S3/S4 [amdgpu] [SOLVED]

I've been digging this up as well. So far what I've found out is that it's most probably amdgpu related.

I've found out that my old 5.15.59 lts and 5.18.6-2 kernels works just fine and problem starts around 5.18.15 - till the latest 5.19.1-2.

It happens on x11 & Wayland, after lock & suspend screen freezes when switching to other tty. You can still log in to the freezed ttys and insert commands normally. (Noticed by login in via SSH and typed "w" too see active user shells) Does happen on GCC and clang compiled kernels, on stock repo kernel and on custom kernels.

Suspend and lock separated works correctly, but when run together it freezes other ttys. At least on wayland swaylock, waylock and gtklock behave the same and on x11 lightlocker. Result is the same either run by lock & suspend script or systemd hook.

I'll check my logs tomorrow.

Offline

#3 2022-08-16 22:00:38

Anthony Wilson
Member
Registered: 2020-10-15
Posts: 38

Re: Virtual consoles frozen after S3/S4 [amdgpu] [SOLVED]

I've been experiencing a very similar issue on my laptop, though as far as I'm aware, the TTYs freeze after a random amount of time instead of after suspend/hibernation.
I have my own thread on the forums discussing the issue: https://bbs.archlinux.org/viewtopic.php?pid=2051906.

As I explained in more detail on my forum thread, I believe the issue began in 5.18.13 (possibly a little bit later), though it's very challenging for me to reliably test anything because I usually need to wait hours before anything happens.

Offline

#4 2022-08-17 04:17:20

juftuf
Member
Registered: 2022-08-15
Posts: 2

Re: Virtual consoles frozen after S3/S4 [amdgpu] [SOLVED]

Went through multiple crash logs but nothing obvious there. My assumption of the starting point of the behaviour wasn't exact, just happened to have those kernels compiled.

My steps to reproduce the issue: Manually run lock + suspend from graphical session.

yourlockscreenapp; systemctl suspend

My machine:
CPU: AMD Ryzen 5900x
GPU: AMD Radeon RX 6900xt
Shell: ZSH
"DE": Launching wl-compositor/x11session from tty, no display/login managers.

Edit:
Issue seems to be same on these topics, going to test the 5.19.2 with the patch to see if its fixed.
https://gitlab.freedesktop.org/drm/amd/-/issues/2124
https://gitlab.freedesktop.org/drm/amd/-/issues/2119
https://patchwork.freedesktop.org/patch/496898/

Edit2: Can confirm, patch https://patchwork.freedesktop.org/patch/496898/ fixes the issue with freezing tty's.

Last edited by juftuf (2022-08-17 19:13:01)

Offline

#5 2022-08-18 13:29:18

Wild Penguin
Member
Registered: 2015-03-19
Posts: 321

Re: Virtual consoles frozen after S3/S4 [amdgpu] [SOLVED]

Hmm, so a patch is coming, guess we need to wait until it trickles into Arch.

Marking thread as solved!

EDIT: Seems thee patch is "in" now, as this is fixed at least on my setup...

Last edited by Wild Penguin (2022-09-05 08:52:46)

Offline

Board footer

Powered by FluxBB