Bug 105083

Summary: Random blinking display
Product: DRI Reporter: denisgolovan
Component: DRM/AMDgpuAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: eugies93+freedesktop, fdsfgs, harry.wentland, hiwatari.seiji, sonyp2p, vavooon
Version: XOrg git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description denisgolovan 2018-02-13 20:34:19 UTC
Hi

Upgrading to 4.15.2 with amdgpu dc results in blinking of color temperature when redshift application started. Kernel 4.13.13 worked fine.

See https://github.com/jonls/redshift/issues/221#issuecomment-365376437 for details
Comment 1 Michel Dänzer 2018-02-14 09:06:49 UTC
Please attach the output of dmesg captured while the problem is occurring, preferably with amdgpu.dc_log=1 .
Comment 2 Vavooon 2018-02-14 10:21:33 UTC
(In reply to denisgolovan from comment #0)
> Hi
> 
> Upgrading to 4.15.2 with amdgpu dc results in blinking of color temperature
> when redshift application started. Kernel 4.13.13 worked fine.
> 
> See https://github.com/jonls/redshift/issues/221#issuecomment-365376437 for
> details

Did you enable AMDGPU DC by changing kernel boot parameters?

(In reply to Michel Dänzer from comment #1)
> Please attach the output of dmesg captured while the problem is occurring,
> preferably with amdgpu.dc_log=1 .

I tried to capture some dmesg log, but booting with suggested kernel line amdgpu.dc_log=1 but no output was produced at flickering. Than I realized that I have to enable amdgpu.dc in order to use it's logging :) and the issue disappeared. So far after a hour I don't see any flickering anymore.
Comment 3 denisgolovan 2018-02-14 20:11:09 UTC
Adding amdgpu.dc=1 amdgpu.dc_log=1 indeed make flickering much less frequent.
However, I can still reproduce them when turning redshift on and off.

No logs in dmesg and messages with amdgpu appear though.
Any hints?
Comment 4 Harry Wentland 2018-02-14 20:19:17 UTC
How bad is the flicker? Would you be able to take a video showing the flicker and post it (youtube or anywhere, really)?
Comment 5 Allen 2018-02-17 11:05:39 UTC
(In reply to Harry Wentland from comment #4)
> How bad is the flicker? Would you be able to take a video showing the
> flicker and post it (youtube or anywhere, really)?

Video Card: RX 480

As I am suffering as well from this problem, I have uploaded a video to youtube.

https://youtu.be/fMNhPH6QG00

the flicker happens periodically as Redshift adjusts the color temperature over time.
Comment 6 denisgolovan 2018-02-17 11:15:10 UTC
(In reply to Allen from comment #5)

> the flicker happens periodically as Redshift adjusts the color temperature
> over time.

Yes. Seems pretty similar.
However it happens also periodically when redshift is active.
Comment 7 Ashley Bone 2018-02-17 13:30:52 UTC
(In reply to denisgolovan from comment #6)
> (In reply to Allen from comment #5)
> 
> > the flicker happens periodically as Redshift adjusts the color temperature
> > over time.
> 
> Yes. Seems pretty similar.
> However it happens also periodically when redshift is active.

I agree, this is the flickering I'm seeing, and it does happen occasionally when redshift is running even when it's not adjusting the color temperature.  It's much more frequent during the transition times when it is adjusting.

If I disable either redshift or amdgpu DC, I don't see any flickering.
Comment 8 Harry Wentland 2018-02-20 16:24:54 UTC
Thanks for the video. It helps us understand what you're seeing.
Comment 9 Öyvind Saether 2018-02-20 21:59:18 UTC
I get random blue color screen flickering perhaps once every few minutes on each monitor with redshift and a RX 580 and a 3x4k 60Hz setup with kernel 4.15.3 and amdgpu.dc=1. My initial response was that amdgpu.dc is broken so I reverted back to 4.14.x and used that until I found this bug and realized it's the redshift that's badly handled / problematic with the amdgpu.dc code.

This isn't really a redshift bug, just the way it behaves with this new code since I've used redshift since forever on numerous configurations and this is a new problem.

The random blue flickering with redshift seems to randomly appear on one of the monitors, not all or two at once. All do not blink the same time. I can't really see any pattern either. Every few minutes one of the monitors will blink blue. Sometimes none of them blink blue for a long time.

Everything seems fine so far without redshift apart from the blue color spectrum now violently smashing my eyes. My eyes, my eyes! I'll test if redshift is OK with transition = 0 later, it could be a workaround if it is the gradual adjustment of gamma/color that causes the flickering.
Comment 10 Harry Wentland 2018-02-27 00:15:10 UTC
We have some patches that rework our gamma programming in our staging trees. Would you be able to try amd-staging-drm-next or drm-next-4.17-wip from https://cgit.freedesktop.org/~agd5f/linux/?h=drm-next-4.17-wip ?
Comment 11 denisgolovan 2018-03-03 13:00:46 UTC
(In reply to Harry Wentland from comment #10)
> We have some patches that rework our gamma programming in our staging trees.
> Would you be able to try amd-staging-drm-next or drm-next-4.17-wip from
> https://cgit.freedesktop.org/~agd5f/linux/?h=drm-next-4.17-wip ?

I've just built drm-next-4.17-wip + amdgpu.dc=1.
Well, it does not blink however it has another regression - color temperature/gamma is not applied to all window controls. Some areas just stay not affected as if gamma change specifically disabled for them.
Comment 12 denisgolovan 2018-03-03 13:07:07 UTC
Disabling amdgpu.dc under drm-next-4.17-wip works fine though.
Comment 13 Harry Wentland 2018-03-05 14:31:13 UTC
(In reply to denisgolovan from comment #11)
> (In reply to Harry Wentland from comment #10)
> Some areas just
> stay not affected as if gamma change specifically disabled for them.

Do you have a picture?
Comment 14 denisgolovan 2018-03-05 20:33:37 UTC
(In reply to Harry Wentland from comment #13)
> (In reply to denisgolovan from comment #11)
> > (In reply to Harry Wentland from comment #10)
> > Some areas just
> > stay not affected as if gamma change specifically disabled for them.
> 
> Do you have a picture?

See https://www.youtube.com/watch?v=6MQrgemv-yQ
White color on github page is completely unaffected when I switch Redshift on/off.
Comment 15 denisgolovan 2018-03-09 09:19:47 UTC
Any news on that?
Comment 16 Harry Wentland 2018-03-09 14:02:44 UTC
The ticket is on our backlog and we'll try to get to it in a week or so.
Comment 17 Bogomil Vasilev 2018-04-03 06:04:47 UTC
Experiencing this since 4.15 (not sure which minor release). Still happening on 4.16.0. With and without amdgpu=1, using RX480:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/580] (rev c7)
Comment 18 Harry Wentland 2018-04-17 18:10:22 UTC
A fix should be in drm-next-4.17 of Alex's git repo at https://cgit.freedesktop.org/~agd5f/linux/?h=drm-next-4.17

That fix should also make it into 4.16 stable.

White color fix with redshift/nightshift should also be in that branch.
Comment 19 denisgolovan 2018-05-13 12:11:29 UTC
Cannot confirm your fix.

amdgpu.dc=1 still blinks. 
Using old engine (disabling dc) works fine.
Tested under vanilla Linux v4.16.8.

White color regression is fixed in both modes.
Comment 20 Öyvind Saether 2018-06-08 21:11:28 UTC
Since this bug remains open for some reason I'll report the following: redshift appears to work just fine with both RX 560 & RX 470 and:

- kernel 4.17.0-1 (rx 580) / 4.18.0-0.rc0.git2 (rx 470)
- X.Org 1.19.6
- mesa 18.0.2
- xfce xfwm4 4.12.4
- compton-0.1-0.1.beta3

kernel commmand line has amdgpu.dc=1 for some reason (default now anyway). I assume both kernels would work fine on both cards, that's just what happens to be running right now.

I suspect this bug can be closed but it's probably fair to wait for them russians to confirm.
Comment 21 denisgolovan 2018-06-17 08:21:16 UTC
Tested under 4.17.2.
Works fine with amdgpu.dc=1

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.