Mir

[radeon] Graphic glitches and screen corruption (vertical lines) on XMir surfaces only

Bug #1218815 reported by Weegee
98
This bug affects 17 people
Affects Status Importance Assigned to Milestone
Mir
Invalid
Critical
Daniel van Vugt
mir (Ubuntu)
Invalid
Undecided
Unassigned
xorg-server (Ubuntu)
Invalid
Critical
Chris Halse Rogers
xserver-xorg-video-ati (Ubuntu)
Fix Released
Critical
Chris Halse Rogers

Bug Description

Since the latest Ubuntu Mir update which enabled the bypass support I get heavy graphic glitches when using the unity-system-compositor. I had to disable it in order to use the desktop as the graphic glitches made it impossible to read anything.

Before this update everything worked fine.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: xserver-xorg-xmir 2:1.14.2.901-2ubuntu4
ProcVersionSignature: Ubuntu 3.11.0-4.9-generic 3.11.0-rc7
Uname: Linux 3.11.0-4-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.12.1-0ubuntu2
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,vpswitch,snap,mousepoll,resize,place,move,wall,grid,regex,imgpng,session,gnomecompat,animation,fade,unitymtgrabhandles,workarounds,scale,expo,ezoom,unityshell]
Date: Fri Aug 30 12:00:42 2013
DistUpgraded: 2013-05-10 03:13:26,850 DEBUG enabling apt cron job
DistroCodename: saucy
DistroVariant: ubuntu
DkmsStatus:
 bcmwl, 6.30.223.30+bdcom, 3.11.0-3-generic, x86_64: installed
 bcmwl, 6.30.223.30+bdcom, 3.11.0-4-generic, x86_64: installed
ExtraDebuggingInterest: Yes
GraphicsCard:
 Advanced Micro Devices, Inc. [AMD/ATI] Madison [Mobility Radeon HD 5650/5750 / 6530M/6550M] [1002:68c1] (prog-if 00 [VGA controller])
   Subsystem: Acer Incorporated [ALI] Mobility Radeon HD 5650 [1025:036e]
