Bug 91586

Summary: Graphic artifacts on screen with Radeon R9 290 (HAWAII)
Product: xorg Reporter: Roman <KupriyanovRV>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: KupriyanovRV
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
graphic artifacts on Radeon R9 290
none
dmesg.log when star system
none
xorg.log when system start
none
glxinfo | grep OpenGL
none
Screenshot_with_graphical_artifacts.png
none
xorg.log when system start after disabled ColorTilling
none
dmesf after replase mesa lib from git branch amdgpu
none
Xorg.0.log after replase mesa lib from git branch amdgpu
none
Xorg.0.Log (WW) Warning, couldn't open module radeonsi
none
Xorg.0.log - fail on start
none
Mesa make V=1
none
Xorg.0.log - after make and make install
none
Xorg.0.log - after added config to /ect/ld.so.conf.d
none
Xorg.0.log - after ldconfig and reboot (black screen)
none
OpenSuse_Mesa_11_libdrm_2.4_LLVM_3.8
none
Build log. none

Description Roman 2015-08-08 15:27:21 UTC
Created attachment 117589 [details]
graphic artifacts on Radeon R9 290

Hi, 
I have a graphic artifacts when I use free-drivers with my graphics card Radeon R9 290 (HAWAII)
see screenshot ()

Hardware: 
  Video card: Radeon R9 290 (Hawaii) /model name GA-R9290OC-4G/ with default bios
  Two Monitors :  2560x1080 plugged to DisplayPort and 1920x1080 plugged to DVI-D port

Software: 
  Manjaro Linux 8.3.1 
  Kernel 4.1.3-2-MANJARO #1 SMP PREEMPT Sun Jul 26 12:29:38 UTC 2015 x86_64 GNU/Linux
  X.Org X Server 1.17.2
  Mesa 11.0.0-devel (git-42d283a)
  Driver: RadeonSi
  linux-firmware 20150722.e10097a-1

Xorg and dmesg log will be attached in next comment
Comment 1 Roman 2015-08-08 15:28:53 UTC
Created attachment 117590 [details]
dmesg.log when star system

dmesg log attached
Comment 2 Roman 2015-08-08 15:29:46 UTC
Created attachment 117591 [details]
xorg.log when system start
Comment 3 Roman 2015-08-08 15:30:41 UTC
Created attachment 117592 [details]
glxinfo | grep OpenGL
Comment 4 Roman 2015-08-08 15:32:30 UTC
Created attachment 117593 [details]
Screenshot_with_graphical_artifacts.png
Comment 5 Roman 2015-08-08 15:44:32 UTC
Is there anything I can do to help fix this?
If I have to do something, please let me simple steps that I can faster do and reply to your request.
Comment 6 Michel Dänzer 2015-08-10 06:13:16 UTC
Is this a regression, i.e. did it work correctly with older versions of the graphics driver stack?

Does either of these options in /etc/X11/xorg.conf work around the problem?

 Option "ColorTiling2D" "off"
 Option "ColorTiling" "off"
Comment 7 Roman 2015-08-10 17:07:16 UTC
Created attachment 117617 [details]
xorg.log when system start after disabled ColorTilling

Adding option
 Option "ColorTiling2D" "off"
 Option "ColorTiling" "off"
to Xorg.conf not work for me, problem still exists.
Comment 8 Alex Deucher 2015-08-10 17:13:20 UTC
You may have a hawaii with harvested RBs.  Can you try this branch of mesa?
http://cgit.freedesktop.org/~mareko/mesa/log/?h=amdgpu
Comment 9 Roman 2015-08-10 23:12:58 UTC
I did next steps:
1. git clone git://people.freedesktop.org/~mareko/mesa
2. git checkout amdgpu
3. sh autohen.sh
4. make

Then I move all files from git/mesa/lib and git/mesa/lib/gllium to /lib and /lib/gallium
but I'm not sure that it is correct.

After this changes I restart system and I see desktop without artifacts

