mesa doesn't work when fglrx is installed

Bug #442574 reported by Toni Ruottu
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
fglrx-installer (Ubuntu)
Opinion
Low
Unassigned

Bug Description

When fglrx is installed, attempting to use a mesa driver (such as Intel) results in GLX not working.

cyberix@eval:~$ glxgears
X Error of failed request: BadRequest (invalid request code or no such operation)
  Major opcode of failed request: 135 (GLX)
  Minor opcode of failed request: 19 (X_GLXQueryServerString)
  Serial number of failed request: 16
  Current serial number in output stream: 16

This is not (usefully) fixable in Ubuntu.

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

Glxgears has been reported to work on some setups. Might be a video driver problem instead, but which package should this report then be attached to?

tags: added: hw-specific
tags: added: regression-potential
affects: mesa-utils (Ubuntu) → xserver-xorg-driver-i810 (Ubuntu)
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

Now. This is tricky. I got rid of the i810 error by configuring my Xorg manually (see configuration below). This however did not fix the problem. So "(EE) GLX error: Can not get required symbols." must be the one causing the problem. I'll post a copy of the new xorg log file.

cyberix@eval:~$ cat /etc/X11/xorg.conf

Section "Device"
       Identifier "Configured Video Device"
       driver "intel"
EndSection

Section "Monitor"
       Identifier "Configured Monitor"
EndSection

Section "Screen"
       Identifier "Default Screen"
       Monitor "Configured Monitor"
       Device "Configured Video Device"
EndSection

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

Your first log file contains this:

(II) LoadModule: "i810"
(WW) Warning, couldn't open module i810
(II) UnloadModule: "i810"
(EE) Failed to load module "i810" (module does not exist, 0)

and your 2nd one this:

(EE) GLX error: Can not get required symbols.

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

Both of them contain:

(EE) GLX error: Can not get required symbols.

Changed in xserver-xorg-driver-i810 (Ubuntu):
importance: Undecided → Low
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

Compiz, and 3d stuff running on Wine seem to fail too. Are you sure this is of Low importance?

Steve Beattie (sbeattie)
affects: xserver-xorg-driver-i810 (Ubuntu) → xserver-xorg-video-intel (Ubuntu)
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

I tried booting from the Karmic beta livecd, and glxgears worked fine. See the attached xorg log file which I copied to a usb stick while being in live system.

Bryce Harrington (bryce)
tags: added: karmic
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

So what does a previously installed system do differently from a system booted from the livecd?
Is it that the installation would detect the video hardware and do something special based on that?
Are some driver left out, if the video card doesn't seem to be present?

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

Removing package xorg-driver-fglrx fixes the problem, so I assume the problem is in that package instead.

affects: xserver-xorg-video-intel (Ubuntu) → fglrx-installer (Ubuntu)
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

Needless to say (I hope), having drivers installed for one video card should not break operation of another video card?

Revision history for this message
nickleus (nick-humphrey) wrote :

here's how i got things working in karmic amd64 with my ATI Radeon HD 4650:
http://nickhumphrey.net/showthread.php?p=3345

Revision history for this message
ARMason3rd (armason3rd) wrote :

andy@Andy-PC:~$ glxinfo
name of display: :0.0
X Error of failed request: BadRequest (invalid request code or no such operation)
  Major opcode of failed request: 135 (GLX)
  Minor opcode of failed request: 19 (X_GLXQueryServerString)
  Serial number of failed request: 16
  Current serial number in output stream: 16

Revision history for this message
sunny (sunny-sun) wrote :

the BadRequest is because OpenGL driver is not loaded.
are you using intel OpenGL driver as Toni Ruottu? you have to install ati driver and run "aticonfig --initial -f"

tags: removed: hw-specific regression-potential
summary: - glxgears fails in Karmic
+ mesa doesn't work when fglrx is installed
Revision history for this message
Peter Cordes (peter-cordes) wrote :

