Bug 42960 - Display does not work when resuming from suspend
Summary: Display does not work when resuming from suspend
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: XOrg git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
: 42999 43829 73882 77562 86133 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-15 14:40 UTC by Sandeep
Modified: 2015-02-22 02:20 UTC (History)
13 users (show)

See Also:
i915 platform:
i915 features:


Attachments
glxinfo output (24.68 KB, text/plain)
2011-11-16 20:01 UTC, Sandeep
no flags Details
dmesg output before suspending and after resuming (88.93 KB, text/plain)
2011-11-16 20:02 UTC, Sandeep
no flags Details
Output of lspci (2.12 KB, text/plain)
2012-01-11 15:48 UTC, Sandeep
no flags Details
dmesg_linux_3.13.6_after_suspend_and_resume (194.66 KB, text/plain)
2014-04-02 05:12 UTC, Sandeep
no flags Details
possible fix (931 bytes, patch)
2014-04-18 14:48 UTC, Alex Deucher
no flags Details | Splinter Review
Bisection log (2.97 KB, text/plain)
2014-12-18 10:11 UTC, leon_ti
no flags Details
possible fix (1.33 KB, patch)
2015-02-11 23:40 UTC, Alex Deucher
no flags Details | Splinter Review

Description Sandeep 2011-11-15 14:40:34 UTC
I have an ASUS K53TA laptop.

Relevant specs: AMD A6-3400M APU with integrated Radeon HD6520G and a discrete Radeon HD6650M. Both are connected through Crossfire (I think). Laptop display is though the integrated card.

Software info:
Ubuntu 11.04 64 bit using Linux 3.2-rc1 kernel from kernel.org and xorg-edgers PPA

After resuming from suspend, display does not work.
Comment 1 Sandeep 2011-11-16 20:01:12 UTC
Created attachment 53615 [details]
glxinfo output
Comment 2 Sandeep 2011-11-16 20:02:02 UTC
Created attachment 53616 [details]
dmesg output before suspending and after resuming
Comment 3 Alex Deucher 2011-11-17 06:16:06 UTC
*** Bug 42999 has been marked as a duplicate of this bug. ***
Comment 4 Sandeep 2012-01-11 15:48:03 UTC
Created attachment 55471 [details]
Output of lspci
Comment 5 interweiss 2012-01-29 14:27:57 UTC
Has any progress been made?  I am willing to test some patches...
Comment 6 interweiss 2013-03-14 18:30:45 UTC
Just a reminder, please try to fix this bug.
Comment 7 Sandeep 2014-02-18 01:24:48 UTC
I still face this problem even with the 3.14-rc2 kernel

Internal LVDS display does not work, but content still displays through external HDMI display.
Comment 8 leon_ti 2014-02-21 14:28:44 UTC
I can confirm similar behaviour for A6 "ARUBA" APU without any discrete GPU, at Samsubg NP535U3C laptop.
leon_ti@leonid-samsung:~$ uname -a
Linux leonid-samsung 3.12.0-031200-generic #201311031935 SMP Mon Nov 4 00:36:54 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Comment 9 Sandeep 2014-03-18 18:55:03 UTC
I booted Linux 3.13.6 with the drm.debug=4 parameter - it looks like the internal LVDS output is set to use a different CRTC than the HDMI output, even in clone mode.

