You are not logged in.

#1 2016-11-12 09:44:23

m3thodic
Member
Registered: 2004-08-24
Posts: 67

Flickering with gnome 3.22.2-1 + gdm on macbook pro

Had a bunch of graphics flickering/glitching issues after updating my kernel to 4.8.7-1.

I thought maybe it was the userland or environment, so after attempting a few different things (upgrading/reinstalling packages, editing /etc/environment, adding kernel boot arguments related to power-saving) I found that downgrading back to 4.8.6-1 solved the issues I was experiencing.

It should be worth noting I'm not running a super-fancy setup, using mostly stock packages from Arch and AUR with a few minor exceptions not related to graphics (ie: drm, mesa, etc...).

I am the maintainer of the linux-macbook kernel in the AUR, so for anyone reading this that uses my kernel I will be skipping this kernel version as I believe it's an issue in the code base somewhere, I just haven't had time to hunt down exactly what.

I hope this post helps other people. If it does, please confirm with a quick post describing

  • Your machine using the following command:

    grep -h . /sys/devices/virtual/dmi/id/board_v*

  • The kernel version you downgraded back to:

    uname --kernel-release

  • Your GUI setup and version, ie: GNOME 3.22.2, KDE 16.08.3, i3 4.12-1, etc...

Thanks!

Offline

#2 2016-11-22 19:12:17

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Thank you, I have been having these exact issues on my MBP 11,5 with integrated Radeon graphics.

Here's some discoveries I've made:

- It also affects KDE and SDDM

- If you connect an external monitor (i only tested HDMI) and then disconnect it, the problem is resolved until the machine is suspended or rebooted. The connection of the HDMI monitor performs some kind of graphics reset that fixes the problem.

- If you use gpu_switch (and boot with apple_set_os.efi) to switch to the integrated card the problem does not exist... but this isn't a viable solution for me as I need the external monitors to work and they only work on the dedicated card.

edit: Also, it appears that disable_mode=1 is no longer required for suspend to work smile

Last edited by Tom B (2016-11-22 19:21:43)

Offline

#3 2016-11-23 14:40:25

pogoschaf
Member
Registered: 2016-11-23
Posts: 7

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Hey, thanks for the post.

I just posted this https://bbs.archlinux.org/viewtopic.php?id=219903 cry for help on that issue.

I experience the flickering also on an Apple Macbook Pro 11,5 15" with integrated Radeon graphics.

Running 4.8.10-1-ARCH with i3 4.13 and LightDM

Offline

#4 2016-11-23 22:02:44

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Shouldn't the AMDGPU driver work with this GPU (M370x)? I tried it to see if it's a radeon driver issue, but I can't get X to start with amdgpu

Last edited by Tom B (2016-11-23 22:04:45)

Offline

#5 2016-11-24 08:09:58

pogoschaf
Member
Registered: 2016-11-23
Posts: 7

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

I haven't tried that yet, partly because it's my work machine, that I use all day and can't really have major "downtimes" and partly because I'm quite new to the whole Arch Linux experience. I use the Xf86-video-ati package for drivers. Also atm I just started the Macbook fresh without AC-Adapter connected and no flickering at all.

Offline

#6 2016-11-24 13:34:15

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Very well spotted! I had noticed that it was tempermental, sometimes I'd get the flicker and other times I wouldn't but hadn't made the association with the power cable. It does look like you're right, as long as the AC power is unplugged when X starts or the machine is resumed from suspend, there is no flicker!

I'm happy with this workaround for now knowing I can consistently prevent the flicker but it would be nice to see a proper fix/explanation. Perhaps it's some kind of power issue in the GPU driver. I have noticed that the CPU runs at 55-60 degrees in linux while running at 45 degrees in OSX, of course this may be due to OSX using the Intel graphics rather than the Radeon card. It's a shame the external ports don't work with the Intel GPU as I really don't need the GPU power.

Offline

#7 2016-11-24 14:42:31

pogoschaf
Member
Registered: 2016-11-23
Posts: 7

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Me too, a fix would be nice. But for now I'll just start the machine with the power connector unplugged.

Offline

#8 2016-11-24 17:03:51

pogoschaf
Member
Registered: 2016-11-23
Posts: 7

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Yeah, so screen wen't black from xautolock after 10 minutes, when it came back on the flickering started again...