But now OpenGL application not started and I cannot run glxinfo (see error: ouldn't find RGB GLX visual or fbconfig)

Also I see 'Screen Tearing'.

Maybe need do something else? (I think replacement of libraries by hands - it was a bad idea)
Comment 10 Roman 2015-08-10 23:14:08 UTC
Created attachment 117620 [details]
dmesf after replase mesa lib from git branch amdgpu
Comment 11 Roman 2015-08-10 23:14:51 UTC
Created attachment 117621 [details]
Xorg.0.log after replase mesa lib from git branch amdgpu
Comment 12 Michel Dänzer 2015-08-12 09:28:10 UTC
(In reply to Roman from comment #9)
> Then I move all files from git/mesa/lib and git/mesa/lib/gllium to /lib and
> /lib/gallium
> but I'm not sure that it is correct.

Possibly not. Which files did you move where exactly?
Comment 13 Roman 2015-08-12 17:28:41 UTC
(In reply to Michel Dänzer from comment #12)
> (In reply to Roman from comment #9)
> > Then I move all files from git/mesa/lib and git/mesa/lib/gllium to /lib and
> > /lib/gallium
> > but I'm not sure that it is correct.
> 
> Possibly not. Which files did you move where exactly?

I replace from:
builds_from_git/mesa/lib/
libglapi.so
libglapi.so.0
libglapi.so.0.0.0      
libGLESv1_CM.so
libGLESv1_CM.so.1
libGLESv1_CM.so.1.1.0
libGLESv2.so
libGLESv2.so.2
libGLESv2.so.2.0.0
i915_dri.so      
i965_dri.so    
mesa_dri_drivers.so
nouveau_vieux_dri.so
r200_dri.so
radeon_dri.so
swrast_dri.so
libGL.so
libGL.so.1
libGL.so.1.2.0
libEGL.so
libEGL.so.1
libEGL.so.1.0.0

To MySystemRoot/lib/

And from builds_from_git/mesa/lib/gallium/
kms_swrast_dri.so
r300_dri.so
r600_dri.so
swrast_dri.so
vmwgfx_dri.so
libvdpau_r300.so
libvdpau_r300.so.1
libvdpau_r300.so.1.0
libvdpau_r300.so.1.0.0
libvdpau_r600.so
libvdpau_r600.so.1
libvdpau_r600.so.1.0
libvdpau_r600.so.1.0.0
To MySystemRoot/lib/gallium/
Comment 14 Roman 2015-08-12 17:36:23 UTC
(In reply to Michel Dänzer from comment #6)
> Is this a regression, i.e. did it work correctly with older versions of the
> graphics driver stack?

Also I try boot from iso Fedora 22 or Ubuntu 14.10 with default driver stack (mesa not higher 10.6) and I get the same result (desktop with graphical artifacts)
Comment 15 Michel Dänzer 2015-08-13 06:44:54 UTC
(In reply to Roman from comment #13)
> And from builds_from_git/mesa/lib/gallium/
> kms_swrast_dri.so
> r300_dri.so
> r600_dri.so
> swrast_dri.so
> vmwgfx_dri.so

You're missing radeonsi_dri.so, the 3D driver for your GPU. Try passing at least the following parameters to configure / autogen.sh:

--with-gallium-drivers=radeonsi --enable-glx-tls --with-egl-platforms=x11,drm --with-dri-drivers=''


> To MySystemRoot/lib/gallium/

Note that files in .../lib/gallium/ aren't picked up by default at runtime. It might be easier if you run make install instead of copying files manually.
Comment 16 Roman 2015-08-13 22:17:08 UTC
(In reply to Michel Dänzer from comment #15)
> (In reply to Roman from comment #13)
> > And from builds_from_git/mesa/lib/gallium/
> > kms_swrast_dri.so
> > r300_dri.so
> > r600_dri.so
> > swrast_dri.so
> > vmwgfx_dri.so
> 
> You're missing radeonsi_dri.so, the 3D driver for your GPU. Try passing at
> least the following parameters to configure / autogen.sh:
> 
> --with-gallium-drivers=radeonsi --enable-glx-tls
> --with-egl-platforms=x11,drm --with-dri-drivers=''
> 
> 
> > To MySystemRoot/lib/gallium/
> 
> Note that files in .../lib/gallium/ aren't picked up by default at runtime.
> It might be easier if you run make install instead of copying files manually.

I did new build with parametrs and run make install automatically moved radeonsi_dri.so to /usr/local/lib/dri/ but nothing has changed and still loading "radeon" module.

May be move 'radeonsi_dri.so' to /lib ?
Comment 17 Michel Dänzer 2015-08-14 03:59:48 UTC
(In reply to Roman from comment #16)
> I did new build with parametrs and run make install automatically moved
> radeonsi_dri.so to /usr/local/lib/dri/ but nothing has changed and still
> loading "radeon" module.

The Xorg driver is radeon_drv.so.

One issue might be that Xorg only looks for *_dri.so in /usr/lib/dri/ for GLX support. Maybe try copying radeonsi_dri.so to /usr/lib/dri/ as well or creating a symlink. If that doesn't help, please attach the current Xorg.0.log file.
Comment 18 Roman 2015-08-14 04:52:30 UTC
Created attachment 117675 [details]
Xorg.0.Log (WW) Warning, couldn't open module radeonsi

(In reply to Michel Dänzer from comment #17)
> (In reply to Roman from comment #16)
> > I did new build with parametrs and run make install automatically moved
> > radeonsi_dri.so to /usr/local/lib/dri/ but nothing has changed and still
> > loading "radeon" module.
> 
> The Xorg driver is radeon_drv.so.
> 
> One issue might be that Xorg only looks for *_dri.so in /usr/lib/dri/ for
> GLX support. Maybe try copying radeonsi_dri.so to /usr/lib/dri/ as well or
> creating a symlink. If that doesn't help, please attach the current
> Xorg.0.log file.

I move radeon_drv.so to /usr/lib/dri/ and change Xorg.config:
Section "Device"
        Identifier "Radeon R9290 (Hawaii)"
        Driver "radeonsi"
EndSection

But driver not load:
[     9.003] (II) LoadModule: "radeonsi"
[     9.003] (WW) Warning, couldn't open module radeonsi
[     9.003] (II) UnloadModule: "radeonsi"
Comment 19 Roman 2015-08-14 04:55:15 UTC
>>I move radeon_drv.so to /usr/lib/dri/ and change Xorg.config:
this typo, I successfully moved radeonSI_drv.so to /usr/lib/dri/
Comment 20 Michel Dänzer 2015-08-14 06:14:17 UTC
(In reply to Roman from comment #18)
> [     9.003] (II) LoadModule: "radeonsi"
> [     9.003] (WW) Warning, couldn't open module radeonsi
> [     9.003] (II) UnloadModule: "radeonsi"

There is no "radeonsi" Xorg driver, change it back to "radeon".
Comment 21 Marek Olšák 2015-08-14 10:51:33 UTC
There is an LLVM bug affecting Hawaii. Please switch to the release_37 LLVM branch, which reverts the broken commit. The master branch (LLVM 3.8) still has the bug.
Comment 22 Roman 2015-08-14 19:36:13 UTC
(In reply to Marek Olšák from comment #21)
> There is an LLVM bug affecting Hawaii. Please switch to the release_37 LLVM
> branch, which reverts the broken commit. The master branch (LLVM 3.8) still
> has the bug.

I could not find to 'release 37 commit' to do reset it for git (http://llvm.org/git/llvm.git
)

I use default repo in manjaro with llvm 3.6.2.2
Comment 23 Roman 2015-08-14 20:02:13 UTC
Created attachment 117695 [details]
Xorg.0.log - fail on start

(In reply to Michel Dänzer from comment #20)
> (In reply to Roman from comment #18)
> > [     9.003] (II) LoadModule: "radeonsi"
> > [     9.003] (WW) Warning, couldn't open module radeonsi
> > [     9.003] (II) UnloadModule: "radeonsi"
> 
> There is no "radeonsi" Xorg driver, change it back to "radeon".

I think I all broke. (see Xorg.0.log fail on start)

How I can properly to install mesa from git?

Correct my steps:
1. git clone git://anongit.freedesktop.org/mesa/drm
2. change branch to amdpu
3. sh autohen.sh --enable-libdrm_amdgpu
4. make
5. make install

6. git clone git://people.freedesktop.org/~mareko/mesa
7. change branch to amdgpu
8. sh autohen.sh --with-gallium-drivers=radeonsi --enable-glx-tls --with-egl-platforms=x11,drm --with-dri-drivers=''
9. make install

10. add 20-radeon.conf to X11/xorg.conf.d/
Section "Module"
        Load  "dri2"
        Load  "glamoregl"
EndSection

Section "Device"
        Identifier "Radeon R9 290 (Hawaii)"
        Driver "radeon"
        Option "AccelMethod"  "glamor"
        Option "ColorTiling2D" "off"
        Option "ColorTiling"   "off"
EndSection
11. Restart System.


By the way my Manjaro became available kernel 4.2.rc5 install it?

Also I saw xf86-video-amdgpu I need build it?

P.S. Sorry if my questions are stupid, I'm not good at Linux (just trying to use it)
Comment 24 Marek Olšák 2015-08-14 20:23:32 UTC
It's the "release_37" llvm branch.
Comment 25 Michel Dänzer 2015-08-17 02:27:16 UTC
(In reply to Roman from comment #23)
> I think I all broke. (see Xorg.0.log fail on start)

Looks like either /usr/local/lib/libEGL.so.1 was built without --with-egl-platforms=[...,]drm[,...] , or maybe the $DISPLAY environment variable is set for the Xorg process.


> 1. git clone git://anongit.freedesktop.org/mesa/drm
> 2. change branch to amdpu

The amdgpu branch has been merged to master, please use the latter now.


> 3. sh autohen.sh --enable-libdrm_amdgpu

This parameter isn't necessary.


> 6. git clone git://people.freedesktop.org/~mareko/mesa
> 7. change branch to amdgpu

This branch has been merged to the master branch of git://anongit.freedesktop.org/mesa/mesa , please use that now.


> 8. sh autohen.sh --with-gallium-drivers=radeonsi --enable-glx-tls
> --with-egl-platforms=x11,drm --with-dri-drivers=''

Maybe try --with-egl-platforms=drm instead of --with-egl-platforms=x11,drm for now.


> 10. add 20-radeon.conf to X11/xorg.conf.d/

xorg.conf.d/ is for packages shipping configuration snippets. Users should just modify or create /etc/X11/xorg.conf.


> Section "Module"
>         Load  "dri2"
>         Load  "glamoregl"
> EndSection

This section isn't necessary anymore.


> By the way my Manjaro became available kernel 4.2.rc5 install it?

Maybe better not, at least until you have X working again.


> Also I saw xf86-video-amdgpu I need build it?

No.
Comment 26 Roman 2015-08-17 04:45:47 UTC
(In reply to Marek Olšák from comment #24)
> It's the "release_37" llvm branch.

I builded LLVM 3.7 (branch 37) but I don't know how set this dir for mesa autogen.sh script.
Maybe there is a parameter in which I can point the path to LLVM directory with binaries?
Comment 27 Michel Dänzer 2015-08-17 06:26:44 UTC
(In reply to Roman from comment #26)
> Maybe there is a parameter in which I can point the path to LLVM directory
> with binaries?

--with-llvm-prefix=/path/to/llvm (for llvm-config in /path/to/llvm/bin/llvm-config)
Comment 28 Roman 2015-08-17 20:40:48 UTC
When I try build mesa from git://anongit.freedesktop.org/mesa/mesa with LLVM 3.7.0
I have error:
OC state_tracker/st_cb_feedback.lo
<commandline>:0:11:error:hexadecimal floating constants require an exponent
../../src/gallium/auxiliary/draw/draw_context.h:67:5:note: in expansion of macro 'HAVE_LLVM'
#if HAVE_LLVM
Comment 29 Michel Dänzer 2015-08-18 07:17:27 UTC
Please attach the output of "make V=1".
Comment 30 Roman 2015-08-18 20:09:24 UTC
Created attachment 117773 [details]
Mesa make V=1

(In reply to Michel Dänzer from comment #29)
> Please attach the output of "make V=1".

done, log attached
Comment 31 Michel Dänzer 2015-08-19 02:36:23 UTC
Looks like the Mesa configure script fails to parse the version number of your LLVM build correctly. That would need to be tracked in a separate bug report.

Meanwhile, the default LLVM of Manjaro should be fine for the purpose of this bug report. Can you build Mesa against that?
Comment 32 Roman 2015-08-19 05:11:13 UTC
(In reply to Michel Dänzer from comment #31)
> Looks like the Mesa configure script fails to parse the version number of
> your LLVM build correctly. That would need to be tracked in a separate bug
> report.
> 
> Meanwhile, the default LLVM of Manjaro should be fine for the purpose of
> this bug report. Can you build Mesa against that?

Build successfully constructed with LLVM 3.6.2.0 (from default repo)
and I did make install for it -> reboot system

But I still see graphic artifacts. 
glxinfo say that I use: OpenGL ES profile version string: OpenGL ES 3.0 Mesa 10.6.4

May be need add something else in some config that started with builded mesa?
Comment 33 Michel Dänzer 2015-08-19 07:03:27 UTC
(In reply to Roman from comment #32)
> glxinfo say that I use: OpenGL ES profile version string: OpenGL ES 3.0 Mesa
> 10.6.4

So it's not picking up your Mesa build yet. Please attach the current Xorg.0.log file and provide the output of "LIBGL_DEBUG=verbose glxinfo | grep ' render'".
Comment 34 Roman 2015-08-19 18:25:09 UTC
Created attachment 117792 [details]
Xorg.0.log - after make and make install

(In reply to Michel Dänzer from comment #33)
> (In reply to Roman from comment #32)
> > glxinfo say that I use: OpenGL ES profile version string: OpenGL ES 3.0 Mesa
> > 10.6.4
> 
> So it's not picking up your Mesa build yet. Please attach the current
> Xorg.0.log file and provide the output of "LIBGL_DEBUG=verbose glxinfo |
> grep ' render'".

$LIBGL_DEBUG=verbose glxinfo | grep ' render'
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/radeonsi_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/radeonsi_dri.so
libGL: Can't open configuration file /home/roman/.drirc: No such file or directory.
libGL: Can't open configuration file /home/roman/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0
direct rendering: Yes
OpenGL renderer string: Gallium 0.4 on AMD HAWAII
Comment 35 Roman 2015-08-19 19:24:03 UTC
All builded mesa library after make install moved to usr/local/lib/
Comment 36 Michel Dänzer 2015-08-20 03:52:58 UTC
Looks like you need to make sure your self-built libGL.so.1 is picked up from /usr/local/lib by adding /usr/local/lib to /etc/ld.so.conf* and/or running ldconfig.
Comment 37 Roman 2015-08-20 05:01:01 UTC
Created attachment 117800 [details]
Xorg.0.log - after added config to /ect/ld.so.conf.d

(In reply to Michel Dänzer from comment #36)
> Looks like you need to make sure your self-built libGL.so.1 is picked up
> from /usr/local/lib by adding /usr/local/lib to /etc/ld.so.conf* and/or
> running ldconfig.

I added two config to /ect/ld.so.conf.d for path /usr/local/lib and /usr/local/lib/dri
But nothing changes
Comment 38 Michel Dänzer 2015-08-20 06:42:40 UTC
(In reply to Roman from comment #37)
> I added two config to /ect/ld.so.conf.d for path /usr/local/lib and
> /usr/local/lib/dri

Only /usr/local/lib is needed in the ld.so configuration.

> But nothing changes

Did you run ldconfig after changing the ld.so configuration?
Comment 39 Roman 2015-08-20 19:45:50 UTC
Created attachment 117826 [details]
Xorg.0.log - after ldconfig and reboot (black screen)

(In reply to Michel Dänzer from comment #38)
> Did you run ldconfig after changing the ld.so configuration?
I forgot. I run ldconfig and restart system and after it I see black screen. 

/var/log/dmesg doesn't exist (probably due systemd)
Comment 40 Roman 2015-08-24 04:43:15 UTC
I revert changes in /ect/ld.so.conf via chroot.
Comment 41 Roman 2015-09-16 18:22:35 UTC
Created attachment 118318 [details]
OpenSuse_Mesa_11_libdrm_2.4_LLVM_3.8

Hello again, I tried boot from prepare image (http://www.gearsongallium.com/?p=2396) with next components:
openSUSE – Factory
Mesa-git – 11.1_git2015.08.29
Kernel – 4.2-rc8
libdrm – 2.4.99_git2015.08.19
Mesa-demos – 9.1.0_git2015.02.28
wine – 1.7.50-gallium-nine+staging (use WINEARCH=win32 winecfg)
xorg-server – 1.17.99
xf86-video-ati – 7.99.99_2015.08.22 with dri3 and TearFree (activated manually)
xf86-video-amdgpu – 0.0.1_2015.08.19
xf86-video-intel – 2.99.99_2015.08.22
xf86-video-nouveau – 1.1.99_2015.07.20
KDE – 5.14.0
LLVM – 3.8svn (SI machine scheduler)

And I get same result with graphical artifacts, but more stronger (see photo)
Comment 42 Zenitur 2016-08-13 10:07:17 UTC
#31 Where is the separate bug? I can't rebuild Mesa 9.0.3 in my SLED 11 SP4 using LLVM 3.8.0!
Comment 43 Zenitur 2016-08-13 10:09:16 UTC
Created attachment 125762 [details]
Build log.

This is a build log. I tried to apply this patch: https://llvm.org/bugs/show_bug.cgi?id=20903 Comment #5

There is a repository: https://build.opensuse.org/package/show/home:linux4humans:qt5/Mesa
Comment 44 Martin Peres 2019-11-19 07:52:37 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/xorg/driver/xf86-video-ati/issues/138.

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.