Radeon problems

Hello

I rarely ask for help, but I’m having some serious problems with my X server, that I can’t figure out how to fix on my own… I have a Radeon HD7770, and the past couple of weeks I have different problems with it on OpenSUSE. I’m using various GNU/Linux distros since 2001 and I’m with OpenSUSE since 11.4, so usually I am the one who fixes others problems, well not this time.

note: my hardware is a desktop, with Athlon4200, mobo with an nforce chipset, 4GB ram, Radeon HD7770, 1 sata and 1 pata hdd, 15 year old 250W psu and a 19" crt monitor (that I really like, and my cat likes it even more - it’s a great, warm, place to sleep :slight_smile: ) - overall this is a mix of old and a bit less old hardware, I add stuff that I can get for free etc

The story so far:
I had a pretty nicely working 13.1 with fglrx, and apart from an occasional graphics glitch here and there it was good. Then, a few weeks ago, my mobo broke down, so I replaced it with a slightly worse model that I had laying around as a backup for scenarios like this. After that my OpenSUSE wouldn’t boot, it couldn’t find the lvm volumes that I had. I hacked around with it but ended up reinstalling, I figured that since I’m doing a reinstall anyway then I might as well install the new 13.2 version.

I formatted the root volume, installed everything, after that I installed fglrx and for a few days it was good (with some minor glitches like before). But after a few days and some updates, the display started to glitch like crazy (it looked like a worn out VHS tape), I even suspected that the monitor broke, but all was fine outside of OpenSUSE. I removed fglrx, and after reboot I saw the plymouth screen, but instead of seeing login afterwards, the monitor just switched off.

Angry at the broken fglrx, I installed everything anew, this time staying with the default kernel driver (radeonsi). No glitches this time, everything good, only about 10-20% performance hit in 3d games. I was pretty happy with it until I ran OpenTTD - it was running at less than 10fps, totally unplayable. I even filed a bug report to the OpenTTD project, in the mean time some other people told me that apparently I didn’t have 2d acceleration working. Having no idea how to fix this I just waited and installed updates as they came (the mesa updates a few days ago got my hopes up, but didn’t fix this). I could live without 2d games for a while so I wasn’t too pressed to find out what’s wrong.

Yesterday, I boot my machine, I see plymouth and instead of the login screen after that… the monitor turns off! :-/ Not wanting another reinstall I started to hack around…

  • booted from a livecd, done mkinitrd -f lvm2, just in case (cause I had a problem with lvm on my machine at work a few days earlier) - didn’t help
  • looked at the end of Xorg log, only an empty line starting from EE was there - no info why was there an error
  • managed to boot the system with nomodeset, in glorious resolution of 640x350 :stuck_out_tongue: I installed fglrx, didn’t help, booted in 640x350 and the amd tools said that the driver wasn’t running
  • removed fglrx and started hacking with the xorg.conf files, this eventually managed to get me a working screen in a normal resolution, but I have no 3d acceleration this time (OpenTTD is running fast and nice on the other hand - madness!)

This is my Xorg.log currently: http://wklej.org/id/1635042/?hl=text
I currently have uncommented sections in xorg.conf.d in 50-device.conf 50-monitor.conf 50-screen.conf, no other changes. I installed libtxc_dxtn a few days ago, but I don’t think this would have impact on this.

Can anybody help me with this?

Note: radeonsi is the mesa/3d driver for your particular hardware, not the kernel driver

some other people told me that apparently I didn’t have 2d acceleration working.
As seen in the log you provided, those other people are indeed correct.

Having no idea how to fix this I just waited and installed updates as they came (the mesa updates a few days ago got my hopes up
As an FYI, the graphics stack for your particular adatper looks like this:

  • radeon.ko … the drm/kms kernel driver
  • radeon_drv.so … the userspace Xorg DDX driver
  • radeonsi.so … the userspace Mesa/3D opengl driver

Traditionally, the xorg driver would contain the necessary code for 2D accel for your hardware. However, starting with SI class radeon adapters and above, the xorg radeon driver has no longer been modified to provide such. Instead, it now defers to using glamor acceleration (a generic framework for providing 2D via utilitzing opengl). Glamor used to be an independent Xorg module, but has since been incorporated directly into the X server.

So there is a bit of a complicated interaction and dependence going on between the parts. You should look on bugzilla and the radeon mailing list to see if there is any known bug afflicting your particular hardware.

  • removed fglrx and started hacking with the xorg.conf files, this eventually managed to get me a working screen in a normal resolution, but I have no 3d acceleration this time (OpenTTD is running fast and nice on the other hand - madness!)

This is my Xorg.log currently: http://wklej.org/id/1635042/?hl=text
I currently have uncommented sections in xorg.conf.d in 50-device.conf 50-monitor.conf 50-screen.conf, no other changes. I installed libtxc_dxtn a few days ago, but I don’t think this would have impact on this.

Can anybody help me with this?

  • you can get into certain situations where running purely in software (cpu) is faster then in hardware … you can have situations in which the rendering operation results in ping-ponging between the cpu and gpu (e.g. the hardware is capable of accelerating part of the operation, but other parts just don’t translate well and have to be done in software) … whereas, if you avoid such back and forth, it can be much faster if it s just all done in software.

I think you should post what you tinkered with in your xorg files. I’m out of time. I’m sure others can help you.

One particular problem I see in the log file is this:

    16.022] (II) LoadModule: "glx"
    16.060] (WW) Warning, couldn't open module glx
    16.060] (II) UnloadModule: "glx"
    16.060] (II) Unloading glx
    16.060] (EE) Failed to load module "glx" (module does not exist, 0)