InstallationDate: Installed on 2012-12-13 (260 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MachineType: Acer TravelMate 5542G
MarkForUpload: True
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.11.0-4-generic root=UUID=70d95406-69a9-4dd1-a199-efd5432bae25 ro quiet splash radeon.dpm=1 vt.handoff=7
SourcePackage: xorg-server
UpgradeStatus: Upgraded to saucy on 2013-05-10 (112 days ago)
dmi.bios.date: 07/27/2011
dmi.bios.vendor: Acer
dmi.bios.version: V2.14
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: BA51_DN
dmi.board.vendor: Acer
dmi.board.version: Base Board Version
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.version: V2.14
dmi.modalias: dmi:bvnAcer:bvrV2.14:bd07/27/2011:svnAcer:pnTravelMate5542G:pvrV2.14:rvnAcer:rnBA51_DN:rvrBaseBoardVersion:cvnAcer:ct10:cvrV2.14:
dmi.product.name: TravelMate 5542G
dmi.product.version: V2.14
dmi.sys.vendor: Acer
version.compiz: compiz 1:0.9.10+13.10.20130828.2-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.46-1
version.libgl1-mesa-dri: libgl1-mesa-dri 9.2-1ubuntu1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 9.2-1ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.14.2.901-2ubuntu4
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.3-0ubuntu3.1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.2.0-0ubuntu4
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.21.14-4ubuntu3
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.9-2ubuntu1
xserver.bootTime: Fri Aug 30 11:53:04 2013
xserver.configfile: default
xserver.errors:

xserver.logfile: /var/log/Xorg.0.log
xserver.outputs: Output XMIR-1 XMIR-2
xserver.version: 2:1.14.2.901-2ubuntu4
xserver.video_driver: radeon

Related branches

Revision history for this message
Weegee (weegee) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: [radeon] Graphic glitches and screen corruption since the latest update

Can you please:

1. Take a photo and attach it here?
2. Try the workaround mentioned at the top of bug 1218735?

summary: - Graphic glitches and screen corruption since the latest update
+ [radeon] Graphic glitches and screen corruption since the latest update
Changed in mir:
status: New → Incomplete
Changed in xorg-server (Ubuntu):
status: New → Incomplete
tags: added: radeon
Revision history for this message
Weegee (weegee) wrote :

Sorry for the bad photo, I'll try to get a better one with a better camera tomorrow. This is how it looks in LightDM.

The workaround you mentioned didn't work for me.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Interesting the workaround would not work, because it looks like bypass mode has the wrong pixel format. But I'm also glad bypass isn't broken too. Please double-check that the workaround really does not help. Also remember to reboot.

Secondly, please try this (or something like it):
  1. sudo apt-get install mir-demos
  2. Reproduce the corruption
  3. Switch to a VT that works (Ctrl+Alt+F1) or install openssh-server and ssh in.
  4. sudo mir_demo_client_egltriangle
  5. Switch back to VT 7: Ctrl+Alt+F7
Now, is the triangle visible without corruption? Can you take another photo?

If all else fails, are you able to look in your /var/cache/apt/archives/ and find which package version introduced the bug, by installing slightly older versions? You can just:
    cd /var/cache/apt/archives/
    sudo dpkg -i <whatever deb files to try>

summary: - [radeon] Graphic glitches and screen corruption since the latest update
+ [radeon] Graphic glitches and screen corruption (vertical lines)
Revision history for this message
Weegee (weegee) wrote : Re: [radeon] Graphic glitches and screen corruption (vertical lines)

I double-checked the workaround and it still didn't work.

The photo this time shows what LightDM looks like after I run "sudo mir_demo_client_egltriangle" on another VT. The triangle looks perfectly fine and spins with smooth 60 fps, but everything else is still garbage.

I don't have the time right now to downgrade all mir-related packages, but I'll try that later.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. That's at least great progress and we've narrowed the problem down to XMir.

Changed in mir:
status: Incomplete → Invalid
Changed in xorg-server (Ubuntu):
status: Incomplete → New
summary: - [radeon] Graphic glitches and screen corruption (vertical lines)
+ [radeon] Graphic glitches and screen corruption (vertical lines) on XMir
+ surfaces only
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xorg-server (Ubuntu):
status: New → Confirmed
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Changed in xmir:
status: New → Confirmed
no longer affects: mir
Changed in xserver-xorg-video-ati (Ubuntu):
importance: Undecided → Medium
Changed in xorg-server (Ubuntu):
importance: Undecided → Medium
Changed in xmir:
importance: Undecided → Medium
Changed in xserver-xorg-video-ati (Ubuntu):
status: Confirmed → Triaged
Changed in xorg-server (Ubuntu):
status: Confirmed → Triaged
Changed in xmir:
status: Confirmed → Triaged
Changed in xmir:
importance: Medium → Critical
Changed in xorg-server (Ubuntu):
importance: Medium → Critical
Changed in xserver-xorg-video-ati (Ubuntu):
importance: Medium → Critical
kevin gunn (kgunn72)
tags: added: make-xmir-default
Revision history for this message
Weegee (weegee) wrote :

After downgrading several Mir packages (libmirclient2, libmirplatform, libmirprotobuf0, libmirserver1) to a version before the bypass update I had in my cache (0.0.10+13.10.20130828-0ubuntu1), everything seems to be okay again. Version 0.0.10+13.10.20130829-0ubuntu1 and everything after that all produce the graphic glitches.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK then. I would blame bypass but based on comment #5 you're effectively saying bypass is not the problem (because it still happens with bypass disabled).

Other changes that landed between those two package versions (r1028..1033) are relatively insignificant. So the possibilities are:
1. One of those insignificant changes has caused the problem; or
2. You made a mistake when trying the workaround from bug 1218735; or
3. You downgraded some other package which has fixed the problem.

I think #3 is now most likely, so... Using the "working" packages, please run "ps auxw | grep mir" and verify for us that Mir is in fact running. Also try "ps auxw | grep unity-system-compositor".

Please also try generating a full package list for both the working and non-working states, with:
    dpkg -l > working.txt
and then break it again before doing:
    dpkg -l > nonworking.txt
and attach those.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's been suggested we have an incorrect stride value for scanout buffers (even when they're not being scanned out). That would certainly agree with the screenshot in comment #5. So I think a fix is required via mir_surface_get_current_buffer() ?...