Having fglrx installed replaces the open-source libGL with ATI's libGL, so you can't have both at once.

$ dpkg -S /usr/lib/libGL.so*
libgl1-mesa-dev: /usr/lib/libGL.so
libgl1-mesa-glx: /usr/lib/libGL.so.1
diversion by xorg-driver-fglrx from: /usr/lib/libGL.so.1.2
diversion by xorg-driver-fglrx to: /usr/lib/fglrx/libGL.so.1.2.xlibmesa
xorg-driver-fglrx, libgl1-mesa-glx: /usr/lib/libGL.so.1.2

 Removing fglrx removes the diversions, putting the mesa version back.

 I see you already fixed your "i810" -> "intel" problem.

 I've retitled this bug to what it's really about, and removed the hw-specific and regression tags. This package has always worked this way, by moving aside the mesa libGL. The NVidia binary drivers work the same way. And it's a "dll hell" problem, not a hw-specific problem at all.

 This could either be marked as invalid, or left around forever to mark this as a known issue. Unless /usr/lib/libGL is replaced with a wrapper library that can use whatever's available, I don't see how this could ever be solved. I think it does belong assigned to fglrx-installer, because it's replacing libGL with a libGL that doesn't support mesa anymore.

 That sucks that a system with heterogeneous GPUs, some of which use non-mesa drivers, can't do 3D on all heads without a chroot or ld.so tricks/env vars.

Revision history for this message
Peter Cordes (peter-cordes) wrote :

I would set this to won'tfix, but maybe only the maintainer can do that.

Changed in fglrx-installer (Ubuntu):
status: New → Confirmed
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

Did you know there is a bug for not being able to switch graphics card on the fly.
  https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/312756

I do understand that getting that feature will take some time. However, it is ridiculous that Windows users can switch their graphics card on the fly, but Ubuntu users are expected to both install/remove some software package and alter the graphics card setting in their bios. Ubuntu provides the user with no hint that you could actually make the graphics card switching work by removing some package, and even if it did this would be hard for a regular user to understand. I'm an experienced user, and I thought for a year that my other graphics card might be broken.

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

My bottom line is. It should atleast be possible to make video cards work by switching the actual hardware or by toggling it from bios. I'm ok with asking the user to install another driver when the new card is detected. I'm not ok with asking the user remove one driver to make another card work.

Someone should found a project called "One single machete cut" to fix the issue.

Revision history for this message
Bryce Harrington (bryce) wrote :

[This is an automatic notification.]

Hi Toni,

This bug was reported against an earlier version of Ubuntu, can you
test if it still occurs on Lucid?

Please note we also provide technical support for older versions of
Ubuntu, but not in the bug tracker. Instead, to raise the issue through
normal support channels, please see:

    http://www.ubuntu.com/support

If you are the original reporter and can still reproduce the issue on
Lucid, please run the following command to refresh the report:

  apport-collect 442574

If you are not the original reporter, please file a new bug report, so
we can work with you as the original reporter instead (you can reference
bug 442574 in your report if you think it may be related):

  ubuntu-bug xorg

If by chance you can no longer reproduce the issue on Lucid or if you
feel it is no longer relevant, please mark the bug report 'Fix Released'
or 'Invalid' as appropriate, at the following URL:

  https://bugs.launchpad.net/ubuntu/+bug/442574

Changed in fglrx-installer (Ubuntu):
status: Confirmed → Incomplete
tags: added: needs-retested-on-lucid-by-june
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

I tried installing the restricted driver for my ATI card on Lucid, and then switching to Intel at boot time. The system was not able to bootup until I removed the fglrx package.

