From: Lukas Wunner <lukas@wunner.de>
To: Florian Echtler <floe@butterbrot.org>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Subject: Re: iMac 10,1 with Ubuntu 16.04: black screen after suspend
Date: Tue, 30 May 2017 12:54:04 +0200 [thread overview]
Message-ID: <20170530105404.GA29865@wunner.de> (raw)
In-Reply-To: <1e60811b-a8ac-017c-d350-8a40e4323870@butterbrot.org>
On Tue, May 30, 2017 at 11:34:17AM +0200, Florian Echtler wrote:
> On 26.05.2017 23:03, Lukas Wunner wrote:
> > On Fri, May 26, 2017 at 02:13:29PM +0200, Florian Echtler wrote:
> >> I'm running Ubuntu 16.04.2 on a 27" unibody iMac 10,1 from 2009. However, even
> >> with the most recent HWE stack (kernel 4.8), the display stays black after
> >> suspend. I can ssh into the machine, so wakeup is OK, but the display is
> >> entirely black (backlight stays off).
> >>
> > The ATI card has MXM_PNL_PWR_EN and MXM_PNL_BL_EN pins. Those must be
> > enabled for the panel to light up. Perhaps radeon needs to be extended
> > to do that. One theory is that this is done via ACPI, but perhaps
> > only if a certain operating system is running. Dump the ACPI tables
> > and search DSDT and SSDT* tables for methods relating to the ATI card
> > and/or backlight. If you find checks for OSDW there (e.g. in _PS0,
> > i.e. on resume), it means the AML code is only executed on Darwin.
> I've already had a look at the ACPI tables; there seem to be no references to
> the "official" backlight/display control functions (no _BL? or _DO? methods).
>
> > Conversely !OSDW means the code is only executed on Windows (Boot Camp).
> > Linux masquerades as Darwin, but this can be disabled with
> > acpi_osi=!Darwin on the command line. It's worth trying if that changes
> > the behaviour. If it does, then macOS likely sets those pins on resume
> > and we need to do the same in radeon.
> There are OSDW checks present, however, booting with acpi_osi=!Darwin doesn't
> make a difference to the backlight behaviour.
So, just to confirm, if you never plug in an external DP source and the iMac
comes out of sleep, the display stays black?
If you log in via ssh and look at dmesg, was radeon able to train the DP
link again? No error messages, nothing?
Is the panel off or is it on but merely with 0% brightness?
There's a block of pins on the GPU for "system management" which contains
a bunch of GPIO, OEM and reserved pins. Three of these are used to control
the panel when it's switched to the radeon card:
pin 23 PNL_PWR_EN
pin 25 PNL_BL_EN
pin 27 PNL_BL_PWM
Basically you'd need to know what these are set to before and after sleep.
I don't know how to access them, presumably via a BAR register. A quick
look at the RV730-specific registers in drivers/gpu/drm/radeon/*.h did not
yield anything useful, but someone at AMD may be able to find this out.
Maybe these registers are supposed to be modified by the OS when coming
out of sleep, or they're modified by video BIOS but the OS has to trigger
this somehow.
HTH,
Lukas
next prev parent reply other threads:[~2017-05-30 10:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 12:13 iMac 10,1 with Ubuntu 16.04: black screen after suspend Florian Echtler
[not found] ` <30380cb3-0f26-8aea-2689-d4886879129c-H5Ww8s0cz1NjHglVgfe8mg@public.gmane.org>
2017-05-26 21:03 ` Lukas Wunner
2017-05-30 9:34 ` Florian Echtler
2017-05-30 10:54 ` Lukas Wunner [this message]
2017-05-31 8:48 ` Florian Echtler
2017-05-31 9:21 ` Lukas Wunner
2017-05-31 12:57 ` Alex Deucher
2017-06-01 8:27 ` Florian Echtler
2017-06-01 17:53 ` Alex Deucher
2017-06-02 7:35 ` Florian Echtler
2017-06-02 15:12 ` Alex Deucher
2017-06-02 16:47 ` Florian Echtler
2017-07-17 9:02 ` Lukas Wunner
2017-07-24 13:45 ` Florian Echtler
2017-07-25 5:14 ` Mario Kleiner
2017-07-25 7:53 ` Florian Echtler
2017-07-25 10:37 ` Lukas Wunner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170530105404.GA29865@wunner.de \
--to=lukas@wunner.de \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=floe@butterbrot.org \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox