[ubuntu 14.04.2] Artefacts in radeon driver on kernel 3.16 and upwards

Bug #1479136 reported by thom
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Ubuntu-Mate 14.04.2

This is what I get if I run a kernel newer than 3.13: https://www.youtube.com/watch?v=nx2-Fvihzxg
sorry for the link, I just don't know how to describe these artefacts verbally.
(a storm of small horizontal moving blips from right to left ??)

Those artefacts appear as soon as new kernel is selected in GRUB, and remain during the whole session.

The lastest kernel (from the main repository that is) working without artifacts is v3.13.0.59. All later kernels have artifacts. All later kernels also are either "-utopic" or "-vivid" instead of "-trusty", but I do not know if it is related.

GPU: Mobility Radeon HD 3200 (RS780M)
System: Ubuntu Mate 14.04.2 32-bit

Kernels tested: 3.13.0.59 (and earlier) , 3.16.0.45 , 3.19.0.25
Only 3.13.0.59 (and earlier) are without problems.

Revision history for this message
thom (tsk) wrote :

launchpad decided to file this as a bug against virtualbox ... strange ...I run on bare metal.

affects: virtualbox (Ubuntu) → ubuntu
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hi, this might be related to the backported kernel or to some graphic issue on your card... try to install the latest graphics drivers, the lts-utopic or lts-vivid version maybe.

Revision history for this message
thom (tsk) wrote :

Hi, thanks for looking into this.

I just installed the meta packages xserver-xorg-lts-vivid ( --install-recommends) and linux-generic-lts-vivid and rebooted

Running now:
Xorg X Server version 1.17 (1:7.7+7ubuntu3-trusty1)
vmlinuz-3.19.0-25-generic with options radeon.dpm=1 vt.handoff=7

the info I get from the xserver-xorg-video-radeon-lts-vivid package is:
Version 1:7.5.0-1ubuntu2-trusty1

However, I still have the 'blipstorm' on my screen.
Do I have the right kernel/Xorg/radeon-driver combination or are there any tweaks I can try ?

Revision history for this message
thom (tsk) wrote :

Also tried with lts-utopic kernel and xorg : same results

Revision history for this message
thom (tsk) wrote :

also tried 3.13 kernel (trusty) with xserver-xorg-video-radeon-lts-utopic: no problem

it looks like it is driver-independent.
it seems to be a kernel bug more than a xorg-video-driver bug.

Revision history for this message
thom (tsk) wrote :

Okay, I narrowed it down to this:

Running on bare recovery console without Xorg : no problem
Running on bare normal (??framebuffered??) console without Xorg: blipstorm

The difference seems to me a loaded kernel driver...am I correct ??

If so, I could try out some new drivermodules or patches if you want me to.
( I have never patched or compiled kernel modules so I think I need a bit of hand-holding with this one )

Revision history for this message
thom (tsk) wrote :

I downloaded and installed kernel 4.0.9 from mainline-ppa

Although the kernel runs OK and without pain....the video didn't improve .... still blipstorm

Revision history for this message
thom (tsk) wrote :

installed kernel 4.2.0-rc3 ... no change

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
thom (tsk) wrote :

UPDATE:

kernel 3.13.0-66 (i686) -> no problem
kernel 3.16.0-33 (i686) -> blipstorm

Revision history for this message
Tim (timpipp) wrote :

Confirmed, same problem on Radeon 3400. Going back to kernel 3.13 works, everything above is flicker storm.

Revision history for this message
Tim (timpipp) wrote :

Also this bug is cross platform.

Tested on:

Lubuntu 14.4 14.10 15.4. 15.10
Ubuntu 14.4 14.10 15.4. 15.10
Fedora Live
AnitX 15

Revision history for this message
Tim (timpipp) wrote :

Correction:

Works up to kernel 3.13 like stated before so LTS version up to 14.4.1 it works ok, any above that is "flicker storm"

Revision history for this message
Tim (timpipp) wrote :

4.2, 4.3 same problem.

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

To get this fixed you'd need to do a git bisect between 3.13 and 3.16 to find the bad commit, and then report the bug upstream to bugs.freedesktop.org.