_X_EXPORT int32_t
xmir_window_get_stride(xmir_window *xmir_win)
{
    MirBufferPackage *package;

    mir_surface_get_current_buffer(xmir_win->surface, &package);

    return package->stride;
}

Changed in mir:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Chris Halse Rogers (raof) wrote :

So, this might be due to differing radeon_surface layouts based on the RADEON_SURF_SCANOUT flag.

tvoss can apparently reproduce this, and it goes away when he *doesn't* add the SCANOUT flag to the gbm bo in Mir¹. XMir never sets RADEON_SURF_SCANOUT, so it's plausible that this is the issue.

¹: Luckily, it appears that this buffer still happens to be scanoutable ☺

Revision history for this message
Weegee (weegee) wrote :

Finally it's weekend, so I have some time for troubleshooting :)

First of all, I took some new photos. glitches01 shows how the graphic corruptions looks most of the time when I'm not doing anything (like moving the mouse or whatever), glitches02 is a photo of what my screen looks like when I move the mouse cursor. Also, I tried mir_demo_client_egltriangle again, which you can see in the third photo. All these photos are from the current Mir version (0.0.10+13.10.20130903-0ubuntu1).

Then I downgraded the following packages

libmirclient2
libmirclient-dev
libmirplatform
libmirprotobuf0
libmirprotobuf-dev
libmirserver1
libmirserver-dev
mircommon-dev
mir-demos
unity-system-compositor

to version 0.0.10+13.10.20130828.1-0ubuntu1 (or 0.0.1+13.10.20130828.1-0ubuntu1 for unity-system-compositor), after which the bug disappeared once again. I also confirmed that Mir is running via ps. Also, I created the package lists for both the working and non-working state.

If there's anything more I can do please let me know :)

Revision history for this message
Weegee (weegee) wrote :
Revision history for this message
Weegee (weegee) wrote : Re: [Bug 1218815] Re: [radeon] Graphic glitches and screen corruption (vertical lines) on XMir surfaces only

Whoops, I forgot to use the mail interface to attach several things at
once. Sorry about that.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks Weegee. Your details show that it indeed started happening around the time when bypass landed:

Working: 0.0.10+13.10.20130828.1-0ubuntu1
Non-working: 0.0.10+13.10.20130903-0ubuntu1

Changed in xserver-xorg-video-ati (Ubuntu):
assignee: nobody → Chris Halse Rogers (raof)
Changed in xmir:
assignee: nobody → Chris Halse Rogers (raof)
Changed in xorg-server (Ubuntu):
assignee: nobody → Chris Halse Rogers (raof)
Changed in mir:
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision 1063, scheduled for release in mir, milestone 0.0.11

Changed in mir:
status: Triaged → Fix Committed
Changed in mir:
status: Fix Committed → Triaged
Revision history for this message
Weegee (weegee) wrote :

Cool, the issue has been fixed? When can I expect the 0.0.11 release in saucy-proposed?

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

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

Changed in mir (Ubuntu):
status: New → Confirmed
Revision history for this message
inferrna (inferrna) wrote :

Also affects me, see bug 1223334

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Mir won't be used at all with the proprietary drivers. Ubuntu should fall back to traditional X. So it's not going to "work" in fglrx, just worked around.

Changed in xserver-xorg-video-ati (Ubuntu):
assignee: Chris Halse Rogers (raof) → Daniel van Vugt (vanvugt)
status: Triaged → In Progress
Changed in xserver-xorg-video-ati (Ubuntu):
status: In Progress → Fix Released
Changed in xserver-xorg-video-ati (Ubuntu):
status: Fix Released → In Progress
no longer affects: mir (Ubuntu)
Changed in xmir:
status: Triaged → Invalid
Changed in xorg-server (Ubuntu):
status: Triaged → Invalid
Changed in mir:
status: Triaged → Invalid
Changed in mir (Ubuntu):
status: New → Invalid
Changed in xserver-xorg-video-ati (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → Chris Halse Rogers (raof)
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.7 KiB)

This bug was fixed in the package mir - 0.0.11+13.10.20130924.1-0ubuntu1

