Bug 87796 - radeonsi 120Hz graphic glitches
Summary: radeonsi 120Hz graphic glitches
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
: 89198 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-28 14:00 UTC by Clésio Luiz
Modified: 2019-11-19 09:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
video screenshot of the glitch (1.54 MB, image/png)
2014-12-28 14:00 UTC, Clésio Luiz
no flags Details
dmesg (69.16 KB, text/plain)
2015-01-13 20:49 UTC, Clésio Luiz
no flags Details
/var/log/Xorg.0.log (75.37 KB, text/plain)
2015-01-13 20:49 UTC, Clésio Luiz
no flags Details
add some debugging output (1.63 KB, patch)
2015-01-14 17:05 UTC, Alex Deucher
no flags Details | Splinter Review
fix 1/2 (1.04 KB, patch)
2015-02-18 14:23 UTC, Alex Deucher
no flags Details | Splinter Review
fix 2/2 (1.20 KB, patch)
2015-02-18 14:24 UTC, Alex Deucher
no flags Details | Splinter Review
possible fix (601 bytes, patch)
2015-03-18 14:55 UTC, Alex Deucher
no flags Details | Splinter Review
possible fix (3.35 KB, patch)
2015-03-18 21:08 UTC, Alex Deucher
no flags Details | Splinter Review

Description Clésio Luiz 2014-12-28 14:00:44 UTC
Created attachment 111427 [details]
video screenshot of the glitch

When I enable 120Hz refresh rate in the Radeon R9 290 card, with my Benq XL2420T monitor, I get horizontal glitches in the image. That happens in KDE, Unity, XFCE (all with or without compositing), and games. Without compositing, the windows decorations in KDE show artifacts in 60 and 120Hz.

60Hz refresh rate works okay. Fglx proprietary driver works okay with 120Hz. I also have a Radeon HD 6970 with the radeon OSS driver and it also works okay in 120Hz in my system. 

Currently I am using Kubuntu 14.10, kernel 3.19RC1 and Mesa git from this PPA: https://launchpad.net/~paulo-miguel-dias/+archive/ubuntu/mesa

The card is a Sapphire Radeon R9 290 4GB Tri-X.

This bug is happening since I got this card, in September.

I cant get a direct screenshot nor taking photos (with a smartphone) of the glitch happening, so I take a video of it with a phone and then take a screenshot.
Comment 1 Michel Dänzer 2015-01-07 07:44:53 UTC
Please attach /var/log/Xorg.0.log and the output of dmesg.

Can you upload the video somewhere?

