Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258322 - eselect opengl set ati overwrites libdri.so from xorg-server
Summary: eselect opengl set ati overwrites libdri.so from xorg-server
Status: RESOLVED DUPLICATE of bug 274959
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal with 1 vote (vote)
Assignee: Jeffrey Gardner (RETIRED)
URL:
Whiteboard:
Keywords:
: 269145 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-09 12:21 UTC by Steffen Hau
Modified: 2009-07-20 15:13 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes the immediate problem (xorg-server-1.5.3-eselect-ati-fix.patch,794 bytes, patch)
2009-05-06 18:44 UTC, Peter Alfredsen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Hau 2009-02-09 12:21:51 UTC
When I run eselect opengl set ati, the libdri.so in /usr/lib/xorg/modules/extensions/ (provided by org-server) is overwritten with a symbolic link to /usr/lib/opengl/ati/extensions/libdri.so. This symlink still exists after running eselect opengl set xorg-x11.

I have the following packages installed:
[I--] [ ~] x11-base/xorg-server-1.5.3-r2 (0)
[I--] [ ~] x11-drivers/ati-drivers-8.573-r1 (0)
[I--] [  ] app-admin/eselect-opengl-1.0.6-r1 (0)

Reproducible: Always

Steps to Reproduce:
1. eselect opengl set xorg-x11 after installing xorg-server
2.
3.

Actual Results:  
xorg-server's libdri.so is overwritten by eselect opengl set ati


emerge --info
Portage 2.2_rc23 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.28.3-HAUIHAU i686)
=================================================================
System uname: Linux-2.6.28.3-HAUIHAU-i686-Intel-R-_Core-TM-2_CPU_T7200_@_2.00GHz-with-glibc2.0
Timestamp of tree: Mon, 09 Feb 2009 07:40:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer -mfpmath=sse -msse3"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer -mfpmath=sse -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/ "
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-znow -Wl,--sort-common -s"
LINGUAS="de"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/desktop-effects /usr/local/portage/layman/hauihau"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac aalib accessibility acl acpi alsa apache2 bash-completion berkdb bidi bluetooth bzip2 cairo cdb cddb cdparanoia cdr cli cpudetection cracklib crypt ctype cups curl dbus dedicated dga directfb dri dts dv dvd dvdr dvdread encode exif ffmpeg firefox flac fontconfig foomaticdb fortran ftp gdbm gif glitz glut gmp gnome gnutls gstreamer gtk gtk2 hal iconv ieee1394 imagemagick imap imlib innodb ipod ipv6 isdnlog java java6 javascript jpeg jpeg2k kdeprefix lame lcms ldap libcaca libsamplerate lua mad midi mikmod mmap mmx mng mono mp3 mpeg mplayer mudflap musepack musicbrainz mysql ncurses nls noseamonkey nptl nptlonly nsplugin offensive ogg openal opengl openmp oscar pam pcmcia pcre pdf perl php png posix ppds pppd python qt4 quicktime readline reflection rtc ruby samba sasl sdl session sndfile snmp sockets spell spl sqlite sse sse2 ssl subversion svg sysfs tcl tcpd theora threads tiff tk truetype unicode usb userlocales v4l2 vcd vim-syntax visualization vorbis win32codecs x264 x86 xcb xcomposite xine xinerama xml xorg xosd xpm xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status substitute unique_id userdir usertrack version vhost_alias" APACHE2_MPMS="worker" CAMERAS="canon casio_qv fuji kodak konica minolta mustek panasonic samsung sonydscf1 sonydscf55 toshiba" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="fglrx radeonhd vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2009-02-09 12:36:42 UTC
Confirmed:
loki ~ # ls -la /usr/lib64/xorg/modules/extensions/libdri.so
lrwxrwxrwx 1 root root 42 2009-02-09 13:28 /usr/lib64/xorg/modules/extensions/libdri.so -> /usr/lib64/opengl/ati/extensions/libdri.so
Comment 2 Donnie Berkholz (RETIRED) gentoo-dev 2009-02-15 07:05:24 UTC
Is this a recent change by ati-drivers?

This will require changes by xorg-server (to install to the right place in dynamic_libgl_install(), line ~510) and eselect-opengl (to symlink correctly, line ~153) to compensate.
Comment 3 Steffen Hau 2009-02-15 10:58:01 UTC
(In reply to comment #2)
> Is this a recent change by ati-drivers?
> 
> This will require changes by xorg-server (to install to the right place in
> dynamic_libgl_install(), line ~510) and eselect-opengl (to symlink correctly,
> line ~153) to compensate.
> 
I took a look in my emerge logs and libdri.so is included in ati-drivers since ati-drivers-8.552. Prior to this release, the folder /usr/lib/opengl/ati/extensions was a symlink to /usr/lib/opengl/xorg-x11/extensions.

I think this would be the ebst solution, to let xorg-server ebuild install its libdri.so the same way as libglx.so.
Comment 4 Markus Strobl 2009-03-19 15:34:08 UTC
Confirmed here also. 

I consider this a fairly major issue as what happened to me was this:

1) Emerge xorg-server & xf86-video-ati. Everything is fine.
2) Wanted to try fglrx because crossover-games does not work with the open source driver. Installed ati-drivers (fglrx).
3) Realized fglrx sucks when it comes to KDE4 as fglrx does not have EXA so decided to switch back to the open source driver.
4) unmerged ati-drivers but could not get dri working. When ati-drivers is unmerged, the link is left dangling. Re-emerging xorg-server does NOT fix this as it will not overwrite the dangling link. 
5) I had to manually delete the link, then re-emerge xorg-server. 
Comment 5 James Le Cuirot gentoo-dev 2009-04-24 10:51:46 UTC
I ran into this today. I agree that xorg-server's libdri.so should be moved from /usr/lib/xorg/modules/extensions to /usr/lib/opengl/xorg-x11/extensions and then symlinked with eselect. That would make it consistent.
Comment 6 Peter Alfredsen (RETIRED) gentoo-dev 2009-05-06 18:44:32 UTC
Created attachment 190525 [details, diff]
Fixes the immediate problem