“glx” cannot be loaded, which means of course no OpenGL support.
Did you install fglrx via the installer from AMD’s website? It probably overwrote libglx.so with its own version, but did not restore the original one when you removed it.
Reinstalling xorg-x11-server should fix that:

sudo zypper in -f xorg-x11-server

(or right-click on the package in YaST and select “Update Unconditionally”)

Also, you should probably run “sudo mkinitrd” after removing fglrx (I think the packages do that automatically, but if you installed fglrx manually…), to make sure the radeon kernel module is in the initrd (otherwise there might be problems with acceleration, as plymouth already intializes the graphics and is started from the initrd, before / is mounted)

Thx for your answers, I was instaling fglrx always from the repo linked on the opensuse wiki.

Anyway a few hours after writing this topic my main hdd died (don’t worry I have a mostly full proof backup plan so I didn’t lose any meaningful data). I have a funny feeling that all these wacky problems could be connected to this (maybe some files got corruped in the days before this).

Now I have to look through my junk hardware to see if I’ll manage to put together some storage in order to install the system anew. I’ll write here in case I run into these problems again.

This would be an associated problem to the aforementioned missing glamor; glamor provides the hooks into the 3D.

Hm?
But libglx should be loaded anyway I think, no? Doesn’t glamor use/need libglx (at least it did in earlier versions IIANM)?

And the message clearly says “(module does not exist, 0)”. It should exist regardless whether glamor is used or not.

Might indeed be caused by a bad hard disk though, I suppose.

You might be right. Not sure if the requirements now; I have not kept up with the changes.

I installed my system from scratch yesterday (opensuse 13.2, updated to the newest version too), and 2d acceleration doesn’t seem to work again.

Xorg.log: http://wklej.org/id/1644116
No errors in the log, any hints fow to fix this?

And what exactly do you mean with “2d acceleration doesn’t seem to work again”? Before you actually had problems with 3d acceleration AFAICT.
What problem(s) do you experience?

Is it openTTD running too slow again? I don’t think that’s due to not working 2d acceleration, but try a lower resolution.
And maybe run it in a terminal window and post the output.

I don’t see anything wrong in the Xorg log either now.

Presicely yes, this is the same situation that I had before glx broke earlier - all 3d works like a breeze, but openttd (and other 2d libsdl games, like wesnoth, but that’s turn based so it’s not that visible at first glance) is slow like a snail. It does run better in a lower resolution (640x480 window), but that’s not the point, my hardware could easily handle it even in ultrahd resolution.

Anyway, I’m open to other options, if you say it’s not a problem with 2d accel, then please tell me how can I debug this better. Graphics is really not my area of expertese.

Well, i don’t think most 2d libsdl games use any kind of 2d acceleration at all…

What desktop environment are you using?
Try something simpler, like IceWM (should be installed by default), is it slow there as well?

Your desktop’s compositing/desktop effects (which use OpenGL normally, thus could conflict with glamor too), might slow it down.

If you are using KDE, you can temporarily disable desktop effects/compositing via Alt+Shift+F12, and there’s also an option to disable it automatically for fullscreen applications (games) in Desktop Effects->Advanced. I would recommend to switch that on if it doesn’t give you problems.

Or try disabling glamor and use EXA instead. But I have no idea whether this works well (or at all) with your particular graphics card.
The “problem” is that most (all?) modern cards do not have any special 2d hardware at all, so you have to emulate 2d acceleration via 3d/OpenGL, i.e. glamor. To try this anyway, create a file /etc/X11/xorg.conf.d/50-mydevice.conf:

Section "Device"
Identifier "Default Device"
Driver "radeon"
Option "AccelMethod" "EXA"
EndSection

If Xorg is not starting afterwards, boot to recovery mode or login to text mode and remove the file again.

I use KDE, disabling compositing doesn’t help. Also: I run the game in a window.

Or try disabling glamor and use EXA instead. But I have no idea whether this works well (or at all) with your particular graphics card.
The “problem” is that most (all?) modern cards do not have any special 2d hardware at all, so you have to emulate 2d acceleration via 3d/OpenGL, i.e. glamor. To try this anyway, create a file /etc/X11/xorg.conf.d/50-mydevice.conf:

Section "Device"
Identifier "Default Device"
Driver "radeon"
Option "AccelMethod" "EXA"
EndSection

If Xorg is not starting afterwards, boot to recovery mode or login to text mode and remove the file again.

Tried this, the system booted ok, but it didn’t change anything.

The whole thing is that this worked fine on this machine, when using fglrx. If this was a case of hardware not being good enough then it would be slow with the closed drivers too. Also like I said earlier, when I got broken glx, then OpenTTD worked totally fine&fast.

I think I’ll try using fglrx, even though it will probably break after a while :-/