Bug 408677 - Screen sometimes comes up black from suspend when suspending with external screen connected
Summary: Screen sometimes comes up black from suspend when suspending with external sc...
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (other bugs)
Version First Reported In: 5.14.5
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-14 07:22 UTC by Ralf Jung
Modified: 2019-10-21 22:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Jung 2019-06-14 07:22:40 UTC
SUMMARY
Sometimes, when I (in quick succession) unplug the external screen and suspend my laptop by closing the lid, when I resume the laptop, the internal screen is just black.

This is a critical bug that leads to data loss because I have to hard-kill the KDE session.


STEPS TO REPRODUCE
1. Have an external screen connected and but the desktop exclusively there (so the internal screen is disabled).
2. Unplug the screen and suspend the machine in quick succession. Unfortunately I have not found a way to reproduce this.
3. Resume the machine.

OBSERVED RESULT
The internal screen comes back black.


EXPECTED RESULT
The internal screen should be enabled properly when coming back from suspend.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 10
KDE Plasma Version: 5.14.5
Qt Version: 5.11.3
KDE Frameworks Version: 5.54.0
Kernel Version: 4.19.0-5-amd64
OS Type: 64-bit

ADDITIONAL INFORMATION

Connecting an external screen to HDMI shows that the image is still on that port. But of course when I am traveling at that point, I don't usually have an external screen in my luggage...

Ctrl-Alt-Fn still switches to a normal terminal session, but switching back to X11 does not fix the issue. I can blindly unlock the screen, open a terminal and type "touch xx" to see (in the terminal) that this actually happens. But I found no way to enable the screen so far. I tried "xrandr -q".  ("xbacklight" does not work at all on my laptop so I couldn't try that.)

I have used Gnome on this laptop for a year and this has not happened a single time. Hence I think that this is an issue in KDE, not in the drivers.
Comment 1 David Edmundson 2019-06-14 10:03:13 UTC
Do you have a cursor on the black screen?

>Ctrl-Alt-Fn still switches to a normal terminal session,


Please do this and then run

DISPLAY=:0 xrandr -q

(or DISPLAY=:0 xrandr -q > someLogFile)
Comment 2 Ralf Jung 2019-06-14 10:15:00 UTC
> Do you have a cursor on the black screen?

No, if I recall correctly the screen is black as if it was just turned off. (Which is why I tried "xbacklight", I remember that helping in a similar situation several years ago on another machine. Seems like I need to figure out which command I have to use for that nowadays.)

> Please do this and then run

I will try that next time it happens.
Comment 3 Ralf Jung 2019-06-16 13:22:38 UTC
This happened again and I captured the output of "DISPLAY=:0 xrandr -q":

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
eDP-1 connected (normal left inverted right x axis y axis)
   3840x2160     60.00 +  59.98    59.97  
   3200x1800     59.96    59.94  
   2880x1620     59.96    59.97  
   2560x1600     59.99    59.97  
   2560x1440     59.99    59.99    59.96    59.95  
   2048x1536     60.00  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     60.01    59.97    59.96    59.93  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-3 disconnected (normal left inverted right x axis y axis)


I also, for the first time, managed to get the machine out of this state without restart my session, by blindly typing "xrandr --auto" on a terminal.  (Doing "DISPLAY=:0 xrandr --auto" on another terminal did not work.)
Comment 4 Nicolas Fella 2019-10-21 22:58:36 UTC
This is mostl likely fixed with https://phabricator.kde.org/R104:e47dc21a7b7824889171f01bdc4b0209c8b1fed6 in Plasma 5.17.1