If not, please provide more details about the glitches, e.g.: Are they always visible, or only intermittently? If the latter, how often? Does the vertical location of the glitches change or is it always the same? ...
Comment 2 Sandro 2015-01-13 18:57:47 UTC
Same here with my gigabyte r9 290.
The glitches pop up randomly.
Here is the video http://youtu.be/ilH6em3eIrY
Comment 3 Alex Deucher 2015-01-13 19:12:31 UTC
(In reply to Sandro from comment #2)
> Same here with my gigabyte r9 290.
> The glitches pop up randomly.
> Here is the video http://youtu.be/ilH6em3eIrY

The link says the video is private.
Comment 4 Sandro 2015-01-13 19:32:58 UTC
(In reply to Alex Deucher from comment #3)
> (In reply to Sandro from comment #2)
> > Same here with my gigabyte r9 290.
> > The glitches pop up randomly.
> > Here is the video http://youtu.be/ilH6em3eIrY
> 
> The link says the video is private.

try now
Comment 5 Alex Deucher 2015-01-13 20:40:38 UTC
Yes, it seems to work now.
Comment 6 Clésio Luiz 2015-01-13 20:49:20 UTC
Created attachment 112180 [details]
dmesg
Comment 7 Clésio Luiz 2015-01-13 20:49:59 UTC
Created attachment 112181 [details]
/var/log/Xorg.0.log
Comment 8 Clésio Luiz 2015-01-13 21:04:51 UTC
(In reply to Michel Dänzer from comment #1)
> Please attach /var/log/Xorg.0.log and the output of dmesg.
> 
> Can you upload the video somewhere?
> 
> If not, please provide more details about the glitches, e.g.: Are they
> always visible, or only intermittently? If the latter, how often? Does the
> vertical location of the glitches change or is it always the same? ...

I set the 120Hz and restarted. Then I opened Konsole and got the results and put then as attachments.

Finally got a video and put it in Youtube:

https://www.youtube.com/watch?v=W7a9nrwPPeY

I cant get the video with tools like Kazam or SimpleScreenRecorder. I have to grab it with a external camera.

The glitches are intermittently. The image cam be fine for a fell seconds then the glitches show themselves.
Comment 9 Clésio Luiz 2015-01-13 21:15:31 UTC
(In reply to Clésio Luiz from comment #8)

> I cant get the video with tools like Kazam or SimpleScreenRecorder. I have
> to grab it with a external camera.

I mean, the glitches don't appear in the video files created with the above tools, for some reason. The only way to show you guys the problem is to record it with a external camera.
Comment 10 Alex Deucher 2015-01-13 21:24:07 UTC
It looks like maybe the dpm memory reclocking occasionally misses the vblank.  Do you still get the glitches if you connect a secondary display or disable dynamic clocking?  To disable able dynamic clocking (as root):
echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level
to re-enable it (as root):
echo auto > /sys/class/drm/card0/device/power_dpm_force_performance_level
Comment 11 Clésio Luiz 2015-01-13 21:44:05 UTC
(In reply to Alex Deucher from comment #10)
> It looks like maybe the dpm memory reclocking occasionally misses the
> vblank.  Do you still get the glitches if you connect a secondary display or
> disable dynamic clocking?  To disable able dynamic clocking (as root):
> echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level
> to re-enable it (as root):
> echo auto > /sys/class/drm/card0/device/power_dpm_force_performance_level

The High value makes the glitches go away. As soon as I set the Auto value, the glitches reappear.

I don't have access to a second display to test right now, only tomorrow.
Comment 12 Sandro 2015-01-13 22:02:15 UTC
glitches disapper from me too with 'high' parameter.
Comment 13 Andreas Hartmetz 2015-01-14 02:15:41 UTC
I have a somewhat similar issue with radeonsi, latest everything (xorg, llvm, mesa) except Linux kernel which is 3.17.8, and Cape Verde PRO (aka Radeon HD 7750) hardware. The screen sometimes turns completely black for a frame. It happened a few times per hour. In the past this could be reliably avoided by pinning the power setting to min or max, but DPM changes prevented that fix from working.
Now that I know this:
echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level
(looks similar to the one that used to work a few kernels earlier?) I can avoid the problem again, but of course at the cost of power consumption. The underlying issue might be the same timing problem. I can file a new bug if you think it is a different issue.
Comment 14 Clésio Luiz 2015-01-14 14:26:09 UTC
I tested now with 2 displays, the Benq monitor (DVI cable) at 120Hz and a Lg TV (HDMI cable) and the glitches disappear.

When I disable the TV (from System Settings) and disconnect the cable, the glitches are still gone. Only when I restart the system the glitches come back.

I should mention that any refresh rate above 60Hz triggers the problem, not only 120Hz.
Comment 15 Alex Deucher 2015-01-14 17:05:57 UTC
Created attachment 112228 [details] [review]
add some debugging output

Based on the timing for the 1920x1080@120 timing from your xorg log, it looks like it should be just under the switch limit.  Can you apply the attached patch and switch to the problematic mode and then attach your dmesg output so I can see what's happening?
Comment 16 Clésio Luiz 2015-01-15 00:08:04 UTC
I didn't compiled the driver myself, got it from a repository. I'm afraid that applying a patch and compile the driver is out of my knowledge... But I'm more than happy to follow instructions.
Comment 17 Alex Deucher 2015-01-22 17:28:51 UTC
(In reply to Clésio Luiz from comment #16)
> I didn't compiled the driver myself, got it from a repository. I'm afraid
> that applying a patch and compile the driver is out of my knowledge... But
> I'm more than happy to follow instructions.

If you can download the source to your kernel, copy the patch to the root of the kernel tree then do the following:

patch -p1 -i dpm_vblank_dump.diff
make -j5
sudo make modules_install
sudo make install

Then reboot and select the new kernel from the grub menu.
Comment 18 Alex Deucher 2015-02-18 14:06:49 UTC
*** Bug 89198 has been marked as a duplicate of this bug. ***
Comment 19 Alex Deucher 2015-02-18 14:23:37 UTC
Created attachment 113617 [details] [review]
fix 1/2

The attaches patches should fix the issue, but I would still like to get the output of the debugging patch in comment 15 so that I can fine tune things if possible.
Comment 20 Alex Deucher 2015-02-18 14:24:03 UTC
Created attachment 113618 [details] [review]
fix 2/2

Please apply both patches.
Comment 21 Andreas Gihr 2015-03-17 18:15:58 UTC
I'm still having this issue.
Here's some dmesg output:

[  363.951100] -- 2560x1440 --
[  363.951101] radeon_crtc->hw_mode.crtc_htotal: 2640
[  363.951101] radeon_crtc->hw_mode.clock: 482640
[  363.951102] radeon_crtc->hw_mode.crtc_vblank_end: 1525
[  363.951102] radeon_crtc->hw_mode.crtc_vdisplay: 1440
[  363.951103] radeon_crtc->v_border: 0
[  363.951103] vblank_time_us: 425
[  363.951104] vblank_lines: 85
[  363.951104] line_time_us: 5
[  363.951105] vblank_time: 425, switch_limit: 450
Comment 22 Alex Deucher 2015-03-18 14:07:41 UTC
(In reply to Andreas Gihr from comment #21)
> I'm still having this issue.

Does it still happen with the patches applied?
Comment 23 Andreas Gihr 2015-03-18 14:25:17 UTC
I'm using the newest kernel from git. 
It said: Reversed (or previously applied) patch detected!
Comment 24 Alex Deucher 2015-03-18 14:55:14 UTC
Created attachment 114443 [details] [review]
possible fix

Does this patch on top of latest git help?
Comment 25 Andreas Gihr 2015-03-18 18:59:51 UTC
It didn't help.
Comment 26 Alex Deucher 2015-03-18 21:08:02 UTC
Created attachment 114452 [details] [review]
possible fix

Does this patch against latest git help?
Comment 27 Andreas Gihr 2015-03-19 01:00:28 UTC
Yes it helps.
Thanks.
Comment 28 Andreas Gihr 2015-04-12 15:20:20 UTC
But now there is much higher power consumption in idle.
Comment 29 Clésio Luiz 2015-04-12 20:37:42 UTC
The bug seems to be gone for me. Using Kernel 4.0 RC7 and latest Paulo Dias Mesa git PPA.

Temperature of the GPU appears to be normal at idle.
Comment 30 Clésio Luiz 2015-04-12 21:41:11 UTC
After reading the Andreas Gihr post about greater power consumption, I did a little test. Using Kubuntu KDE 4 I put the display at 60Hz and watched the GPU temperature drop 3°C. Put it back at 120Hz and the temp go up the same 3°C.

But to me, this is expected. The GPU is working more to double the FPS of the KDE compositing. So is natural it getting hotter.
Comment 31 Andreas Gihr 2015-04-12 23:00:35 UTC
The power consumption rises about 40 watts at 120hz. This is the case in KDE and in Openbox without compositing. In Windows there's about 1 watt difference.
Comment 32 Martin Peres 2019-11-19 09:00:03 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/567.


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.