Bug 1326148

Summary: [Linux 4.6] Display blinking randomly on Intel HSW
Product: [Fedora] Fedora Reporter: František Zatloukal <fzatlouk>
Component: xorg-x11-drv-intelAssignee: Adam Jackson <ajax>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: ajax, anass.1430, djuran, emcnabb, fzatlouk, gansalmon, hdegoede, itamar, jonathan, kernel-maint, madebr, madhu.chinakonda, mchehab, mfuruta, petar, reynierpm, xgl-maint, zlynx
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-12 10:50:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dmesg after blink
none
Dmesg file of the current boot
none
Xorg.0.log none

Description František Zatloukal 2016-04-12 00:05:53 UTC
Description of problem:
Display blinks randomly.

Version-Release number of selected component (if applicable):
kernel 4.6.0.rc3.git0.1.fc23

How reproducible:
Occurs randomly

Actual results:
Display blinks (or brightness goes to 0%, not possible to differ). Occurs very randomly, I haven't found any patter to reproduce this behavior yet. Problems started with kernel 4.6 rc1 (4.5 is OK).

Expected results:
Display should not randomly blink.

Additional info:
I am running kernel from my COPR repository: https://copr.fedorainfracloud.org/coprs/frantisekz/NodebugFedora23Kernel/ . Other components are from Fedora 23 updates-testing (updated recently). 
GPU: Intel HD 4400

