[opensuse-xorg] Help with Xorg internals needed
hello, my name is Dmitry Serpokryl and i'd highly appreciate if someone could point me to the proper documentation about "How to set Xorg with several proprietary drivers (ATI/nVidia) installed?" right now the case is straight forward: 1) both "x11-video-fglrxG*" and "x11-video-nvidiaG*" packages contain several duplicated files, so it's clear that they should be repackaged/rebuilded anyway. it could be a minor issue, but some of the duplicates are related to the second point. 2) both "x11-video-fglrxG*" and "x11-video-nvidiaG*" packages place some content into: "/usr/lib*/xorg/modules/updates/" and the case of this letter is the existence of: "/usr/lib*/xorg/modules/updates/extensions/libglx.so" which prevent (for example) the "AIGLX" for Intel cards and (according to the "/usr/lib*/xorg/modules/updates/README.updates") there are no "selection mechanism" capable to "match" the hardware with the available drivers installed. the question is: "How to set the Xorg with mentioned proprietary drivers properly?" in the end we should have the loaded "libGL.so" from "Mesa" for Intel cards, from "x11-video-nvidiaG*" for NVIDIA and from "x11-video-fglrxG*" for ATI, BUT! there should be some kind of a selection depending on the "driver", because both (ATI and NVIDIA) could use the open source solutions instead of proprietary ones. right now i see only the way of an "ugly scripting" based on the output from (and may be some other sane checks):
lspci | grep -i vga grep -i driver /etc/X11/xorg.conf
which will set the "LD_PRELOAD=${LIBGL_SOLUTION}" with the optional restart of the Xorg. this kind of a "solutions" we should use as a last resort, because all games with the "LD_PRELOAD=" are definitely lead to the wrong direction. probably i should pick the disk of Ubuntu and look at their schema, but it'd definitely prefer to follow the advises from this ML instead. my apologizes for such a long letter. regards, sda -- To unsubscribe, e-mail: opensuse-xorg+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-xorg+help@opensuse.org
On Thu, Aug 27, 2009 at 02:06:27PM +0400, sda wrote:
hello,
my name is Dmitry Serpokryl and i'd highly appreciate if someone could point me to the proper documentation about "How to set Xorg with several proprietary drivers (ATI/nVidia) installed?"
AFAIK this is not possible. At least not on Linux. Maybe it is on Windows.
right now the case is straight forward:
1) both "x11-video-fglrxG*" and "x11-video-nvidiaG*" packages contain several duplicated files, so it's clear that they should be repackaged/rebuilded anyway.
No.
it could be a minor issue, but some of the duplicates are related to the second point.
No, it's not a minor issue.
2) both "x11-video-fglrxG*" and "x11-video-nvidiaG*" packages place some content into:
"/usr/lib*/xorg/modules/updates/"
and the case of this letter is the existence of:
"/usr/lib*/xorg/modules/updates/extensions/libglx.so"
which prevent (for example) the "AIGLX" for Intel cards and (according to the "/usr/lib*/xorg/modules/updates/README.updates") there are no "selection mechanism" capable to "match" the hardware with the available drivers installed.
For Intel, fglrx and nvidia you need different "libglx.so" X modules.
the question is:
"How to set the Xorg with mentioned proprietary drivers properly?"
Again. It's not possible at all.
in the end we should have the loaded "libGL.so" from "Mesa" for Intel cards, from "x11-video-nvidiaG*" for NVIDIA and from "x11-video-fglrxG*" for ATI, BUT! there should be some kind of a selection depending on the "driver", because both (ATI and NVIDIA) could use the open source solutions instead of proprietary ones.
right now i see only the way of an "ugly scripting" based on the output from (and may be some other sane checks):
lspci | grep -i vga grep -i driver /etc/X11/xorg.conf
which will set the "LD_PRELOAD=${LIBGL_SOLUTION}" with the optional restart of the Xorg. this kind of a "solutions" we should use as a last resort, because all games with the "LD_PRELOAD=" are definitely lead to the wrong direction.
You're right, it's ugly and usually it doesn't work anyway.
probably i should pick the disk of Ubuntu and look at their schema, but it'd definitely prefer to follow the advises from this ML instead.
I believe what Ubuntu does is download and install the required driver for the existing graphics driver. I doubt they ship all drivers and switch between them on-the-fly. Best regards, Stefan Public Key available ------------------------------------------------------ Stefan Dirsch (Res. & Dev.) SUSE LINUX Products GmbH Tel: 0911-740 53 0 Maxfeldstraße 5 FAX: 0911-740 53 479 D-90409 Nürnberg http://www.suse.de Germany ----------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) ----------------------------------------------------------------- -- To unsubscribe, e-mail: opensuse-xorg+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-xorg+help@opensuse.org
On Thu, Aug 27, 2009 at 02:38:59PM +0200, Stefan Dirsch wrote:
probably i should pick the disk of Ubuntu and look at their schema, but it'd definitely prefer to follow the advises from this ML instead.
I believe what Ubuntu does is download and install the required driver for the existing graphics driver. I doubt they ship all drivers and switch between
s/driver/hardware/ Best regards, Stefan Public Key available ------------------------------------------------------ Stefan Dirsch (Res. & Dev.) SUSE LINUX Products GmbH Tel: 0911-740 53 0 Maxfeldstraße 5 FAX: 0911-740 53 479 D-90409 Nürnberg http://www.suse.de Germany ----------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) ----------------------------------------------------------------- -- To unsubscribe, e-mail: opensuse-xorg+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-xorg+help@opensuse.org
cd /usr/lib*/xorg/modules/updates/extensions/ l libglx.so
hi guys, hello Stefan! dear Stefan, huge THANKS for your clarification on the subject. inspected some other Linux distributions with already installed proprietary video drivers. brief resume (imho of course): 1. the current content of "/usr/X11R6/lib" (from the ATI/NVIDIA drivers) could be moved to the "/usr/X11R6/lib/$VENDOR" with the appropriate modification of "/etc/ld.so.conf" (we're fine here) 2. it's hard (if even possible) to provide the ATI drivers without total mess for other equipment due to the: "/usr/lib*/xorg/modules/updates/extensions/libdri.so" "/usr/lib*/xorg/modules/updates/extensions/libglx.so" 3. NVIDIA drivers could be pre-installed because: libglx.so -> libglx.so.$DRIVER_VERSION and it seems that removal of "libglx.so" (if we just delete the symlink) like:
rm /usr/lib*/xorg/modules/updates/extensions/libglx.so
has no impact on the system performance, but this require some additional testing and (probably) rebuild of the "x11-video-nvidiaG*" is needed due to the absence of "libnvidia-wfb.so.$DRIVER_VERSION" in the current packages. i'll send the detailed testing results here if You're interested. thank you for your kind help and attention. regards, sda On 14:38 Thu 27 Aug , Stefan Dirsch wrote:
On Thu, Aug 27, 2009 at 02:06:27PM +0400, sda wrote:
hello,
my name is Dmitry Serpokryl and i'd highly appreciate if someone could point me to the proper documentation about "How to set Xorg with several proprietary drivers (ATI/nVidia) installed?"
AFAIK this is not possible. At least not on Linux. Maybe it is on Windows.
right now the case is straight forward:
1) both "x11-video-fglrxG*" and "x11-video-nvidiaG*" packages contain several duplicated files, so it's clear that they should be repackaged/rebuilded anyway.
No.
it could be a minor issue, but some of the duplicates are related to the second point.
No, it's not a minor issue.
2) both "x11-video-fglrxG*" and "x11-video-nvidiaG*" packages place some content into:
"/usr/lib*/xorg/modules/updates/"
and the case of this letter is the existence of:
"/usr/lib*/xorg/modules/updates/extensions/libglx.so"
which prevent (for example) the "AIGLX" for Intel cards and (according to the "/usr/lib*/xorg/modules/updates/README.updates") there are no "selection mechanism" capable to "match" the hardware with the available drivers installed.
For Intel, fglrx and nvidia you need different "libglx.so" X modules.
the question is:
"How to set the Xorg with mentioned proprietary drivers properly?"
Again. It's not possible at all.
in the end we should have the loaded "libGL.so" from "Mesa" for Intel cards, from "x11-video-nvidiaG*" for NVIDIA and from "x11-video-fglrxG*" for ATI, BUT! there should be some kind of a selection depending on the "driver", because both (ATI and NVIDIA) could use the open source solutions instead of proprietary ones.
right now i see only the way of an "ugly scripting" based on the output from (and may be some other sane checks):
lspci | grep -i vga grep -i driver /etc/X11/xorg.conf
which will set the "LD_PRELOAD=${LIBGL_SOLUTION}" with the optional restart of the Xorg. this kind of a "solutions" we should use as a last resort, because all games with the "LD_PRELOAD=" are definitely lead to the wrong direction.
You're right, it's ugly and usually it doesn't work anyway.
probably i should pick the disk of Ubuntu and look at their schema, but it'd definitely prefer to follow the advises from this ML instead.
I believe what Ubuntu does is download and install the required driver for the existing graphics driver. I doubt they ship all drivers and switch between them on-the-fly.
Best regards, Stefan
Public Key available ------------------------------------------------------ Stefan Dirsch (Res. & Dev.) SUSE LINUX Products GmbH Tel: 0911-740 53 0 Maxfeldstraße 5 FAX: 0911-740 53 479 D-90409 Nürnberg http://www.suse.de Germany ----------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -----------------------------------------------------------------
-- To unsubscribe, e-mail: opensuse-xorg+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-xorg+help@opensuse.org
* sda <dmitry.serpokryl@gmail.com> [08-27-09 15:26]:
and it seems that removal of "libglx.so" (if we just delete the symlink) like:
rm /usr/lib*/xorg/modules/updates/extensions/libglx.so
has no impact on the system performance, but this require some additional testing and (probably) rebuild of the "x11-video-nvidiaG*" is needed due to the absence of "libnvidia-wfb.so.$DRIVER_VERSION" in the current packages. i'll send the detailed testing results here if You're interested.
nVidia driver install removes files from following packages: Mesa Mesa-32bit xorg-x11-driver-video-nouveau-3d -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse-xorg+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-xorg+help@opensuse.org
On 15:34 Thu 27 Aug , Patrick Shanahan wrote:
* sda <dmitry.serpokryl@gmail.com> [08-27-09 15:26]:
and it seems that removal of "libglx.so" (if we just delete the symlink) like:
rm /usr/lib*/xorg/modules/updates/extensions/libglx.so
has no impact on the system performance, but this require some additional testing and (probably) rebuild of the "x11-video-nvidiaG*" is needed due to the absence of "libnvidia-wfb.so.$DRIVER_VERSION" in the current packages. i'll send the detailed testing results here if You're interested.
nVidia driver install removes files from following packages:
Mesa Mesa-32bit xorg-x11-driver-video-nouveau-3d
as i said this is nothing else but the minor issues and they could be easily avoided (though "nouveau" is out of scope). all the details will be disclosed after some experiments/testing/QA/etc... and it seems already that "x11-video-nvidiaG*" will be "customized" a bit. thanks for your feedback anyway! regards, sda -- To unsubscribe, e-mail: opensuse-xorg+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-xorg+help@opensuse.org
hi guys, here're the results of my modest investigation. below is a resume for NVIDIA proprietary drivers installed along with Mesa/Xorg ones and system has no failures even if Intel/ATI/S3/etc. video card is used (setup was tested as LiveCD/USB-stick with installation to the hard drive and following boot of installed system was successfully performed). nVidia drivers are from: http://download.nvidia.com/opensuse/11.1/ and not modified. 1. preparation: * link the nVidia "libglx.so.$DRIVER_VERSION" to libglx.so.$VENDOR . example: > ln -sf \ /usr/lib/xorg/modules/updates/extensions/libglx.so.185.18.36 \ /usr/lib/xorg/modules/updates/extensions/libglx.so.nvidia * delete the $VENDOR's "libglx.so" (we'll set it in a proper way right after the creation/inspection of our "/etc/X11/xorg.conf" file before actual call to "xinit"): > rm /usr/lib/xorg/modules/updates/extensions/libglx.so 2. solution (works both for "live" and "installed" systems): * below is a simple example of a "logic" used to validate the settings of a current running system. we assume that "sax2" is smart enough to make preliminary checks and set the proper driver (it's true even if proprietary drivers are installed - consult the content of "/usr/share/sax/api/data/cdb/*"). all we need is to "adjust" the "libglx.so" for nVidia cards and additional "libdri.so" for ATI (ati is out of scope here): if [ -e /etc/X11/xorg.conf ] ; then if [ "`grep nvidia /etc/X11/xorg.conf | grep Driver | grep -v grep `" != "" ] ; then ln -sf /usr/lib/xorg/modules/updates/extensions/libglx.so.nvidia \ /usr/lib/xorg/modules/updates/extensions/libglx.so else if [ -e /usr/lib/xorg/modules/updates/extensions/libglx.so ] ; then rm /usr/lib/xorg/modules/updates/extensions/libglx.so fi fi fi in other words this "logic" should validate the "/etc/X11/xorg.conf" before we call "xinit" and as an option we can remove the $VENDOR's "libglx.so" during the X stop/shutdown/reboot/etc.. in this case if we're using the open source drivers - then the "standard" ("/usr/lib/xorg/modules/extensions/libglx.so") is loaded and we're fine. 3. notes: a) $VENDOR's "libglx.so" is removed and not restored even if proprietary driver is used: - results are 50/50. system works, but "glxinfo" crashes. "glxgears" also crash on start. not recommended. b) nVidia's "libglx.so" left as it is and no extra "logic" is used (our current defaults): - AIGLX failed for Intel cards and several issues with "glx" for ATI boards, but system works. c) it seems more interesting to rename the "standard" libglx.so to the "libglx.so.xorg" and create something like this: > ln -sf /usr/lib/xorg/modules/updates/extensions/libglx.so /etc/X11/libglx.so then we can (depending on the running system) just manage "/etc/X11/libglx.so" the way we want. please let me know if you need further details. thanks for your attention, regards, sda -- To unsubscribe, e-mail: opensuse-xorg+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-xorg+help@opensuse.org
participants (3)
-
Patrick Shanahan
-
sda
-
Stefan Dirsch