Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658652 - x11-base/xorg-server-1.20.0: major glitches with (x11-drivers/xf86-video-ati-18.0.1-r1)
Summary: x11-base/xorg-server-1.20.0: major glitches with (x11-drivers/xf86-video-ati-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-21 14:48 UTC by Michał Górny
Modified: 2018-09-16 08:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Xorg.0.log.old (from broken xorg-server) (Xorg.0.log.old,43.41 KB, text/plain)
2018-06-21 14:48 UTC, Michał Górny
Details
first-start.jpeg (first-start.jpeg,170.03 KB, image/jpeg)
2018-06-23 08:03 UTC, Michał Górny
Details
second-start.png (second-start.png,461.47 KB, image/png)
2018-06-23 08:04 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-06-21 14:48:04 UTC
Created attachment 536666 [details]
Xorg.0.log.old (from broken xorg-server)

It seems that x11-base/xorg-server-1.20.0 either reintroduces the issue I've been hitting before, or something very similar.

Symptoms:

1. Very often (90% of the time) first start of xorg-server results in totally glitched screen (usually a lot of gray and/or random mixed parts of what was earlier on screen).  I haven't been able to determine whether the display is actually operational or hanged.

2. In the remaining 1 out of 10 boots, my Xfce starts with a few glitches.  However, when I open terminal and start typing, new artifacts quickly appear and soon fonts become completely unreadable and the screen looks like puzzle made of distorted font letters.

3. If I go to tty, restart lightdm, xorg starts fine the second time.  There are still artifacts sometimes, and sometimes high CPU usage but it's much better (almost usable).

4. dmesg is full of this (both on first and second Xorg start):

Jun 21 15:03:14 pomiot kernel: [drm:radeon_cs_parser_relocs [radeon]] *ERROR* gem object lookup failed 0xc
Jun 21 15:03:14 pomiot kernel: [drm:radeon_cs_ioctl [radeon]] *ERROR* Failed to parse relocation -2!
Jun 21 15:03:14 pomiot kernel: [drm:radeon_cs_parser_relocs [radeon]] *ERROR* gem object lookup failed 0xc
Jun 21 15:03:14 pomiot kernel: [drm:radeon_cs_ioctl [radeon]] *ERROR* Failed to parse relocation -2!
Jun 21 15:03:14 pomiot kernel: [drm:radeon_cs_parser_relocs [radeon]] *ERROR* gem object lookup failed 0xc
Jun 21 15:03:14 pomiot kernel: [drm:radeon_cs_ioctl [radeon]] *ERROR* Failed to parse relocation -2!
Jun 21 15:03:14 pomiot kernel: radeon 0000:02:00.0: evergreen_cs_track_validate_texture:855 texture bo too small (layer size 4864, offset 0, max lax layer 1, depth 1, bo size 4096) (64 19)
Jun 21 15:03:14 pomiot kernel: [drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !
[the last two lines repeating a lot]

5. Downgrading to 1.19.5-r2 solves the issues.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-06-23 07:59:51 UTC
The patches don't help, and neither does upgrading to xorg-server-9999.  I'm going to test xf86-video-ati-9999 just in case but I'm not getting my hopes up.  I'll also attach the distortions I'm seeing.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-06-23 08:03:16 UTC
Created attachment 536886 [details]
first-start.jpeg

This is the kind of distortion I'm seeing after first xorg start after reboot.  What you see are pieces of image before the reboot, shuffled and not really updating.  However, the mouse pointer is moving.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-06-23 08:04:18 UTC
Created attachment 536888 [details]
second-start.png

And this is a screenshot after lightdm restart.  The screen is mostly fine, except for artifacts in window decorations (see top-right corner).  Sometimes there are more artifacts, e.g. the whole title bar goes gray.
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2018-06-24 19:16:34 UTC
More things which you can try to isolate the issue:

* use EXA instead of glamor
* disable DRI3
* use modesetting instead of radeon DDX
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-06-24 19:25:38 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #5)
> More things which you can try to isolate the issue:
> 
> * use EXA instead of glamor
> * disable DRI3
> * use modesetting instead of radeon DDX

Do you happen to have some nice guide with short instructions how to do that stuff? ;-)
Comment 7 Chí-Thanh Christopher Nguyễn gentoo-dev 2018-06-24 19:59:03 UTC
Put something akin to this in xorg.conf:

Section "Device"
    Identifier "Radeon card"
    Driver "radeon"
    Option "DRI" "3"
    Option "AccelMethod" "glamor"
EndSection

Then replace "radeon" with "modesetting" etc.
For more detailed drescription, see the radeon(4) manpage.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-07-14 22:49:14 UTC
Ok, I've finally gotten around to testing it, and here are the results:

1. Switching to exa seems to 'solve' the issue, that is:

- on first start after boot, xorg-server segfaults while starting the DM (and then gets restarted into login manager),

- next start works and looks fine,

- no error messages in dmesg.

2. DRI version doesn't seem to affect anything.

3. Modesetting also solves it but I suppose that's obvious given 1.
Comment 9 Chí-Thanh Christopher Nguyễn gentoo-dev 2018-07-15 09:24:29 UTC
3. is not that obvious, because the modesetting DDX also uses glamor for acceleration. So glamor with radeon DDX produces glitches and glamor with modesetting doesn't.

There have been some more commits to xf86-video-ati git in the past 3 days, maybe try -9999 again.

If you did that already or it doesn't help, I suggest that you report two bugs on https://bugs.freedesktop.org/ against xorg Driver/Radeon component. One bug with the glamor corruption, and one with the EXA segfault and stack trace (how to get a proper stack trace is described in https://www.x.org/wiki/Development/Documentation/ServerDebugging/).
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-08-12 14:49:55 UTC
Server 1.20.1 along with ati-9999 seem to work fine.  I'm going to test for a few days just in case.
Comment 11 Matt Turner gentoo-dev 2018-08-18 16:29:35 UTC
Seems to be all good?
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-08-18 17:23:30 UTC
No issues so far. I suppose we need to wait for xf86-video-ati rel.
Comment 13 Matt Turner gentoo-dev 2018-09-16 07:45:58 UTC
18.1.0 is in tree now. Please test and confirm it fixes your problem.
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-09-16 08:35:38 UTC
Thanks.  I can confirm that this version works fine for me.