Changed in fglrx-installer (Ubuntu):
status: Incomplete → New
Bryce Harrington (bryce)
tags: added: hardy
Traumflug (mah-jump-ing)
tags: added: lucid
removed: needs-retested-on-lucid-by-june
Changed in fglrx-installer (Ubuntu):
status: New → Opinion
description: updated
Revision history for this message
=0yP)F]|L(0YNrv (ccgjsz8xdbdyyvy-deactivatedaccount) wrote :

Had to remove this package to make GLX work for me again with Intel card. I also had to remove nvidia-current, nvidia-settings, and nvidia-common, as that was also taking over just like this package is.

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

I see this has been marked as an opinion. To clarify, the opinion is this "one should not be able to break his Ubuntu system by installing a package with apt-get"

Revision history for this message
Rob A (docsmooth) wrote :

This bug still affects oneiric. Tested on an Lenovo T500. Is particularly difficult for customers who have dual GPUs in their laptop, and want to switch between them (for power or power-savings), but also use the fglrx driver (not supporting switcheroo, only cold switch) for games/other 3D.

Same error messages as reported by Toni Ruottu above, problem is solved by removal of fglrx, which is an unworkable workaround, since it leaves the ATI driver unusable. On my system, the i915 card uses 10W less power than the Radeon, so on airplane flights, it's a big deal.

Revision history for this message
Rob A (docsmooth) wrote :

Additionally, I tried to script an "if [ `lspci |grep -c Intel` -gt 0 ]; then ..." to change the links between fgrlx and mesa, based on what I had chosen in the bios at boot time, but don't see a difference between the filesets that I can affect...

dpkg -S *libGL* > intel-libGL.txt
awk '{ print $2 }' intel-libGL.txt |while read LINE; do file $LINE; done > intel-libGL-filetype.txt
apt-get install fglrx
dpkg -S *libGL* > ati-libGL.txt
awk '{ print $2 }' ati-libGL.txt |while read LINE; do file $LINE; don
e > ati-libGL-filetype.txt
rob@rob-kubuntu3:~/stuff/video-0404$ diff intel-libGL-filetype.txt ati-libGL-filetype.txt
1a2
> /usr/lib/fglrx/libGL.so: symbolic link to `libGL.so.1'
8a10,11
> /usr/lib/fglrx/libGL.so.1.2: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked,
 stripped
> /usr/lib/fglrx/switchlibGL: a /usr/bin/python script text executable
11a15,16
> /usr/lib32/fglrx/libGL.so.1.2: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically
linked, stripped
> /usr/lib/fglrx/libGL.so.1: symbolic link to `libGL.so.1.2'

This says to me that there are only new files and links added with fglrx, no replacement of existing files/links. In particular, /usr/lib/libGL.so doesn't exist in 64-bit oneiric, like it did on the filers' system.

Rob A (docsmooth)
tags: added: oneiric
Revision history for this message
Gioele Barabucci (gioele) wrote :

Couldn't dpkg-divert be used to make the current libGL.so selectable in a sane way until a more complete solution is found?

For the records, this is still a problem in precise 12.04 LTS.

Revision history for this message
Gioele Barabucci (gioele) wrote :

Here is a use case that I hope can change the status of this report from Opinion to New/Confirmed.

The fglrx package is needed if one wants to use the AMD CodeXL tool, an OpenGL/OpenCL development tool from AMD. The CodeXL tool can work with "offline devices", i.e. without having an AMD GPU in the computer from where it is run, but it requires the Catalyst/fglrx libraries to be installed anyway.

Here is the problem: when CodeXL sees that the host is using an AMD libGL.so library, it disables its "offline" features and tries to use the available AMD GPU. But there are no available AMD GPUs, so it fails.

To use CodeXL one has to

1. start on a system where fglrx is not installed
2. install fglrx (this install libGL.so and many other libraries)
3. use CodeXL (the fglrx's libGL.so is present but not loaded, so CodeXL does not know it is available and "offline devices" can be used)
4. remove fglrx

If one reboots without removing the fglrx package, then its libGL will be loaded and CodeXL will stop to work.

This problem would be solved if it were possible to install fglrx without activating its version of libGL.so.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.