Bug 208179

Summary: [amdgpu] black screen after exiting X
Product: Drivers Reporter: Shlomo (shlomo)
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Severity: normal CC: daniel, dri-devel
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.7.2,5.7.4,5.8-rc1,5.8-rc2 Tree: Mainline
Regression: Yes
Attachments: polished fix, hopefully works

Description Shlomo 2020-06-15 07:59:38 UTC
After exiting X on a virtual terminal that isn't tty1, the screen becomes all black instead of showing the text tty. Keyboard input still goes to the text tty, but I can't see what I'm typing.

After this happens, a workaround is to switch to a different virtual terminal (with Ctrl+Alt+FN) that is in text mode (not running X) and then switch back. Then the text tty is visible and works normally.

Switching to a different virtual terminal that is running X and then switching back doesn't help. The problematic virtual terminal is still all black.

My graphics card is Gigabyte Radeon RX VEGA 56 GAMING OC 8G. (amdgpu)

The bug appeared after upgrading Arch linux 5.6.15.arch1-1 to 5.7.2.arch1-1.

The first bad commit is 64914da24ea95d2b2f7017d014d74c26005d8780 (drm/fbdev-helper: don't force restores).
The previous commit e81a2557e0650ee0ce37ba14476ddb709d6daf57 is good.

When testing these two commits, I needed to cherry-pick the following fixes:
a9a3ed1eff3601b63aea4fb462d8b3b92c7c1e7e (x86: Fix early boot crash on gcc-10, third try)
e33a814e772cdc36436c8c188d8c42d019fda639 (scripts/dtc: Remove redundant YYLOC global declaration)
df6d4f9db79c1a5d6f48b59db35ccd1e9ff9adfc (x86/boot/compressed: Don't declare __force_order in kaslr_64.c)
These are needed when compiling with GCC 10 to fix compilation errors and a hang on boot.
Comment 1 Shlomo 2020-06-20 19:02:57 UTC
Arch Linux 5.7.4-arch1-1 is still bad.
Linux v5.8-rc1 is still bad.
Comment 2 Daniel Vetter 2020-06-23 14:31:51 UTC
Created attachment 289849 [details]
polished fix, hopefully works
Comment 3 Shlomo 2020-06-23 14:54:36 UTC
Yes, this fixes the bug. (tested on top of v5.8-rc2)
Comment 4 Shlomo 2020-06-29 06:48:43 UTC
Confirmed fixed in v5.8-rc3.
Comment 5 Shlomo 2020-07-03 11:02:13 UTC
Fixed in Arch linux 5.7.7-arch1-1. Thank you.