This will fix the problem of these two implementations clobbering each other.
It will however leave a corner-case:
If you eselect from ati to nvidia, nvidia will use the ati libdrm.so.

But that's the case presently also, only the xorg-x11 libdrm.so has been deleted, so you'll have to re-compile xorg-server to get a libdrm.so that's usable. This patch will ensure that there's an easy way out though. Just do eselect opengl set xorg-x11, then eselect to nvidia.

IOW, the opengl eselect module will need some kind of special casing for libdrm.so for this problem to completely disappear.
Comment 7 James Le Cuirot gentoo-dev 2009-05-07 09:34:52 UTC
I think you mean libdri, not libdrm.

If I understand the problem correctly, you could fix the nvidia case by getting the nvidia ebuild to symlink from /usr/lib/opengl/xorg-x11/extensions/libdri.so to /usr/lib/opengl/nvidia/extensions/libdri.so.
Comment 8 Steffen Hau 2009-05-07 12:31:50 UTC
The nvidia drivers use xorg's libdri as far as I know. So the eselect should also symlink the xorg-x11's libdri not to /usr/lib/opengl/nvidia/extensions/libdri.so but /usr/lib/xorg/moduls/extensions/libdri.so instead. But I hope, that this issue will be resolved in the near future, as it sucks... I reported this in the beginning of february and can't figure out why such a simple patch is not applied to the ebuild. The only thing which has to be consired is, that the eselect module for opengl perhaps needs to be adjusted, to to the right things.
Comment 9 James Le Cuirot gentoo-dev 2009-05-07 12:43:52 UTC
Steffen, you misunderstood my suggestion. The *ebuild* should symlink to /usr/lib/opengl/nvidia/extensions/libdri.so and that would make eselect do the right thing without any modifications.
Comment 10 Steffen Hau 2009-05-07 12:48:27 UTC
This should be done by eselect, for what it is designed for, to switch the opengl implementation. As nvidia depens on libdri from xorg-x11, the eselest module should make sure, that libdri from /usr/lib/xorg/modules/extensions is symlinked to the libdri provided by xorg-x11. If the nvidia ebuild would make this symlink, you would loose it, if you change the opengl implementation to ati.
Comment 11 Rémi Cardona (RETIRED) gentoo-dev 2009-05-07 12:50:30 UTC
NAK, nvidia-drivers doesn't provide nor use libdri.so and it shouldn't symlink
xorg's either.

@all binary drivers maintainers, let's fix this once and for all please.
Patches are welcome since I only own hardware that's supported by freedesktop
drivers.

Thanks
Comment 12 Rémi Cardona (RETIRED) gentoo-dev 2009-05-07 12:52:07 UTC
@nvidia guys, your help is kindly requested here to sort this mess out :)

Insights and patches are more than welcome.

Thanks
Comment 13 James Le Cuirot gentoo-dev 2009-05-07 12:56:53 UTC
Steffan, eselect doesn't give any special treatment to particular drivers. It just looks in /usr/lib/opengl/foo/extensions and symlinks whatever it finds in there to /usr/lib/xorg/modules/extensions. So in the nvidia case, it would create /usr/lib/xorg/modules/extensions/libdri.so, which would point to /usr/lib/opengl/nvidia/extensions/libdri.so and this in turn would point to /usr/lib/opengl/xorg-x11/extensions/libdri.so. That's it!

But if Rémi is correct and it doesn't even use libdri.so then we can probably just ignore the nvidia case. In the worst case, the symlink will point to the xorg-x11 or ati version but it won't get used.
Comment 14 Peter Alfredsen (RETIRED) gentoo-dev 2009-05-09 14:54:18 UTC
*** Bug 269145 has been marked as a duplicate of this bug. ***
Comment 15 Francisco J. Vazquez 2009-06-05 07:13:03 UTC
Two days ago I ran into this bug (http://forums.gentoo.org/viewtopic-t-768839.html). Having fglrx installed made it impossible to switch to radeon/radeonhd open source drivers without uninstalling fglrx first. Obviously, the patch in comment #6 fixed it. Seriously, what is stopping that patch from entering portage since months ago? Just the symlink in nvidia-drivers??
Comment 16 Rolf Prünte 2009-07-19 19:18:14 UTC
Any news on this? This bug is really annoying for me, since I am trying to switch between xf86-video-intel and ati-drivers (my laptop has two switchable gpus).
Comment 17 Rolf Prünte 2009-07-19 20:02:20 UTC
Sorry for spamming around but I think the problem described in this bug has already been solved in bug 274959.
Comment 18 Rémi Cardona (RETIRED) gentoo-dev 2009-07-20 15:13:05 UTC
Indeed, this is fixed.

If anyone still has issues with libdri.so, please don't hesitate to open a new bug report.

Thanks

*** This bug has been marked as a duplicate of bug 274959 ***