iMac 10,1 with Ubuntu 16.04: black screen after suspend

Lukas Wunner lukas at wunner.de
Fri May 26 21:03:40 UTC 2017


[cc += dri-devel, amd-gfx]

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).
> 
> Note: this appears to be entirely unrelated to the TDM stuff I posted about
> earlier. Interestingly, when I enable TDM, even after suspend, the display works
> while TDM is active. Once I disable TDM, it's back to black (unintentional song
> reference there).

Sounds like a radeon issue to me.

The LCD_PANEL_PWR and LCD_BKL_ON_MUX pins are coming from a mux.

In TDM mode, the pins are muxed to the SMC, so it can turn the panel on
and off.  If TDM is not in use, the pins are muxed to the ATI card.

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.
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.

HTH,

Lukas

> 
> I've noted that in /sys/class/backlight, there are two different control
> interfaces, apple_backlight and radeon_bl0. Before suspend, I can control the
> screen brightness from system settings, even if only one of them is loaded, so
> both brightness interfaces work.
> 
> What I've already tried without success:
> 
> - Blindly switching to the console and back.
> - Calling DISPLAY=:0.0 xrandr --output eDP1 --auto via ssh.
> - Restarting X via ssh.
> - Blacklist apple_bl on the kernel cmdline (modprobe.blacklist=apple_bl).
> - Disabling the radeon backlight on the kernel cmdline (radeon.backlight=0).
> - Using radeontool to turn the backlight back on after suspend.
> - Directly using the interface in /sys/class/backlight/ to turn it back on.
> 
> I'm starting to run out of ideas... any hints?
> 
> Regards, Florian
> -- 
> SENT FROM MY DEC VT50 TERMINAL


More information about the amd-gfx mailing list