Offline

#9 2016-11-24 17:20:51

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Did you have the power cable connected when you unlocked the screen?

Whenever I've had the flicker today I've fixed it by: Unplug power cable, shut the lid, allow it to suspend (wait for the apple logo light to go out), open the lid, re-plug power cable. This process has removed the flicker the two times I've had it today.

Offline

#10 2016-11-25 03:50:47

kgk
Member
Registered: 2016-11-25
Posts: 1

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

I have been having this issue for the past couple weeks since I upgraded, and it's been driving me nuts. Thanks for the workaround! For me, the workaround of shutting my laptop lid and reopening to stop the flickering is (annoying but) good enough for now.

I'm running gnome / gdm. I'm using xf86-video-ati for graphics drivers.

Output of "grep -h . /sys/devices/virtual/dmi/id/board_v*":
Apple Inc.
MacBookPro11,5

Output of "uname --kernel-release":
4.8.10-1-ARCH

Offline

#11 2016-11-26 08:24:47

jdz1214
Member
Registered: 2016-11-26
Posts: 2

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Apple Inc.
MacBookPro11,5

4.8.10-1-ARCH

Thank you to whoever noticed the power workaround. Life saver.

I noticed that when I drop my resolution down from retina native 2800 x 1880 (with an xrandr-listed refresh rate of 59.99) to 1920 x 1200 (w/ a lower listed refresh rate of 59.88) the flickering problem is almost entirely resolved, even without using the power trick.

This is not a great solution because nothing is as pretty to look at as 5k retina text, but it made life bearable until I came across the power trick. Don't know if the refresh rate has anything to do with the problem.

My Macbook pro has the Radeon 8870m card and is the 15" with the upgraded cpu. Hope this helps you to track down the source of the problem, and thank you for doing just that.

Offline

#12 2016-11-27 19:04:48

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

FYI I've reported the bug to kernel.org here: https://bugzilla.kernel.org/show_bug.cgi?id=189231

Offline

#13 2016-11-28 15:27:13

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Can anyone replicate this: Does toggling the radeon power state turn on/off the flicker. For me:


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

Stops the flicker.

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

Starts the flicker. It looks like it's something to do with the radeon power state so setting the power state to `battery` might be a quicker workaround than suspend/resume each time.

edit: Since setting power_dpm_state to `battery` I have suspended and resumed several times and no flicker! This setting gets reset on boot but it looks like this setting is a fix.  I use my laptop for programming so I'm not sure how much this affects graphical performance but for me I'm happy to use this setting permanently.

Last edited by Tom B (2016-11-29 11:08:40)

Offline

#14 2017-01-10 08:59:46

fiddur
Member
Registered: 2017-01-10
Posts: 1

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Initially when trying to replicate this, my power_dpm_state was set to `balanced`, without flickering.

Setting it to `performance` did NOT start the flickering.

Triggering the flickering by closing and opening lid (turning screen off and on again) with power cable plugged in, and then setting power_dpm_state to `battery` did indeed fix the flickering.

Thank you so much for an easy workaround!

Offline

#15 2017-01-10 21:39:38

jdz1214
Member
Registered: 2016-11-26
Posts: 2

Re: Flickering with gnome 3.22.2-1 + gdm on macbook pro

Here is a systemd service I wrote that solves the issue by automatically putting the card into battery mode on boot, on resume from suspend, and on resume from hibernate.

#FlickerFix.service
[Unit]
Description=Flicker Fix for Macbook Pro Radeon Power Issue
After=suspend.target
After=hibernate.target

[Service]
Type=simple
ExecStart=/usr/bin/bash -c 'echo battery > /sys/class/drm/card0/device/power_dpm_state'
StandardOutput=syslog
Restart=on-failure
RestartSec=1

[Install]
WantedBy=graphical.target
WantedBy=sleep.target
WantedBy=hibernate.target

Save this script into a text file on your desktop called FlickerFix.service. Then:

sudo cp ~/Desktop/FlickerFix.service /etc/systemd/system/
sudo systemctl enable FlickerFix.service
sudo systemctl daemon-reload
sudo systemctl start FlickerFix.service

And you should be good to go. Please let me know if something with my service is wrong, or can be improved, etc.

Offline

Board footer

Powered by FluxBB