# FGLRX Segfaults Xorg

## ManDay

Hello everybody. With fglrx I get the following error when trying to start X:

```
0: /usr/bin/X (xorg_backtrace+0x28) [0x45f528]

1: /usr/bin/X (0x400000+0x63f29) [0x463f29]

2: /lib64/libpthread.so.0 (0x7f1d00ff1000+0xf470) [0x7f1d01000470]

3: /usr/lib/xorg/modules/drivers/fglrx_drv.so (xdl_xs110_atiddxFreeScreen+0x72) [0x7f1cfdf34a42]

4: /usr/bin/X (xf86DeleteScreen+0x80) [0x470620]

5: /usr/bin/X (InitOutput+0x8c5) [0x472bb5]

6: /usr/bin/X (0x400000+0x24728) [0x424728]

7: /lib64/libc.so.6 (__libc_start_main+0xfd) [0x7f1cfff43f0d]

8: /usr/bin/X (0x400000+0x24479) [0x424479]

Segmentation fault at address 0x41
```

Some more details follow. The system is based upon vga_switcheroo, which, as those who have used it for a while probably know, has been very sensitive to changes in the config in the past. So a plausible explanation could be that there is some inconsistency in the config, which you find attached [1].

As required by fglrx, I enabled IA32 Emulation, took DRM out of the kernel, but had to leave KMS default-on in the setting, otherwise switcheroo fails. I compiled the kernel 3.0.4 mainline stable, emerged xorg-server USE=fglrx and therefore the fglrx driver while specifying gentoo-sources as provided.

Then I rebooted. I wrote "DIS" to /sys/kernel/debug/vga_switcheroo/switch to enable the ATI graphics card and power down the Intel and started X-Org with my "DIS" layout [2], which works fine for ATI radeon drivers with switcheroo (nevertheless also attached), but the result can be seen above. Before that, also some other errors, which however, I deem not important:

```
(EE) Failed to load module "dri" (module does not exist, 0)

(EE) Failed to load module "dri2" (module does not exist, 0)

(WW) fglrx: No matching Device section for instance (BusID PCI:0@1:0:1) found

(EE) Screen 1 deleted because of no matching config section.

(EE) fglrx(0): PowerXpress: Cannot stat '/usr/lib64/fglrx/switchlibGL': No such file or directory

(EE) fglrx(0): PowerXpress: Fail to switch libGL link files.
```

(I also tried the script that has been suggested by gdbalbuzard, but that didn't change anything). I find no way to solve this problem, can you guys think of something - for a start to get rid of the segfault and eventually get fglrx to work (preferably without loosing switcheroo capability, KMS, DRM or anything)?

Hardware:

```
01:00.0 VGA compatible controller: ATI Technologies Inc Device 68e0 (rev ff)
```

 )

(This is an r600 Evergreen on a ATI HD 5400 [corrected by chithanh])

Further information about versions follows here

```
[ebuild   R    ] media-libs/mesa-7.11  USE="classic egl gallium llvm nptl shared-glapi -bindist -debug -gbm -gles -motif -openvg -pax_kernel -pic (-selinux) -shared-dricore" VIDEO_CARDS="intel -mach64 -mga -nouveau -r128 -radeon* -savage -sis -tdfx -via -vmware" 0 kB

[ebuild   R    ] x11-base/xorg-server-1.10.4  USE="nptl udev xorg -dmx -doc -ipv6 -kdrive -minimal -static-libs -tslib -xnest -xvfb" 0 kB

[ebuild   R    ] x11-drivers/ati-drivers-11.8  USE="modules -debug (-multilib) -qt4" 0 kB
```

[1] Kernel Config http://paste.pocoo.org/show/470953/

[2] Xorg Config - Ran on DIS Layout http://paste.pocoo.org/show/470959/Last edited by ManDay on Mon Sep 05, 2011 9:25 pm; edited 2 times in total

----------

## chithanh

For the lspci output, you may want to run "update-pciids". Did you switch to ati with eselect opengl? Also please show Xorg.0.log.

----------

## ManDay

 *chithanh wrote:*   

> For the lspci output, you may want to run "update-pciids". Did you switch to ati with eselect opengl? Also please show Xorg.0.log.

 

Incredible command, I've never heard of it. Thank you a lot, it was very helpful:

```
01:00.0 VGA compatible controller: ATI Technologies Inc Manhattan [Mobility Radeon HD 5400 Series] (rev ff)
```

I did switch OpenGL with eselect to "ati". The following is the Xorg.0.log for the failing start with fglrx:

http://paste.pocoo.org/show/470978/

Thank you!

----------

## chithanh

Another thread for this problem already exists, but no solution was found.

You can try to entirely disable DRM in the kernel and/or use a different version of ati-drivers.

----------

## ManDay

The thread you mention mixes up two separate problems (both of which I'm unfortunally very familar with), though the post which mixes them up indeed describes my problem.

Which version of ATI drivers do you suspect would help? Do you suggest that it's a bug in the ATI drivers?

Althought we may not find a solution so quickly, it might be good to know whom to blame with the segfault.

----------

## chithanh

It could be that the problem are DRM modules which are loaded when they shouldn't be.

But in any case it's a bug, check the unofficial bugtracker http://ati.cchtml.com/ if it was already reported and if not, you may want to open a new bug.

----------

