[RV730XT] screen corruption in Audacity and OpenOffice.org Calc

Bug #347618 reported by Benjamin Drung
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
xserver-xorg-driver-ati
Invalid
Medium
xserver-xorg-video-ati (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-ati

In Audacity the audio files are not displayed correct (see screen shot) and in OpenOffice.org Calc some lines are not drawn (see screen shot). The bug in Calc appears when the window is roughly greater than 1200 x 900.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: xserver-xorg-video-ati 1:6.12.1-0ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersion: Linux version 2.6.28-11-generic (buildd@crested) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #37-Ubuntu SMP Mon Mar 23 16:40:00 UTC 2009
SourcePackage: xserver-xorg-video-ati
Uname: Linux 2.6.28-11-generic x86_64

[lspci]
00:00.0 Host bridge [0600]: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller [8086:29c0] (rev 02)
     Subsystem: Intel Corporation Device [8086:5044]
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc RV730XT [Radeon HD 4670] [1002:9490]
     Subsystem: Hightech Information System Ltd. Device [1787:2268]

Revision history for this message
Benjamin Drung (bdrung) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :
Bryce Harrington (bryce)
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Bryce Harrington (bryce)
description: updated
Revision history for this message
In , alaperrot (alaperrot) wrote :

Created an attachment (id=25458)
Xorg log with radeon driver, EXA enabled

Hi,

Using the Audacity audio editor version 1.3.7 on my Kubuntu 9.04 desktop system, I noticed that the audio curves display is corrupted when using the radeon (xf68-driver-ati) driver with EXA acceleration enabled on my Radeon HD 3870 (RV670) card.

The radeonhd driver also shows this issue with EXA acceleration enabled.

The display is correct with both drivers when EXA acceleration is disabled.

I am using the Kubuntu 9.04 kernel 2.6.28 with up-to-date drm modules build from the r6xx-r7xx-support branch of the git repository, and both radeon and radeonhd drivers build from the master branch of their git repository.

Revision history for this message
In , alaperrot (alaperrot) wrote :

Created an attachment (id=25459)
Audacity audio editor, with corrupted audio curves

Revision history for this message
In , agd5f (agd5f) wrote :

Do any of these options fix the problem:

Option "EXANoComposite"
Option "EXANoUploadToScreen"
Option "EXANoDownloadFromScreen"

Revision history for this message
In , alaperrot (alaperrot) wrote :

I have just tried with the three options set, but this does not fix the issue.

I have not tried each option alone, but I will do if you think it might be useful.

Revision history for this message
In , Rafael Monica (monraaf-deactivatedaccount) wrote :

Hi Alex, I have also this bug with audacity on my HD 3200 IGP. The options you mentioned did not have any effect. However using

Option "MigrationHeuristic" "greedy"

does seem to fix the problem.

Revision history for this message
In , agd5f (agd5f) wrote :

Does the patch I attached help?

Revision history for this message
In , agd5f (agd5f) wrote :

This might be an issue with the EXA core code. The patch sets all the accel hooks to fall back to software.

Revision history for this message
In , Rafael Monica (monraaf-deactivatedaccount) wrote :

Yes, the attached patch works. However the software fall back is unbearably slow.

Revision history for this message
In , alaperrot (alaperrot) wrote :

I can confirm that the patch fix the corruption at the cost of performance.

Revision history for this message
In , agd5f (agd5f) wrote :

(In reply to comment #8)
> I can confirm that the patch fix the corruption at the cost of performance.
>

the performance will be slow as it disables acceleration. I just wanted to see if it was an EXA bug or a driver bug.

Revision history for this message
In , agd5f (agd5f) wrote :

Created an attachment (id=25570)
disable EXA copy

Try these two patches separately to see whether it's EXA copy or solid that is causing the problem.

Revision history for this message
In , agd5f (agd5f) wrote :

Created an attachment (id=25571)
disable EXA solid

Revision history for this message
In , alaperrot (alaperrot) wrote :

Disable EXA copy: issue is still there
Disable EXA solid: issue fixed

Revision history for this message
In , Rafael Monica (monraaf-deactivatedaccount) wrote :

(In reply to comment #12)
> Disable EXA copy: issue is still there
> Disable EXA solid: issue fixed
>

Yep, same here.

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

Can't seem to reproduce this on an RV350, so maybe it's a bug in the R600 Solid code.

Revision history for this message
In , agd5f (agd5f) wrote :

Created an attachment (id=25613)
fallback for all solid rops except gxcopy

Does this patch help?

Revision history for this message
In , Rafael Monica (monraaf-deactivatedaccount) wrote :

Nope. But changing the if (alu != 3) to if (alu == 3) does work,
unsurprisingly :-)

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

Not sure this is the problem, but one thing I notice is that the R600Prepare{Solid,Copy} hooks don't seem to handle the planemask correctly - they just seem to assume it's a 32 bit ARGB component mask. They need to take the pixmap depth into account and fall back if the mask doesn't correspond to a set of components.

Bryce Harrington (bryce)
summary: - [rv730] screen corruption in Audacity and OpenOffice.org Calc
+ [RV730] screen corruption in Audacity and OpenOffice.org Calc
Bryce Harrington (bryce)
tags: added: corruption
Revision history for this message
Leo (linux-fractal) wrote : Re: [RV730] screen corruption in Audacity and OpenOffice.org Calc

I also have this issue. lspci reports the following about my graphics card:
01:00.0 VGA compatible controller: ATI Technologies Inc RV770 [Radeon HD 4870]

Changed in xserver-xorg-driver-ati:
status: Unknown → Confirmed
Bryce Harrington (bryce)
summary: - [RV730] screen corruption in Audacity and OpenOffice.org Calc
+ [RV730XT] [RV730] screen corruption in Audacity and OpenOffice.org Calc
Bryce Harrington (bryce)
summary: - [RV730XT] [RV730] screen corruption in Audacity and OpenOffice.org Calc
+ [RV730XT] screen corruption in Audacity and OpenOffice.org Calc
Revision history for this message
In , Gtdev (gtdev) wrote :

A quick "me too": I am experiencing the issue on an HD4870 (RV770) with what Debian ships as version 6.12.2 of the "radeon" driver.

Bryce Harrington (bryce)
tags: added: jaunty
Revision history for this message
Benjamin Drung (bdrung) wrote :

Karmic is still affected.

$ apt-cache policy xserver-xorg-video-ati
xserver-xorg-video-ati:
  Installed: 1:6.12.99+git20090629.f39cafc5-0ubuntu5
  Candidate: 1:6.12.99+git20090629.f39cafc5-0ubuntu5
  Version table:
 *** 1:6.12.99+git20090629.f39cafc5-0ubuntu5 0
        500 file: karmic/main Packages
        500 http://de.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

tags: added: karmic
Bryce Harrington (bryce)
Changed in xserver-xorg-video-ati (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
Benjamin Drung (bdrung) wrote :

For OpenOffice.org this bug is harmless, but it makes audacity unusable.

Revision history for this message
Benjamin Drung (bdrung) wrote :

Up-to-date karmic is still affected.

$ apt-cache policy xserver-xorg-video-ati
xserver-xorg-video-ati:
  Installiert: 1:6.12.99+git20090825.fc74e119-0ubuntu1
  Kandidat: 1:6.12.99+git20090825.fc74e119-0ubuntu1
  Versions-Tabelle:
 *** 1:6.12.99+git20090825.fc74e119-0ubuntu1 0
        500 file: karmic/main Packages
        500 http://de.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Chris (cdekker) wrote :

Karmic's beta release has the same problem on my ATI HD 3300 IGP. I agree with Benjamin that this bug makes audacity pretty much useless for me.

Revision history for this message
Chris (cdekker) wrote :

Additional comment: If you really need to use audacity, installing the ATI catalyst driver (using envyng -t) resolved this issue for me.

Revision history for this message
Benjamin Drung (bdrung) wrote :

Using fglrx is no option for me due to bug #303697. I do not "use" audacity on this machine, I maintain it only there. ;)

Revision history for this message
In , agd5f (agd5f) wrote :

*** Bug 21855 has been marked as a duplicate of this bug. ***

Revision history for this message
In , agd5f (agd5f) wrote :

Is there a specific audio file or spreadsheet that exhibits this? I can't reproduce this on any r6xx or r7xx hardware I have.

Revision history for this message
In , Yang-yangman (yang-yangman) wrote :

(In reply to comment #20)
> Is there a specific audio file or spreadsheet that exhibits this? I can't
> reproduce this on any r6xx or r7xx hardware I have.

Seems to only apply to a very dense waveform. Try a sample that's at least several seconds long.

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

Alex, addressing the problem described in comment #17 might be a good start. :)

Revision history for this message
In , alaperrot (alaperrot) wrote :

Created an attachment (id=30183)
Audio file with short parts correctly displayed, and longer parts corrupted

Revision history for this message
In , alaperrot (alaperrot) wrote :

(In reply to comment #20)
> Is there a specific audio file or spreadsheet that exhibits this? I can't
> reproduce this on any r6xx or r7xx hardware I have.
>

All of the audio files I tried show some corruptions. These files are vinyl disc rips.

One thing I didn't noticed before however with one of these files is that some parts of the curves are correctly diplayed while others are corrupted. The parts that are correctly displayed are less than 1 minute long, while the corrupted ones are longer. I attached a screenshot of Audacity diplaying this file.

Revision history for this message
In , agd5f (agd5f) wrote :

Created an attachment (id=30189)
properly check planemasks

Does this patch help?

Revision history for this message
In , Rafał Miłecki (zajec5) wrote :

(In reply to comment #25)
> Created an attachment (id=30189) [details]
> properly check planemasks
>
> Does this patch help?

Did not help on my RV620 (M82). I've added some debugging to this patch. R600ValidPM is called very often, but:

> if (!R600ValidPM(pm, pPix->drawable.bitsPerPixel))
> RADEON_FALLBACK(("invalid planemask\n"));

never happens in any: Solid or Copy. I've changed that in both places to:

> if (!R600ValidPM(pm, pPix->drawable.bitsPerPixel)) {
> xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[ZAJEC] invalid");
> RADEON_FALLBACK(("invalid planemask\n"));
> }

and nothing in my log.

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

The patch basically looks good, so that rules out the planemask...

The screenshots look like maybe some of the solid fills are dropped on the floor. Has the code below in R600Solid() been tested to work correctly? Maybe it would need to e.g. do some more of the things R600PrepareSolid() does?

    if (((accel_state->vb_index + 3) * 8) > accel_state->vb_total) {
        R600DoneSolid(pPix);
 r600_cp_start(pScrn);
    }

Revision history for this message
In , Rafał Miłecki (zajec5) wrote :

(In reply to comment #25)
> Created an attachment (id=30189) [details]
> properly check planemasks
>
> Does this patch help?

I've also added printing a, r, g and b in ValidPM function (with ZAJEC prefix).

> grep ZAJEC /var/log/Xorg.0.log | wc -l
26239
> grep ZAJEC /var/log/Xorg.0.log | uniq
(II) RADEON(0): [ZAJEC] a:ff ; r:ff ; g:ff ; b:ff

Btw. this patch is not going to driver, is it? Because I feel you missed "break" in case 8.

Revision history for this message
In , agd5f (agd5f) wrote :

does de55995e82c3875f70b6394fff440d695d062113 help?

Revision history for this message
In , Rafał Miłecki (zajec5) wrote :

(In reply to comment #29)
> does de55995e82c3875f70b6394fff440d695d062113 help?

I would like MrCooper to be wrong. Unfortunately he is not :(

<MrCooper> agd5f: from Zajec's debugging it looks like there are only solid masks, so it probably doesn't help

Revision history for this message
In , alaperrot (alaperrot) wrote :

(In reply to comment #29)
> does de55995e82c3875f70b6394fff440d695d062113 help?
>

I've just checked with an updated radeon driver, including commit de55995e82c3875f70b6394fff440d695d062113. Corruption is still there.

Changed in xserver-xorg-driver-ati:
status: Confirmed → Invalid
Benjamin Drung (bdrung)
Changed in xserver-xorg-driver-ati:
status: Invalid → Unknown
Changed in xserver-xorg-driver-ati:
status: Unknown → Confirmed
Revision history for this message
In , alaperrot (alaperrot) wrote :

Hi,

Some news on this issue.

I am currently testing kernel mode setting on my Radeon HD 3870 using Kubuntu 9.10, Linux 2.6.32-rc7 from Ubuntu kernel PPA and libdrm/radeon/mesa from Xorg-edgers PPA.

When KMS is disabled, the audio curves are still corrupted in Audacity, but when KMS is enabled, the audio curves are correctly displayed.

It also looks like other minor graphical glitches that I used to have with KDE (mostly in the panel) and in NetBeans 6.7 IDE splash screen completely disappear when KMS is enabled.

I will switch back to UMS for now because of some performance issues (mostly scrolling in Firefox), but KMS really impressed me so far.

Revision history for this message
In , agd5f (agd5f) wrote :

Do the latest changes in git master make any difference?

Revision history for this message
In , Rafał Miłecki (zajec5) wrote :

(In reply to comment #33)
> Do the latest changes in git master make any difference?

Tried current git (commit ce8299962003de572122561a6f7f61eaccf633b2) still broken.

Revision history for this message
Benjamin Drung (bdrung) wrote :

This bug is finally fixed in lucid.

$ apt-cache policy xserver-xorg-video-atixserver-xorg-video-ati
  Installed: 1:6.12.99+git20100126.e5933fd7-0ubuntu1
  Candidate: 1:6.12.99+git20100126.e5933fd7-0ubuntu1
  Version table:
 *** 1:6.12.99+git20100126.e5933fd7-0ubuntu1 0
        500 file: lucid/main Packages
        500 http://de.archive.ubuntu.com lucid/main Packages
        100 /var/lib/dpkg/status

Changed in xserver-xorg-video-ati (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
In , Udovdh (udovdh) wrote :

A 'me too' here.
Can easily reproduce the issue in Audacity.
Patch 'disable EXA solid' works around the issue.
Can test more if needed. Please supply patches etc.

Revision history for this message
In , Rafael Monica (monraaf-deactivatedaccount) wrote :

This bug is gone since I switched to kms.

Revision history for this message
In , Udovdh (udovdh) wrote :

(In reply to comment #35)
> A 'me too' here.

I see the error with radeon (F12 latest) *AND* radeonhd (git, also on 1.2.5).

Can easily reproduce the issue in Audacity.
Can test more if needed. Please supply patches etc.

Revision history for this message
In , Udovdh (udovdh) wrote :

After undoing the patch at https://bugs.freedesktop.org/attachment.cgi?id=25571 amd applying this patch:

      --- a/src/r600_exa.c
      +++ b/src/r600_exa.c
      @@ -267,6 +267,7 @@ R600Solid(PixmapPtr pPix, int x1, int y1, int x2, int y2)

           if (((accel_state->vb_index + 3) * 8) > (accel_state->ib->total / 2)) {
              R600DoneSolid(pPix);
      + ErrorF("udo: bla\n");
              accel_state->vb_index = 0;
              accel_state->ib = RHDDRMCPBuffer(pScrn->scrnIndex);
           }

And staring Audacity and generating some DTMF we saw some `udo: bla` lines logged.
Conclusion:

<agd5f> udovdh: ok. well, if it's really dropping rendering due to missing state, the ddx really needs to be re-organized like mesa to set and emit state functions

Revision history for this message
In , agd5f (agd5f) wrote :

Created an attachment (id=34974)
untested patch

If the bug is indeed related to state, this hack might help, but the real solution is probably to rewrite the EXA and Xv code to track/emit state like mesa does. Unfortunately, that means a fairly major rewrite of the current code.

Revision history for this message
In , Airlied-freedesktop (airlied-freedesktop) wrote :

Just to add my analysis to this for posterity.

This is a UMS bug only, it could happen with KMS, its just extremely unlikely.

When we emit the solid vertices in KMS, we don't have to flush the whole indirect buffer when we run out of VBO space, we just create a new VBO and continue from there, adding a new VBO to the current IB involves writing 7+7+5+11+10 = 40 dwords to the IB. We currently leave a buffer of 1024 dwords in the command stream, so that is quite a lot of VBOs.

Changed in xserver-xorg-driver-ati:
importance: Unknown → Medium
Changed in xserver-xorg-driver-ati:
importance: Medium → Unknown
Changed in xserver-xorg-driver-ati:
importance: Unknown → Medium
Revision history for this message
In , penalvch (penalvch) wrote :

Alain Perrot, Kubuntu 9.10 reached EOL on April 30, 2011. For more on this, please see https://wiki.ubuntu.com/Releases .

If this is reproducible on a supported release, it will help immensely if you filed a new report with Ubuntu by ensuring you have the package xdiagnose installed, and that you click the Yes button for attaching additional debugging information running the following from a terminal:
ubuntu-bug xorg

Also, please feel free to subscribe me to it.

For more on why this is helpful, please see https://wiki.ubuntu.com/ReportingBugs.

Changed in xserver-xorg-driver-ati:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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