---------------
mir (0.0.11+13.10.20130924.1-0ubuntu1) saucy; urgency=low

  [ kg ]
  * bump version for ABI break (LP: #1229212)

  [ Robert Ancell ]
  * Allow an application to override the options being populated.
  * Pass the program options to parse_options().
  * Add missing include for std::cerr.
  * Report when paused and resumed via configuration. (LP: #1192843)
  * Add missing directory separator when searching for a config file to
    parse.

  [ Kevin Gunn ]
  * change test timeouts and fix fence.

  [ Alexandros Frantzis ]
  * examples: Only check key information for key events This fixes a
    memory error reported by valgrind for examples that use eglapp.
  * shell: Apply the base configuration on a hardware change only if no
    per-session configuration is active.
  * graphics: consolidated fixed for nested code and examples on android
    stack.

  [ Eleni Maria Stea ]
  * graphics: Pull in Eleni's changes to get the DRM fd to init GBM from
    the host Mir instance.

  [ Didier Roche ]
  * remove (unused in the ppa as we have libmirserver3) hack to force
    depending and building against the exact same version.

  [ Robert Carr ]
  * Add DPMS configuration API. (LP: #1193222)
  * Deduplicate mtd::NullDisplayConfig and
    mtd::NullDisplayConfiguration.
  * Fix multiple internal client surfaces on android. (LP: #1228144)
  * change test timeouts and fix fence.
  * Add DPMS API and GBM/android impls.

  [ Kevin DuBois ]
  * platform, graphics: support nested (mir-on-mir) rendering on the
    Android platform.

  [ Michael Terry ]
  * Change how Mir chooses socket locations to make it simpler for a
    nested-Mir world, by using MIR_SOCKET as the host socket if no other
    host socket is provided and passing MIR_SOCKET on to any children.
    Also, change --nested-mode to --host-socket for clarity and add --
    standalone to force standalone mode.

  [ Daniel d'Andrada ]
  * android-input housekeeping - Updated README - Removed some dead
    code.

  [ Daniel van Vugt ]
  * Add DPMS configuration API. (LP: #1193222)
  * Add a "flags" field to MirBufferPackage so that clients can find out
    if the buffer they've been given is scanout-capable. This is
    normally something a client should never need to know. However there
    are two specialized cases where it's required to fix bugs in the
    intel and radeon X drivers:   LP: #1218735, LP: #1218815 The intel
    fix (already landed) contains a hack which will be updated after
    this branch lands. (LP: #1218815, #1218735)
  * GBM: Ensure that we don't create scanout buffers if bypass is
    explicitly disabled from the environment. (LP: #1227133) . (LP:
    #1227133)

  [ Alan Griffiths ]
  * graphics: Pull in Eleni's changes to get the DRM fd to init GBM from
    the host Mir instance.
  * input: Separate the code for dispatching input from that reading it.
  * graphics: Hook up nested surfaces events to input.
  * input: Connect nested input relay to input dispatch.
  * graphics: Simplify NativeAndroidPlatform out of existence.
  * tests: Fixes to get the tests "passing" on android/arm stack. (LP...

Read more...

Changed in mir (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
Weegee (weegee) wrote :

I upgraded using the proposed repository to Mir version 0.0.11+13.10.20130924.1-0ubuntu1 (xserver-xorg-xmir is on version 2:1.14.2.901-2ubuntu5), and I still get the problems I mentioned in earlier posts (except this time the screen stays "normal" for like half a second, then switches back to being filled with graphic corruption). I can make photos again if you wish and post some logs too later on.

Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

WeeGee,
did you also apt-get install xserver-xorg-video-radeon?

Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

I am not seeing this in saucy on a clean install after apt-get update && apt-get install unity-system-compositor xserver-xorg-video-radeon && reboot. I tested this on a radeon hd5750 that used to have black lines

Revision history for this message
Weegee (weegee) wrote :

I purgedd xserver-xorg-video-ati xserver-xorg-video-radeon xserver-xorg-xmir and unity-system-compositor and then reinstalled the packages, I still have this issue after a reboot though.

Revision history for this message
Giovanni Battista Salvietti (giovannibattista-salvietti) wrote :

Same thing here, fix seems to not fix anything...

Revision history for this message
Per-Inge (per-inge-hallin) wrote :

I have made updates today and yesterday according to the attachment.
My computer with Radeon HD 6670 has the same behaviour as mentioned by WeeGee. The update of unity-system-compositor makes it a little better. In case I place the cursor in the input field in the login screen, there are no corruptions, but as soon as I type anything or move the cursor, the graphic corruptions starts.

Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

I am seeing the vertical lines again today.

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

This bug was fixed in the package xserver-xorg-video-ati - 1:7.2.0-0ubuntu9

---------------
xserver-xorg-video-ati (1:7.2.0-0ubuntu9) saucy; urgency=low

  * Build-depend on libatomic-ops-dev.
  * Configure with --disable-silent-rules.
 -- Matthias Klose <email address hidden> Thu, 26 Sep 2013 22:32:12 +0200

Changed in xserver-xorg-video-ati (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Weegee (weegee) wrote :

After the latest updates I don't have this issue anymore.

Revision history for this message
Per-Inge (per-inge-hallin) wrote :

Thanks,
My system is also working OK now after updates today.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Invalid for Mir. The bug was in the radeon X driver.

Changed in mir (Ubuntu):
status: Fix Released → Invalid
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

To be more accurate the fix went in:

xserver-xorg-video-ati (1:7.2.0-0ubuntu8) saucy; urgency=low

  * xmir.patch: Fix detection of linear tiling in Evergreen EXA copy path.
    Fixes vertical-bar-corruption on some Evergreen cards (LP: #1218815)
 -- Christopher James Halse Rogers <email address hidden> Fri, 20 Sep 2013 11:59:52 -0400

However no builds with the fix succeeded until 1:7.2.0-0ubuntu9.

Revision history for this message
Geoff Teale (tealeg) wrote :

As of right now this bug is gone for me - successfully running unity on top of unity-system-compositor on my AMD A8 3500m with an embedded Radeon HD 6620G. Very happy man :-)

Revision history for this message
Kai Mast (kai-mast) wrote :

I still have this problem. I also enabled saucy-proposed, but no change.

Accoring to lshw I have the following chip "Mobility Radeon HD 4225/4250"

I have xserver-xorg-xmir, xserver-xorg-radeon, xserver-xorg-ati and unity-system-compositor installed. Without USC everything looks fine.

Revision history for this message
Kai Mast (kai-mast) wrote :

Could it be that this bug is only fixed in the "ati" driver and not in the "radeon" driver?

Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

can you post apt-cache policy xserver-xorg-video-radeon and apt-cache policy unity-system-compositor?

Revision history for this message
Kai Mast (kai-mast) wrote :

kai@Kai-Laptop:~$ apt-cache policy xserver-xorg-video-radeon
xserver-xorg-video-radeon:
  Installed: 1:7.2.0-0ubuntu9
  Candidate: 1:7.2.0-0ubuntu9
  Version table:
 *** 1:7.2.0-0ubuntu9 0
        500 http://archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
        100 /var/lib/dpkg/status

kai@Kai-Laptop:~$ apt-cache policy unity-system-compositor
unity-system-compositor:
  Installed: 0.0.1+13.10.20130926.1-0ubuntu1
  Candidate: 0.0.1+13.10.20130926.1-0ubuntu1
  Version table:
 *** 0.0.1+13.10.20130926.1-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Peter S (peter-sevemark) wrote :

After my saucy update today it seems to work! Good work!

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Kai,

Can you post a photo of your continuing problems?

Revision history for this message
Kai Mast (kai-mast) wrote :

I made a video because the issue only occurs when I move the mouse. I only captured lightdm but I have exactly the same behaviour on the Desktop aswell. (Is lightdm even using xmir? )

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Kai,

That's for the video. That's quite bad but also a different bug. This one was specifically about vertical lines. So please detail your bug in a new one:
    https://bugs.launchpad.net/mir/+filebug

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I mean, "thanks for the video".

Revision history for this message
Kai Mast (kai-mast) wrote :

No problem. Filed the bug here: https://bugs.launchpad.net/mir/+bug/1233545

To post a comment you must log in.