What might cause changes to PCI addresses between shutdown and restart?

I should first point out that this is not a new install. I have been using 12.3 since it was released and it was a fresh install. Everything has worked well until just a few days ago. Apparently an update broke something, but I am out of ideas on where to look.

I’ve been having a serious problem with the X system over the last several days. During boot, I would get as far as having Plymouth finish, then I’d just get a blank screen. I was usually able to open a terminal from there to reboot, but could not start X.
Going over logs, there were errors from fglrx complaining about not being able to find the device at the specified address. I discovered that for whatever reason, “lspci” would often show different addresses for my graphics and sound cards from the last time I booted. The graphics card would show as 05:00.0 or 06:00.0 or 07:00.0 which caused the fglrx driver to usually fail. “lsmod” would show that fglrx was loaded, but not used by anything. Here is the pertinent section of my current “lspci” output:

03:00.0 PCI bridge: PLX Technology, Inc. PEX8112 x1 Lane PCI Express-to-PCI Bridge (rev aa)
04:04.0 Multimedia audio controller: C-Media Electronics Inc CMI8788 [Oxygen HD Audio]
05:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Pitcairn [Radeon HD 7800]
05:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]

I found that in order to boot, I would have to boot to run level 3, re-install the proprietary driver, modprobe fglrx, and start kdm. After a reboot, X would fail again. I noticed that the PCI address for the graphics card was changed in xorg.conf after each boot. I’m not sure what was editing the file, apparently during shutdown. I would have to delete xorg.config and start over by rebooting into run level 3.

What I have done as a workaround is to delete xorg.conf and then re-create it as a blank text file with no write permissions. So far that has worked. Apparently fglrx no longer needs it, although aticonfig still creates it. The computer boots correctly with fglrx and full graphics with the blank xorg.conf

The root cause seems to be that fact that the PCI addresses are not consistent. I have tried downgrading every hardware detection package that I could think of, including systemd and sysinit, with no joy.

I use a Radeon HD7870 graphics card. The native radeon driver states that it will support cards only up to HD58** so it is of no use. I have tried the “fglrx.xpic” package and it behaves the same as the proprietary driver.

On 05/30/2013 09:26 AM, purevw wrote:
>
> I should first point out that this is not a new install. I have been
> using 12.3 since it was released and it was a fresh install. Everything
> has worked well until just a few days ago. Apparently an update broke
> something, but I am out of ideas on where to look.
>
> I’ve been having a serious problem with the X system over the last
> several days. During boot, I would get as far as having Plymouth finish,
> then I’d just get a blank screen. I was usually able to open a terminal
> from there to reboot, but could not start X.
> Going over logs, there were errors from fglrx complaining about not
> being able to find the device at the specified address. I discovered
> that for whatever reason, “lspci” would often show different addresses
> for my graphics and sound cards from the last time I booted. The
> graphics card would show as 05:00.0 or 06:00.0 or 07:00.0 which caused
> the fglrx driver to usually fail. “lsmod” would show that fglrx was
> loaded, but not used by anything. Here is the pertinent section of my
> current “lspci” output:
>
>
> Code:
> --------------------
> 03:00.0 PCI bridge: PLX Technology, Inc. PEX8112 x1 Lane PCI Express-to-PCI Bridge (rev aa)
> 04:04.0 Multimedia audio controller: C-Media Electronics Inc CMI8788 [Oxygen HD Audio]
> 05:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Pitcairn [Radeon HD 7800]
> 05:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
> --------------------

I will not address the problem of getting the flgrx driver to work properly.
That is outside my area of expertise.

A change in bus address might occur with a major change in kernel version, or
between booting safemode and regular kernels, but it is unlikely that it varies
from boot to boot with the same kernel. If that really happens, then your system
is a bit racy with regard to the order in which PCI devices are discovered in
the original bus scan, but I have no idea why it should change from boot to boot.

Getting fglrx to work is usually straight forward. I’ve rarely had problems unless a new kernel breaks the installer. I went ahead and re-installed the update patches for udev, systemd, etc… So far, keeping the blank xorg.config continues to work. I haven’t done any kind of hardware changes recently.
I’m not sure if the drivers for the motherboard chipsets have had any recent upgrades.
I don’t think it makes much difference, but the sound and graphics cards are PCIe rather than PCI.

I’ll wait and see how things work since updating the hardware detection packages. I’ll also keep a record of the cards PCI addresses. Maybe I can find some kind of a pattern. At least I have it working for now.

You did some good sleuthing there. Nasty bit of behaviour. Off hand, I can’t think of what would be causing the xorg.conf to be being written to, though I have my suspicions (here’s looking at you fglrx installation).

A couple of FYIs that may (or may not) help you in this or in the future:

  1. It is my understanding that X currently enumerates video devices via libpciaccess. xorg/lib/libpciaccess - Generic PCI access library … not much in the way of recent activity … I believe that function was planned to be ported to libudev, though I haven’t seen anything about that affect (nor recall the source for such plan). Anyway, that is one avenue that you could look down.

You have a SI (“Southern Islands” generation/arch card i.e 77xx and greater). The driver stack for SI devices as is in stock openSUSE 12.3 is pretty crappy. What output do you get from:

/sbin/lspci -nnk | grep VGA -A2

The stock radeon DDX driver packaged in openSUSE 12.3 is v7, and probably doesn’t support too many SI devices (and I suspect that is the first issue confronting you) … on the positive side of things, there have been a number of PCI IDs commits adding support for such SI devices since the v7.0 release (see: xorg/driver/xf86-video-ati - ATI video driver ) so you might want to see if that is the case for you (i.e. whether your card now has basic support; and then consider upgrading to a newer driver version from the Xorg repo).

But before you get all happy about that (i.e back to the bad news dept.) it is noteworthy to point out that the DDX doesn’t (and will likely never) contain any SI specific 2D acceleration code. In order to obtain such functionality, you will have to envoke the use of the glamor module, which will utilize the gallium3d driver (radeonsi_dri.so) to provide such acceleration. Only, (and here’s that bad news) it doesn’t look like openSUSE has packaged the radeonsi in its mesa package. >:( That leads to an entirely craptastic experience using such hardware in the OSS world, and should quickly push one to either role their own build of the gallium driver, or resort to (gasp) proprietary means (aka install the fglrx).

to be fair, the necessary requirements for enabling glamor support, as well as many improvements in the WIP gallium driver, would have came after the feature freeze for openSUSE 12.3.

I apologize for the very late response. Apparently the e-mail alert system here has problems. I just happened to check in and saw the responses. The changing pci-e address has not left. It is a minor nuisance. I just remove all entries from xorg.conf and there is not a problem.

I agree that fglrx is writing the xorg.conf file. Even though I remove write privileges, it is re-written any time I re-install the driver. If I fail to remove write privileges after the install, the file is modified either at shutdown, or system start, every time.

To answer your question, here is the output you requested:


/sbin/lspci -nnk | grep VGA -A2
06:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI Pitcairn [Radeon HD 7800] [1002:6818]
        Subsystem: ASUSTeK Computer Inc. Device [1043:042a]
        Kernel driver in use: fglrx_pci

This is mostly water under the bridge now. The only reason to re-install fglrx is when there are X11 of mesa updates. The fglrx driver installers are not compatible with kernel 3.10 and I was forced to downgrade the kernel. The fglrx linux forum has a few complaints, but no solutions. I’m hoping that Sebastian Siebert will come up with a patch or at least some information soon. There is already a partial workaround in Ubuntu forums using a patch from the git hub. I’ve had issues when trying to use solutions from Ubuntu and other forums. I’ll keep checking at this forum for info.