Bug 189231 - Macbook pro 11,5 screen flicker when AC adapter plugged in
Summary: Macbook pro 11,5 screen flicker when AC adapter plugged in
Status: CLOSED WILL_NOT_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Battery (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-27 18:56 UTC by Tom B
Modified: 2016-11-29 10:59 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.8.10
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Tom B 2016-11-27 18:56:24 UTC
As of recent kernels (Sorry I don't have the exact number but at least 4.8.8) there is problem with the screen flickering on a Macbook Pro 11,5.

There's an ongoing discussion here: https://bbs.archlinux.org/viewtopic.php?id=219442 

Machine specs:

Macbook Pro 11,5 (Retina)
Intel i7 4870HQ
Radeon  M370X (radeon graphics driver, amdgpu does not seem to be supported so I couldn't see if its' a gpu driver issue)

I can record a video using a camera if it would be useful, but it looks like graphical corruption, it looks like windows are being drawn at the wrong XY coordinates on some frames, this is made worse when a window is dragged around the screen or something on the screen requires frequent repaints such as watching a video. 

This is something to do with the power connector. If the AC adapter is plugged in when the machine boots or resumes from suspend or the screen turns on the problem occurs and the flicker will happen. Removing the AC adapter does not remove the flicker, however, if the screen turns on without the AC adapter present then the AC adapter can be attached without causing the flicker issue.


I need to verify this but I think the flicker happens consistently if the laptop is in a state of "Charging" with the AC adapter plugged in, too. If it's "Charged" but the machine is suspended/resumed without the cable in then plugged in, then the flicker is gone. This may be simply that no power is actually going to the battery because it's flagged as "charged". It's certainly a power related issue.


This may also be a related issue: When the power connector is attached the laptop's temperature is very high even when idle. Without the power cable connected, the laptop will idle around 50C (as reported by sensors). With the power cable connected (regardless of whether the charge is 0% or 100%) the cpu temperature will be 60-65C. The temperature issue does not correlate with the flicker. Regardless of whether the flicker is happening, the temperature seems unusually high while the AC adapter is connected.
Comment 1 Tom B 2016-11-28 15:24:54 UTC
additional information: I can turn on/off the flicker using radeon dynamic power management:

echo battery > /sys/class/drm/card0/device/power_dpm_state

No flicker

echo performance > /sys/class/drm/card0/device/power_dpm_state

Flicker starts


By changing the power state to performance the flicker happens. Using "battery" the flicker does not so it seems to be power related but not obvious. On "balanced" dpm, the flicker sometimes happens which is probably down to the power state.

Changing the power state does not seem to affect the temperature at all. 

radeon-pci-0100
Adapter: PCI adapter
temp1:        +60.0°C  (crit = +120.0°C, hyst = +90.0°C)


Regardless of the power state the temperature is almost always exactly 60.0, sometimes it's 59.0 but there is no noticeable temperature difference between "battery" and "performance" and the clock speed does not seem to change

Regardless of power state, the output of `cat /sys/kernel/debug/dri/0/radeon_pm_info` shows:


uvd    vclk: 0 dclk: 0
power level 0    sclk: 30000 mclk: 30000 vddc: 900 vddci: 850 pcie gen: 3
Comment 2 Zhang Rui 2016-11-29 08:53:01 UTC
This is a graphics issue, please file a bug at freedesktop instead.
Comment 3 Tom B 2016-11-29 10:59:07 UTC
For reference: freedesktop bug report: https://bugs.freedesktop.org/show_bug.cgi?id=98897

Note You need to log in before you can comment on or make changes to this bug.