Comment 1 Josh Boyer 2016-04-12 01:10:48 UTC
(In reply to František Zatloukal from comment #0)
> Description of problem:
> Display blinks randomly.
> 
> Version-Release number of selected component (if applicable):
> kernel 4.6.0.rc3.git0.1.fc23
> 
> How reproducible:
> Occurs randomly
> 
> Actual results:
> Display blinks (or brightness goes to 0%, not possible to differ). Occurs
> very randomly, I haven't found any patter to reproduce this behavior yet.
> Problems started with kernel 4.6 rc1 (4.5 is OK).
> 
> Expected results:
> Display should not randomly blink.
> 
> Additional info:
> I am running kernel from my COPR repository:
> https://copr.fedorainfracloud.org/coprs/frantisekz/NodebugFedora23Kernel/ .
> Other components are from Fedora 23 updates-testing (updated recently). 
> GPU: Intel HD 4400

The kernel doesn't use ncurses.  There's really no reason for this COPR to exist afaik.

Can you please test the official F25 build?

Comment 2 František Zatloukal 2016-04-12 01:39:30 UTC
(In reply to Josh Boyer from comment #1
> The kernel doesn't use ncurses.  There's really no reason for this COPR to
> exist afaik.
I remember I was creating that repository after i wasn't able to upgrade kernel because of some ncurses dependency cannot been satisfied. Anyway, some people are using that repo right now, so I don't think it's good idea to drop it.

> Can you please test the official F25 build?
Yes, I've tested this one: http://koji.fedoraproject.org/koji/buildinfo?buildID=753397 and result is same.

Comment 3 Josh Boyer 2016-04-12 11:19:15 UTC
(In reply to František Zatloukal from comment #2)
> (In reply to Josh Boyer from comment #1
> > The kernel doesn't use ncurses.  There's really no reason for this COPR to
> > exist afaik.
> I remember I was creating that repository after i wasn't able to upgrade
> kernel because of some ncurses dependency cannot been satisfied. Anyway,
> some people are using that repo right now, so I don't think it's good idea
> to drop it.

The more people that use it, the more people that will be left with an unsupported kernel.  We typically just close those as wontfix.  If you would like to continue to provide it, please at least change the disttag to reflect the fact that it was built against a different Fedora release.
> 
> > Can you please test the official F25 build?
> Yes, I've tested this one:
> http://koji.fedoraproject.org/koji/buildinfo?buildID=753397 and result is
> same.

Please attach the output of dmesg after the issue has happened.

Comment 4 František Zatloukal 2016-04-12 11:56:40 UTC
(In reply to Josh Boyer from comment #3)
> (In reply to František Zatloukal from comment #2)
> > (In reply to Josh Boyer from comment #1
> > > The kernel doesn't use ncurses.  There's really no reason for this COPR to
> > > exist afaik.
> > I remember I was creating that repository after i wasn't able to upgrade
> > kernel because of some ncurses dependency cannot been satisfied. Anyway,
> > some people are using that repo right now, so I don't think it's good idea
> > to drop it.
> 
> The more people that use it, the more people that will be left with an
> unsupported kernel.  We typically just close those as wontfix.  If you would
> like to continue to provide it, please at least change the disttag to
> reflect the fact that it was built against a different Fedora release.
Thanks for the tip, but I think copr already do this for me (dnf info kernel returns fc23) or am I wrong?

(In reply to Josh Boyer from comment #3)
> Please attach the output of dmesg after the issue has happened.

There is nothing suspicious after blinking occurred, the last line is:
[14861.828160] usb 2-6: reset full-speed USB device number 4 using xhci_hcd

Comment 5 Josh Boyer 2016-04-12 12:05:42 UTC
(In reply to František Zatloukal from comment #4)
> (In reply to Josh Boyer from comment #3)
> > (In reply to František Zatloukal from comment #2)
> > > (In reply to Josh Boyer from comment #1
> > > > The kernel doesn't use ncurses.  There's really no reason for this COPR to
> > > > exist afaik.
> > > I remember I was creating that repository after i wasn't able to upgrade
> > > kernel because of some ncurses dependency cannot been satisfied. Anyway,
> > > some people are using that repo right now, so I don't think it's good idea
> > > to drop it.
> > 
> > The more people that use it, the more people that will be left with an
> > unsupported kernel.  We typically just close those as wontfix.  If you would
> > like to continue to provide it, please at least change the disttag to
> > reflect the fact that it was built against a different Fedora release.
> Thanks for the tip, but I think copr already do this for me (dnf info kernel
> returns fc23) or am I wrong?

No, you are correct.  I thought it did that too, but was confused by the webpage because I was looking at the SRPM you used which just points directly to koji.

> (In reply to Josh Boyer from comment #3)
> > Please attach the output of dmesg after the issue has happened.
> 
> There is nothing suspicious after blinking occurred, the last line is:
> [14861.828160] usb 2-6: reset full-speed USB device number 4 using xhci_hcd

Could you please just attach it anyway?

Comment 6 František Zatloukal 2016-04-12 17:28:51 UTC
Created attachment 1146559 [details]
dmesg after blink

Comment 7 František Zatloukal 2016-04-12 17:29:31 UTC
(In reply to Josh Boyer from comment #5)
> Could you please just attach it anyway?

I've attached it :)

Comment 8 František Zatloukal 2016-04-16 17:18:03 UTC
Bug appears even after upgrade to Fedora 24 (with same version of kernel).

Comment 9 František Zatloukal 2016-04-18 13:51:28 UTC
It's probably problem with brightness - external monitor is not dimming at all.

Comment 10 František Zatloukal 2016-05-03 18:15:05 UTC
Issue still present in 4.6.0.rc6.

Comment 11 Anass Ahmed 2016-07-21 01:09:20 UTC
Created attachment 1182304 [details]
Dmesg file of the current boot

I've Intel Iris Pro 5200 on Intel Haswell Core i7-4770HQ with Fedora 24, and I notice this issue every once in a while (happens very random, but not if I'm watching a video).

I didn't notice the brightness thing, but it sure blink for a moment in random times. This issue happens under both X.org and Wayland. I'm using GNOME 3 if it's important to know.

This issue appeared with Kernel-4.6.x, but If I booted the old Kernel-4.5.x, it disappears completely. I've also tried the option i915.enable_rc6=0 in the linux cmdline (/etc/default/grup) but nothing happened.

Kernels:
kernel-4.6.4-301.fc24.x86_64 (affected, but less than the previous one)
kernel-4.6.3-300.fc24.x86_64 (affected with a lot of random blinking)
kernel-4.5.7-300.fc24.x86_64 (not affected)

Intel Driver:
xorg-x11-drv-intel-2.99.918-1.20160709.fc24.x86_64 (Installed from bollocks intelblood Copr, but the issue existed before + kernel-4.5.x does work with it without a problem).

Attached with this message, the dmesg output for the current boot.

Comment 12 Anass Ahmed 2016-07-21 01:11:13 UTC
Created attachment 1182305 [details]
Xorg.0.log

Attached the X.org log file for the current session, in which I've seen the blinking. Maybe there's some information that's useful for troubleshooting the issue.

If you need any other log files, please tell me.

Comment 13 Anass Ahmed 2016-07-21 01:56:17 UTC
For more information about my system, check this fpaste:
https://paste.fedoraproject.org/393099/46906584/

Comment 14 Jan Kurik 2016-07-26 04:02:50 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 15 maarten 2016-07-27 13:11:12 UTC
Using Fedora 24 on a i7-4702MQ having HD Graphics 4600, I can reproduce the flickering.
The flickering does not occur while I am moving the mouse cursor but happens immediately when I stop moving.

Passing the i915.enable_psr=0 option to the kernel stops the flickering.

https://paste.fedoraproject.org/396329/24927146/

Comment 16 Jonathan Briggs 2016-09-01 16:42:09 UTC
Same problem here. Using:
Intel(R) Core(TM) i7-4712HQ CPU @ 2.30GHz
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)

The flickering problem really became serious after the upgrade to Fedora 25.

The laptop's internal display is fine. External displays cannot stay sync'd or something. The external display is a Samsung, EDID data 'SAM', 'U28E590', 'HTPGC00137' and it is running (or trying to) at "mode 3840x2160, preferred, current"

Another interesting data point is that if I run glxgears the external monitor stops flickering. I assume this iss because the GPU is kept busy and does not idle.

Comment 17 Jonathan Briggs 2016-09-01 16:44:19 UTC
Oh, and this problem is happening to me with Fedora 25's kernel 4.8.0-0.rc4.git0.1.fc25.x86_64

Comment 18 Hans de Goede 2016-09-01 18:41:40 UTC
Note a possible workaround for this is adding "i915.enable_psr=0" to your kernel commandline.

Comment 19 Jonathan Briggs 2016-09-01 19:55:01 UTC
Yes that does fix it.

Comment 20 Hans de Goede 2016-09-03 11:18:21 UTC
(In reply to Jonathan Briggs from comment #19)
> Yes that does fix it.

Ok good to know, can you please file a bug for this upstream, as documented here:
https://01.org/linuxgraphics/documentation/how-report-bugs

And make sure to note that i915.enable_psr=0 fixes it. We've been seeing quite a few "flickering" bugs related to psr recently. Hopefully upstream will be able to find some common denominator and come up with a proper fix.

Comment 21 maarten 2016-09-20 17:19:28 UTC
It appears this bug will be fixed in kernel 4.8.
See https://lkml.org/lkml/2016/8/1/652

Comment 22 reynierpm 2016-09-23 19:55:19 UTC
I am running the same issue but in my case the monitor gets black like if it was shut down and after a sec or two it comes back. If anyone needs something from my side let me know

Comment 23 maarten 2016-10-13 16:07:32 UTC
The bug is still present in kernel version 4.8.1-1.fc25.x86_64.

This is the version used in the Fedora 25 Wayland Test Day Image.
(https://fedoraproject.org/wiki/Test_Day:2016-10-13_Wayland)

My upstream bug report:
https://bugs.freedesktop.org/show_bug.cgi?id=97875

Comment 24 perosredo 2016-11-04 19:26:40 UTC
I am experiencing this issue in Fedora 25 with 4.8.6-300.fc25.x86_64 on a laptop with Haswell and an AMD HD8750M discrete gpu.

I do not experience this issue in Windows 10, Ubuntu 16.10 on Unity, Tumbleweed/KDE, nor did experience it in F20-F23, but do experience it in Tumbleweed/GNOME using both Wayland and X11. 

In KDE I had a possibly related issue with also-seemingly random intermittent artifacting that was resolved by changing the compositor from the default OpenGL2.0 to either OpenGL3.1 or KWin. 

There is nothing in dmesg or journal that coincides with the blinks, and upgrading to a X11/Mesa repo which tracks git on tumbleweed (on the advice of #amdgpu) did not fix the issue there. lspci and lsmod below:


https://paste.fedoraproject.org/469881/31093147/
http://paste.fedoraproject.org/469883/82312101/

Comment 25 Hans de Goede 2016-11-04 20:13:28 UTC
(In reply to perosredo from comment #24)
> I am experiencing this issue in Fedora 25 with 4.8.6-300.fc25.x86_64 on a
> laptop with Haswell and an AMD HD8750M discrete gpu.
> 
> I do not experience this issue in Windows 10, Ubuntu 16.10 on Unity,
> Tumbleweed/KDE, nor did experience it in F20-F23, but do experience it in
> Tumbleweed/GNOME using both Wayland and X11. 
> 
> In KDE I had a possibly related issue with also-seemingly random
> intermittent artifacting that was resolved by changing the compositor from
> the default OpenGL2.0 to either OpenGL3.1 or KWin. 
> 
> There is nothing in dmesg or journal that coincides with the blinks, and
> upgrading to a X11/Mesa repo which tracks git on tumbleweed (on the advice
> of #amdgpu) did not fix the issue there. lspci and lsmod below:
> 
> 
> https://paste.fedoraproject.org/469881/31093147/
> http://paste.fedoraproject.org/469883/82312101/

Note a possible workaround for this is adding "i915.enable_psr=0" to your kernel commandline, habe you tried this ?

Comment 26 perosredo 2016-11-06 15:58:49 UTC
(In reply to Hans de Goede from comment #25)
> Note a possible workaround for this is adding "i915.enable_psr=0" to your
> kernel commandline, habe you tried this ?

The workaround does fix the blinking in F25 on both X and Wayland, albeit I have no idea what the command does, but does seem to introduce a single almost-persistent horizontal scanline only on X. 

Also might not explain why the bug does not occur in Ubuntu/Unity or Tumbleweed/KDE on contemporary kernels.

Comment 27 Jonathan Briggs 2016-11-06 23:03:31 UTC
(In reply to perosredo from comment #26)
> Also might not explain why the bug does not occur in Ubuntu/Unity or
> Tumbleweed/KDE on contemporary kernels.

For Panel Self Refresh to kick in to start saving power, the GPU has to stop updating the screen. If the compositor keeps writing updates then that can't happen. That's why the flickering only happens with some software combinations.

PSR is worth the temporary annoyance of these bugs. It saves much more power than idling SATA, gigabit Ethernet or the like. That eDP update link to the display is normally pushing gigabits per second.

Comment 28 František Zatloukal 2017-03-05 23:45:05 UTC
I´ve removed xorg-x11-drv-intel and I am no longer encountering this issue. You can try this too, system will fall back to using generic 2D driver. This is going to be default configuration (if I am not mistaken) in Fedora 26.

@ajax, Should I close this bug?

Comment 29 maarten 2017-03-06 08:49:38 UTC
PSR has been disabled by default for Haswell/Broadwell in kernel 4.10
(see https://bugs.freedesktop.org/show_bug.cgi?id=97875).

I'm still using Fedora 24 (on 4.9.7) and have not been able to test it.

Comment 30 maarten 2017-03-09 15:49:35 UTC
Upgraded to 4.9.13-100.fc24.x86_64 and see no more flickering.

# cat /sys/module/i915/parameters/enable_psr
0

PSR is disabled by default for my Haswell processor.

Comment 31 Fedora End Of Life 2017-11-16 19:40:19 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 32 maarten 2017-11-16 19:50:56 UTC
Fixed for me on Fedora 26.

Comment 33 Anass Ahmed 2017-11-16 21:44:26 UTC
Yeah, I removed the `enable_psr` a long time ago, and it never happened to me again. I think it's fixed. I'm using F27 now.

Comment 34 Fedora End Of Life 2017-12-12 10:50:56 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.