affects: ubuntu → linux-meta (Ubuntu)
affects: linux-meta (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
thom (tsk) wrote :

According to bugzilla:
(https://bugzilla.kernel.org/show_bug.cgi?id=83461)

32167016076f714f0e35e287fbead7de0f1fb179 seems to be the first bad commit

bug seems to affect only the RS880 series and older

Christian König proposed a patch to limit the reference divider to fix this and it seems to work.

Alex Deucher has committed it upstream
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=72edd83cc9e5819ed1ee771519143d7594e059f0

Hope it will land soon in Ubuntu.

Revision history for this message
Tim (timpipp) wrote :

Great news!

Revision history for this message
Mrerexx (mrerexx) wrote :

Xubuntu 16.04 LTS still gives me artifacts. I'm using HP Compaq 6735s with Athlon 64 X2 QL-60 & Radeon HD 3200.

Revision history for this message
thom (tsk) wrote :

Mrerexx, I can confirm this... I have the EXACT same laptop model (I rarely use nowadays) and just checked it.
Indeed this model still has the same problems with the newer kernels.

Since this is an upstream bug, please follow this link [ https://bugzilla.kernel.org/show_bug.cgi?id=83461 ] and mention it there.
I don't think many people (or developers) have hardware vulnerable to this bug so you might be asked to test some patches.

In a few days I hope to be able to add some information there myself.

Revision history for this message
thom (tsk) wrote :

Mrerexx, could you perhaps test if your VGA output on that laptop is unaffected ?
My VGA-output seems to work without problems and only LVDS seems affected.

Revision history for this message
Mrerexx (mrerexx) wrote :

thom, VGA output is better. There is some flickering (no white lines, though) but my D-Sub cable is cheap.

AFAIK, HP has disabled ATI PowerPlay in models with Athlon or Sempron CPUs. Maybe that's the culprit.

Revision history for this message
thom (tsk) wrote :

Maybe....but it is not supposed to cause such weird side effects

I ended up doing a git bisect myself on this issue:

https://bugs.freedesktop.org/show_bug.cgi?id=87682
(because it's an upstream bug)

Anyone any tips how to continue ?

Revision history for this message
thom (tsk) wrote :

OK, about the bisect:

c2fb3094669a3205f16a32f4119d0afe40b1a1fd is the first bad commit
Date: Sun Apr 20 13:24:32 2014 +0200

    drm/radeon: improve PLL limit handling in post div calculation

    This improves the PLL parameters when we work at
    the limits of the allowed ranges.

I reverted this commit (I got some good working tips from Chris Bainbridge), tested the result with the kernels 4.4.0-rc1 and 4.6.0-rc6+ and the problem is completely gone. I ended up with a good stable and rock-solid display output without artefacts.

I could test against some other kernels if any of the devs here would like me to do that.

Revision history for this message
thom (tsk) wrote :

Tim, Mrerexx and anyone who is hit by this bug:

I am testing a lot at the moment and I need your help.

please boot that problematic kernel with bootoption: drm.debug=4

Then, in a terminal type this:
grep -i "\[drm:" /var/log/kern.log | grep div | tail

post the results here, I'm going to need it

Revision history for this message
Marius J. (turkal) wrote :

I'm also hit by the bug on Ubuntu 16.04 with kernel 4.4.0-22-generic and a Radeon Mobility HD4670.

@thom : the grep command return only the following line :

kernel: [ 3.760078] [drm:radeon_compute_pll_avivo] 107000 - 106980, pll dividers - fb: 63.4 ref: 2, post 8

Revision history for this message
thom (tsk) wrote :

@Marius, Yes, thanks, that is exactly what I needed.
That one line plus your card model. Excellent.

I need it from as much people (i.e. affected hardware) as possible .

Revision history for this message
Mrerexx (mrerexx) wrote :

Radeon HD 3200 & Xubuntu 16.04 (4.4.0.21-generic) ISO booted from the USB drive:

xubuntu kernel: [ 11.195154] [drm:radeon_compute_pll_avivo] 69300 - 69290, pll dividers - fb: 135.5 ref: 2, post 14

Revision history for this message
Tim (timpipp) wrote :

Hello, Thom.

Sadly the old laptop has died 100% (total failure of GPU).

So i can not be of help on this bug for testing any more.

Thank you all for the work, keep going!

Revision history for this message
thom (tsk) wrote :

UPDATE:

Patch submitted by Christian König
Patch applied by Alex Deucher

https://lists.freedesktop.org/archives/dri-devel/2016-June/110724.html

Revision history for this message
thom (tsk) wrote :

@Tim,
  Sorry to hear about that, so close to the finish.
  Thank you anyway for all the help.

Revision history for this message
thom (tsk) wrote :

Before I forget:

What can I do to get the patch incorporated in the current LTS release ? (Xenial 16.04)
According to Christian König the patch is backwards compatible with the 4.x series kernels.

I've tested it (compiled against 4.4.0.26) and it works without problem.

Who do I have to contact to get this patch into the current 4.4 series ?

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

Best way would be to get the patch in to the stable series so it's fixed across all distributions:

https://www.kernel.org/doc/Documentation/stable_kernel_rules.txt

Revision history for this message
Gabor Nagy (g-nagy) wrote :

Same problem on RV710/M92.

Revision history for this message
thom (tsk) wrote :

Update:

Patch is part of the ubuntu mainline kernel 4.7

I'm running this kernel on ubuntu 16.04 and everything works as perfectly as expected.
If anyone of you wants to try:

Read this:
https://wiki.ubuntu.com/Kernel/MainlineBuilds

here is kernel 4.7:
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7

Changed in linux (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Ivan Zakharyaschev (imz) wrote :

4.4.19-std-def-alt0.M80P.1 (not Ubuntu, but still might be important for collecting the data) with bad flickering

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV360 [Radeon 9600/X1050 Series]
01:00.1 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] RV350 [Radeon 9600/X1050 Series] (Secondary)

# fgrep -i '[drm' /var/log/kernel/info | fgrep div | tail
Aug 28 19:35:45 amber kernel: [ 10.751094] [drm:radeon_compute_pll_legacy], 108000000 108000, pll dividers - fb: 24.0 ref: 2, post 3
Aug 28 19:37:52 amber kernel: [ 12.201155] [drm:radeon_compute_pll_legacy] 108000000 108000, pll dividers - fb: 24.0 ref: 2, post 3
#

Will this patch need to be adapted for my data?

Revision history for this message
Ivan Zakharyaschev (imz) wrote :

I'm afraid my case is different (drm:radeon_compute_pll_legacy).

Perhaps, it's a matter of forcing a better modeline for the LCD, like here -- https://forums.gentoo.org/viewtopic-t-984216-start-0.html . Although mostly I observed the flickering as horizontal lines/line segments, sometimes the flickering did appear as some regions (with text) displayed at another place on the screen appearing extremely quickly and transparently also at a wrong places at the top.

I can try this if I get again to this machine.

This seems to be noticable if there are several complex graphical windows like ownclowd-client (Qt), qupzilla (Qt), Firefox (gtk).

Revision history for this message
thom (tsk) wrote :

@Ivan: There is a slight possibility that the patch could work for you (I don't know because I don't have that hardware). You could test by installing kernel 4.7 from mainline.

The probable cause of the flickering is PLL-resonance which only seems to affect LVDS and only on older GPU-chips. It is mitigated by switching off the fractional divider of the PLL when an LVDS is connected, which is exactly what the patch is doing for chips like RS780/880 (R600) and older.

@everyone:
The patch is in kernel 4.7 now so there is no need anymore to post your results here. Thank you all very much for what you posted thus far; It turned out to be quite helpful.

If the patch is not working for you, you are probably hitting a different bug. Please commit a new bugreport in that case.

Revision history for this message
Boris Gjenero (boris-gjenero) wrote :

I wonder if this is the same bug which I am seeing on my Dell Inspiron 6400 laptop with Radeon X1400 video. Occasionally I get white lines which are very similar to the https://www.youtube.com/watch?v=nx2-Fvihzxg video posted at the beginning. The only difference is that more lines are present at screen edges and high contrast borders. Line length and the way they flicker is very similar.

This problem has been present over multiple Ubuntu versions, and is still present in 64-bit Ubuntu 16.10 with kernel 4.8.0-26-generic. In the past I posted about the problem at: https://ubuntuforums.org/showthread.php?t=2322535

Sometimes I've gotten worse corruption like how Ivan Zakharyaschev (imz) wrote "sometimes the flickering did appear as some regions (with text) displayed at another place on the screen appearing extremely quickly and transparently also at a wrong places at the top." This is more rare than the white lines, and has not happened in Ubuntu 16.10 yet.

Changing video modes can start or stop corruption. So, if I have corruption, run a script which uses xrandr to change to a lower resolution and back to the native resolution. This usually works in one try but sometimes takes a few tries. The problem happens rarely enough that it's not a big deal, but a fix would be nice.

thom (tsk)
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.