The LVDS monitor's backlight is also off, it does not switch on at all or get enabled after suspend and resume. Only a full system restart will bring it back to life.
Comment 10 Alex Deucher 2014-03-18 19:32:33 UTC
(In reply to comment #9)
> I booted Linux 3.13.6 with the drm.debug=4 parameter - it looks like the
> internal LVDS output is set to use a different CRTC than the HDMI output,
> even in clone mode.

Neither the driver nor the vbios uses the same crtc for clones since the displays almost always require different timings even if they are the same resolution.
Comment 11 Sandeep 2014-03-20 21:50:50 UTC
I attempted to check if it was a backlight problem, following the troubleshooting steps here: https://wiki.archlinux.org/index.php/Backlight

Booting with those kernel parameters doesn't help in my case.
Comment 12 Sandeep 2014-03-20 21:53:33 UTC
Note:

Suspend and resume works fine on Windows - the laptop's LVDS display is active and working even after suspend and resume.

I remember that this problem used to occur for Catalyst as well, around version 11.5 , but it got fixed a few months afterwards, and the LVDS display was active after suspend and resume.

I haven't used Catalyst for several months, so cannot comment on whether it still works fine now.
Comment 13 Sandeep 2014-03-28 02:58:03 UTC
Is there any other information I can provide to help solve this problem?
Comment 14 Sandeep 2014-04-02 05:12:07 UTC
Created attachment 96754 [details]
dmesg_linux_3.13.6_after_suspend_and_resume

dmesg contents for Linux kernel 3.13.6

This was recorded after suspend and resume. After resume, LVDS panel is not displaying anything (backlight off). Attempts to turn it on manually (using xrandr) did not work.
Comment 15 n0000b 2014-04-03 02:24:05 UTC
Hi! i've been experiencing some similar issue.
(i posted in bug https://bugs.freedesktop.org/show_bug.cgi?id=43829.)

Have you tried with
sudo pm-suspend --quirk-test --quirk-s3-bios

because if i run this my screen is able to turn on after the resume. Can you try it?
Comment 16 Sandeep 2014-04-03 04:55:02 UTC
Yes, that worked! Suspending using 

"pm-suspend --quirk-test --quirk-s3-bios"

and the laptop LVDS panel works after resume.
Comment 17 Sandeep 2014-04-03 05:36:37 UTC
I was able to apply this workaround "permanently" by creating a config file in /etc/pm/config.d/ with the following line:

ADD_PARAMETERS="--quirk-s3-bios"

So, I have a temporary workaround, but it would be preferable to have this work out of the box.
Comment 18 n0000b 2014-04-03 07:55:15 UTC
and how we make this work with
"systemctl suspend"??

isn't pm-utils deprecated?
Comment 19 Alex Deucher 2014-04-03 20:01:06 UTC
*** Bug 43829 has been marked as a duplicate of this bug. ***
Comment 20 Sandeep 2014-04-03 20:30:54 UTC
Yes!

Adding acpi_sleep=s3_bios to kernel parmeters works. Now, on suspend and resume the laptop's LVDS panel cames back to life - no external display attached.
Comment 21 n0000b 2014-04-03 21:42:24 UTC
great! also working for me with the kernel parameters. So happy, the first time i help squash a bug :')
Now, how we make this go uptream, so it work out of the box and we can close this ticket :B
Comment 22 Swoorup 2014-04-04 03:10:06 UTC
Adding s3_bios to kernel parameters didn't work for me. The suspend just does not work anymore. Laptop wont suspend anymore.

My hardware:
Asus -K55N
Radeon HD7250G
Comment 23 SpacemanSpiff 2014-04-04 04:06:45 UTC
Works great on HP dv6z with 6755g2. thanks
Comment 24 Swoorup 2014-04-04 05:24:29 UTC
Hey guys are you able to help me out?
I have got this on kernel parameters

pcie_aspm=force acpi_osi='!Windows 2012' acpi=force acpi_enforce_resources=lax acpi_backlight=vendor acpi_sleep=s3_bios

However when I try to suspend, the laptop just wont suspend or it suspends(randomly). But when I try to wake up I have got the same issue as before: blank screen. I'd have to reboot blindly again to use the system
Comment 25 Kristian Klausen 2014-04-04 06:45:19 UTC
(In reply to comment #22)
> Adding s3_bios to kernel parameters didn't work for me. The suspend just
> does not work anymore. Laptop wont suspend anymore.
> 
> My hardware:
> Asus -K55N
> Radeon HD7250G

You can also try: acpi_sleep=s3_mode or acpi_sleep=s3_bios,s3_mode

A little info here:https://www.kernel.org/doc/Documentation/power/video.txt
Comment 26 Alex Deucher 2014-04-04 12:53:53 UTC
*** Bug 73882 has been marked as a duplicate of this bug. ***
Comment 27 Swoorup 2014-04-04 16:09:55 UTC
(In reply to comment #25)
> (In reply to comment #22)
> > Adding s3_bios to kernel parameters didn't work for me. The suspend just
> > does not work anymore. Laptop wont suspend anymore.
> > 
> > My hardware:
> > Asus -K55N
> > Radeon HD7250G
> 
> You can also try: acpi_sleep=s3_mode or acpi_sleep=s3_bios,s3_mode
> 
> A little info here:https://www.kernel.org/doc/Documentation/power/video.txt

Neither of that work. Also I am booted in UEFI mode, if that helps?
Comment 28 Sandeep 2014-04-07 01:25:50 UTC
@Swoorup: You have a lot of other kernel parameters that may be causing problems. Maybe you should remove some of them? 

Specifically: 
pcie_aspm=force
acpi_osi='!Windows 2012'
acpi=force

acpi_enforce_resources=lax (not sure what this does)
Comment 29 Alex Deucher 2014-04-07 02:06:30 UTC
Unfortunately, the "fix" is just a workaround that just calls the legacy vbios post at resume time.  This is normally disabled for KMS because it doesn't always work on all systems and also doesn't work with UEFI.
Comment 30 D 2014-04-07 18:38:48 UTC
(In reply to comment #26)
> *** Bug 73882 has been marked as a duplicate of this bug. ***

For some reason, if I use it both (s3_bios,s3_mode) as kernel parameter *and* as parameter for pm-resume, it works. Otherwise it doesn't. I had already tested the parameters only for pm-suspend without as much success before. May also be that 3.14 has improved things, though. Another system fixed.

Anyway,... thanks a lot! :)
Comment 31 SpacemanSpiff 2014-04-09 06:06:44 UTC
(In reply to comment #29)
> Unfortunately, the "fix" is just a workaround that just calls the legacy
> vbios post at resume time.  This is normally disabled for KMS because it
> doesn't always work on all systems and also doesn't work with UEFI.

Any possibility of a proper fix? Is this a bios bug? 
Workaround works on my machine but many people would probably work without using sleep as it doesnt work oob.
thanks
Comment 32 Sandeep 2014-04-10 22:30:05 UTC
I tested with 3.15-git , and it looks like the kernel parameter has no effect there - the same problem occurs again! Even with acpi_sleep=s3_bios , on suspend and resume the laptop LVDS display is blank.

Does anyone know if this was an intentional change, to remove the ability to do this?
Comment 33 Sandeep 2014-04-10 22:44:43 UTC
After poking around a bit, I found out that I can re-enable the LVDS display using KDE's display settings (which uses xrandr), so it's just that the display isn't turned on by default for some reason (even though it was being used before suspend)
Comment 34 D 2014-04-10 22:47:22 UTC
(In reply to comment #32)
> I tested with 3.15-git , and it looks like the kernel parameter has no
> effect there - the same problem occurs again! Even with acpi_sleep=s3_bios ,
> on suspend and resume the laptop LVDS display is blank.
> 
> Does anyone know if this was an intentional change, to remove the ability to
> do this?

Hi, did you check using echo mem > /sys/power/state?

Because e.g. pm-suspend resets those parameters via /proc/sys/kernel/acpi_video_flags. (Value should be 1, 2, or 3 if you have kernel parameters set)

For pm-suspend to work (e.g. *Ubuntu) you need to create a file 
/etc/pm/config.d/radeon
which contains
QUIRK_S3_BIOS="true"
QUIRK_S3_MODE="true"
Comment 35 D 2014-04-12 17:15:05 UTC
By the way: I've noticed that freeze > /sys/power/state causes the same issue, only the fix does not work. It doesn't even help to suspend and resume the computer afterwards, the display remains blank. 

Does someone have an idea on how to deal with this issue?
Comment 36 Sandeep 2014-04-14 20:52:27 UTC
When testing now, it works fine. 

When I tested previously, before suspending, I might have turned off the laptop monitor using xrandr, which is why it looked like the problem was still present.
Comment 37 Alex Deucher 2014-04-17 12:49:38 UTC
*** Bug 77562 has been marked as a duplicate of this bug. ***
Comment 38 Alex Deucher 2014-04-18 14:48:57 UTC
Created attachment 97562 [details] [review]
possible fix

Does the attached patch help?
Comment 39 Hardening 2014-04-18 23:16:52 UTC
Hi Alex, 

I have just tested the possible fix and it has no effects here. I can provide a dmesg if it is useful.
Comment 40 S. Christian Collins 2014-04-20 17:39:11 UTC
Adding the quirk lines from comment #34 worked for me.

** My System **
OS: Kubuntu 14.04 amd64 w/ KDE SC 4.13.0
PC: HP Pavilion m6-1035dx
CPU/GPU: AMD A10-4600M APU with Radeon HD 7660G Graphics
RAM: 6GB DDR3 800 MHz
Linux Kernel: 3.13.0-24-generic
Screen Resolution: 1366 x 768
Xserver: 2:1.15.1-0ubuntu2
Comment 41 D 2014-04-21 05:26:43 UTC
(In reply to comment #38)
> Does the attached patch help?

It does not fix suspend freeze for me if that's what you mean. Thanks anyway!
Comment 42 Sandeep 2014-04-21 23:18:09 UTC
Compiling, will reply when I have finished testing. I am applying it against 3.15-rc2
Comment 43 Öyvind Saether 2014-04-24 16:41:11 UTC
Resume from suspend (both RAM and disk) is broken on my system with anything later than 3.12.x (tried 3.13.x and 3.14.x).

No idea if this helps anyone, but if your radeon card breaks suspend with the latest kernels then try the 3.12.x series before ripping the card out - it may work just fine.

My card is:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850]
Comment 44 Jose P. 2014-04-24 20:09:06 UTC
I added "acpi_sleep=s3_bios" to the kernel command line, but it looks like it didn't help. I have to run pm-suspend manually...
I wish I had the means to test the patch, but for now, I can't :(
Comment 45 Alex Deucher 2014-04-25 13:55:28 UTC
(In reply to comment #43)
> Resume from suspend (both RAM and disk) is broken on my system with anything
> later than 3.12.x (tried 3.13.x and 3.14.x).

Can you bisect?
Comment 46 n0000b 2014-08-10 16:50:05 UTC
(In reply to comment #38)
> Created attachment 97562 [details] [review] [review]
> possible fix
> 
> Does the attached patch help?

tested the patch. didn't work for me
Comment 47 reverber 2014-09-13 10:05:38 UTC
With kernel 3.15 and later I got "diplay not working after suspend" again. But I find out how to work around. I had scrip on shortcut for KDE and this script made display to work. Command of script is "sleep 1; xset dpms force standby".
Comment 48 Alex Deucher 2014-09-13 16:25:59 UTC
(In reply to comment #47)
> With kernel 3.15 and later I got "diplay not working after suspend" again.
> But I find out how to work around. I had scrip on shortcut for KDE and this
> script made display to work. Command of script is "sleep 1; xset dpms force
> standby".

Can you bisect?
Comment 49 Jose P. 2014-09-16 10:49:06 UTC
(In reply to comment #47)
> With kernel 3.15 and later I got "diplay not working after suspend" again.
> But I find out how to work around. I had scrip on shortcut for KDE and this
> script made display to work. Command of script is "sleep 1; xset dpms force
> standby".
Are you using that workaround alone, or with the pm-suspend + quirks solutions (shown in comment #15 and comment #34) ?
Comment 50 SpacemanSpiff 2014-09-20 04:15:23 UTC
(In reply to comment #48)
> (In reply to comment #47)
> > With kernel 3.15 and later I got "diplay not working after suspend" again.
> > But I find out how to work around. I had scrip on shortcut for KDE and this
> > script made display to work. Command of script is "sleep 1; xset dpms force
> > standby".
> 
> Can you bisect?

3.12 does not work for me.
Comment 51 reverber 2014-09-22 04:09:48 UTC
(In reply to comment #49)
> (In reply to comment #47)
> > With kernel 3.15 and later I got "diplay not working after suspend" again.
> > But I find out how to work around. I had scrip on shortcut for KDE and this
> > script made display to work. Command of script is "sleep 1; xset dpms force
> > standby".
> Are you using that workaround alone, or with the pm-suspend + quirks
> solutions (shown in comment #15 and comment #34) ?

With quirks like in comment #34 and in grub options.
Comment 52 reverber 2014-09-22 04:21:26 UTC
(In reply to comment #48)
> (In reply to comment #47)
> > With kernel 3.15 and later I got "diplay not working after suspend" again.
> > But I find out how to work around. I had scrip on shortcut for KDE and this
> > script made display to work. Command of script is "sleep 1; xset dpms force
> > standby".
> 
> Can you bisect?

I guess I can't. I don't use any patches. I just use Xorg and Mesa from debian.
Comment 53 Markus Ilmola 2014-11-04 18:03:36 UTC
The trick given in 

https://wiki.archlinux.org/index.php/pm-utils#Display_not_powering_on_after_suspension_.28radeon.29

permanently fixes this problem on my HP Pavilion DV6.
Comment 54 Alex Deucher 2014-11-11 14:24:30 UTC
*** Bug 86133 has been marked as a duplicate of this bug. ***
Comment 55 leon_ti 2014-12-18 10:11:02 UTC
Created attachment 110977 [details]
Bisection log
Comment 56 leon_ti 2014-12-18 10:12:45 UTC
I have bisected at Samsung NP535U3C laptop, with a AMD A6 APU without external GPU.
Comment 57 Alex Deucher 2015-02-11 23:40:19 UTC
Created attachment 113380 [details] [review]
possible fix

Does this patch help?
Comment 58 n0000b 2015-02-13 01:26:51 UTC
(In reply to Alex Deucher from comment #57)
> Created attachment 113380 [details] [review] [review]
> possible fix
> 
> Does this patch help?

i tested the patch, it helps, the screen is able to recover after suspend and resume (don't need the quirks).
Comment 59 Sandeep 2015-02-13 01:34:42 UTC
I will also try the patch sometime in the next few days and will respond.
Comment 60 dennis.jansen 2015-02-13 08:40:36 UTC
Just a hint: I've noticed that my display (with quirks) only somtimes does not properly resume. (Also always from hibernation.) In both cases, it helps to suspend to ram again and resume again and the display works again.
Comment 61 Hardening 2015-02-13 17:45:14 UTC
Very nice Alex, the last patch fixes resume for me. My screen was staying black at resume since I bought my laptop and now sleeping / resume works perfectly.
Thanks.
Comment 62 leon_ti 2015-02-17 09:59:42 UTC
Seems that proposed patch works for me. Thanks a lot, Alex!
Comment 63 Alex Deucher 2015-02-17 14:43:13 UTC
fixed in:
66c2b84ba6256bc5399eed45582af9ebb3ba2c15
Comment 64 Sandeep 2015-02-22 02:20:55 UTC
Thanks a lot Alex! I've tested out the patch, and it works for me. Laptop screen is now lit up every time after suspend and resume. My laptop is moving towards perfect usability on Linux!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.