You are not logged in.

#1 2011-06-16 14:27:46

samsagax
Member
Registered: 2011-03-18
Posts: 33

Hybrid-graphics will need to resolve a conflict with libgl

Hi there.
I'm in some kind of trouble to get things to work as clean as possible to the most Nvidia Optimus technology.

Here is the thing:
I'm trying to support Bumblebee and inserting it cleanly in the ArchLinux package structure. The trouble I'm having is I'm trying to use the official nvidia-utils from the repositories but they conflict with libgl (see this post: link). Why is that? In order to support hybrid graphics we must have both libgl's (nvidia for the discrete card and libgl for the intel card) as we have two different drivers in most of the new laptops. The current dirty workarround is to download the nvidia driver from it's website, copying the libraries into a new folder (say /usr/lib/nvidia-current/) and force the second X server (that's how Bumblebee works so far) to use those libraries.
I really don't see how they can be in conflict as a matter of concept. I see this as an obstacle cos if I install nvidia-utils I lose 3D acceleration on the intel card. See the problem? We have two different graphics cards, two different kernel modules, two different x-drivers and two different libraries that MUST coexist. I don't understand why they have to be in conflict? Why is that installing nvidia-utils is forcing us to use only those libgl's for everything?

I'm posting this here cos I'm not sure if this is worked around or even think to be worked out. The fact that this technology is here to stay and in order to have REAL support of this technology in our beloved GNU/Linux systems we must resolve this particular conflict. At least to have a fertile ground to choose to use either card with 3d enabled without having to reinstall all x-drivers each time and try to develop a complete solution (I know that Bumblebee as it is now is incomplete).
I'm not sure if I can report this as a bug here or where. Want to check for someone else's opinion in this issue and as I see, I'm not the only one that found this problem.

Offline

#2 2011-06-16 15:25:11

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 340

Re: Hybrid-graphics will need to resolve a conflict with libgl

Optimus isn't supported in Linux as per nvidia, there is an incomplete open source solution for non-Optimus laptop which have dual graphics called vga_switcheroo but you'll have to use nouveau. This will not work on Optimus laptop, you can search Phoronix, I recall seeing a Gsoc proposition about Optimus support in Linux but iirc it wasn't accepted.

nvidia reimplements the whole graphic stack including libGL for its driver to control the whole experience/performance/issues.


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#3 2011-06-16 15:46:30

samsagax
Member
Registered: 2011-03-18
Posts: 33

Re: Hybrid-graphics will need to resolve a conflict with libgl

ChoK wrote:

Optimus isn't supported in Linux as per nvidia, there is an incomplete open source solution for non-Optimus laptop which have dual graphics called vga_switcheroo but you'll have to use nouveau. This will not work on Optimus laptop, you can search Phoronix, I recall seeing a Gsoc proposition about Optimus support in Linux but iirc it wasn't accepted.

nvidia reimplements the whole graphic stack including libGL for its driver to control the whole experience/performance/issues.

Im aware that Optimus is not supported in Linux and that Nvidia won't (ever?) support it. But I'm concerned just about the libraries to be able to use both drivers on the same machine. I think you don't get the point.
Sure, nvidia replaces the whole libgl system to be used with their graphic cards, but what about the other cards? It's not acceptable that nvidia's libgl REPLACES all libgl's just add them side by side and let the nvidia use their libs and the rest of the drivers use the default libs.
I know this can be done (I actually do it in a very dirty manner) as a first step to a bigger problem: Multiple graphics cards on same computer and FROM DIFFERENT MANUFACTURERS (That's the big issue). We need libgl's for BOTH at the same time.

Sorry if you can't get my point (Is my English that bad?), but I'm arising an issue that will be a problem (and a big one) in the near future; now even Desktops come with some kind of Hybrid-graphics!

We must be able to use both cards with separate drivers and that means separate libs (not one replacing the other).

Offline

#4 2011-06-16 17:30:41

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Hybrid-graphics will need to resolve a conflict with libgl

samsagax wrote:

It's not acceptable that nvidia's libgl REPLACES all libgl's just add them side by side and let the nvidia use their libs and the rest of the drivers use the default libs.

Your issue is with nvidia, so take it up with them. Nobody here can do anything about it.

Offline

#5 2011-06-16 17:48:29

archreg
Member
Registered: 2011-03-12
Posts: 14

Re: Hybrid-graphics will need to resolve a conflict with libgl

tomk wrote:
samsagax wrote:

It's not acceptable that nvidia's libgl REPLACES all libgl's just add them side by side and let the nvidia use their libs and the rest of the drivers use the default libs.

Your issue is with nvidia, so take it up with them. Nobody here can do anything about it.

Well, not exactly... It's arch's packages that disallows to have two drivers same time. Gentoo for example has eselect for that kind of conflicts.

@samsagax
You could search in aur for pselect or glselect packages and try them out (something like eselect in gentoo),
or tune abs pkgbuilds by hand and make script for symbolic links switching to selected driver libgl.

just read your whole post, should do that earlier

Last edited by archreg (2011-06-16 18:13:40)

Offline

#6 2011-06-16 18:25:33

samsagax
Member
Registered: 2011-03-18
Posts: 33

Re: Hybrid-graphics will need to resolve a conflict with libgl

archreg wrote:
tomk wrote:
samsagax wrote:

It's not acceptable that nvidia's libgl REPLACES all libgl's just add them side by side and let the nvidia use their libs and the rest of the drivers use the default libs.

Your issue is with nvidia, so take it up with them. Nobody here can do anything about it.

Well, not exactly... It's arch's packages that disallows to have two drivers same time. Gentoo for example has eselect for that kind of conflicts.

@samsagax
You could search in aur for pselect or glselect packages and try them out (something like eselect in gentoo),
or tune abs pkgbuilds by hand and make script for symbolic links switching to selected driver libgl.


Was about to post something like this. Since the ONLY software using those libraries (nvidia's) are the nvidia driver and that "conflict" makes impossible to use ANY other driver. This is an Arch problem since it's developers/packers says: "You have to choose the driver to be only nvidia".
I'm not complaining about what nvidia does. Nvidia does bad things (like not bringing support for us). But our developers/packers should help us making nvidia compatible with everything else. I'm not saying that is developers/packers fault, I think this never occurred before, no one thought about the chance that we must have both libraries. What I'm asking is to remove the conflict in ligbg and nvidia's libgl; they don't even have the same name (!!!).
My workaround is to copy the nvidia libs in other directory and tell X server explicitly to use it.
I'm just rising this issue cos will really be a major problem if any kind of solution to hybrid graphics aver comes to us.

tomk wrote:

Your issue is with nvidia, so take it up with them. Nobody here can do anything about it.

I mean no offence, tomk. But this kind of things is what people say when they don't want to do anything about a problem. Blaming anybody doesn't fix anything. I'm not "taking it up" with anybody, just bring an idea to solve a real problem. Don't know exactly how cos I'm not an expert, just a user like most of us.

Offline

#7 2011-06-16 18:32:47

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Hybrid-graphics will need to resolve a conflict with libgl

So you can make a package that contains the "fixed" nvidia driver and the switching stuff. I don't really see the problem.

Also, you can look at the outdated nvidia-utils-sane:

aur/nvidia-utils-sane 256.35-2 (Out of Date) (1)
    NVIDIA drivers utilities and libraries. Repackaged for compatibility with libgl


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#8 2011-06-16 20:45:13

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Hybrid-graphics will need to resolve a conflict with libgl

samsagax wrote:

I mean no offence, tomk. But this kind of things is what people say when they don't want to do anything about a problem. Blaming anybody doesn't fix anything. I'm not "taking it up" with anybody, just bring an idea to solve a real problem. Don't know exactly how cos I'm not an expert, just a user like most of us.

You're right - I don't want to anything about this. You do - you even wanted to know "if I can report this as a bug here or where". So I'm telling you where.

If you think it's an Arch issue, post in the Arch bugtracker - I look forward to the devs' reply.

Offline

#9 2011-06-16 22:15:11

die13
Member
Registered: 2010-02-01
Posts: 4

Re: Hybrid-graphics will need to resolve a conflict with libgl

tomk wrote:

You're right - I don't want to anything about this. You do - you even wanted to know "if I can report this as a bug here or where". So I'm telling you where.
If you think it's an Arch issue, post in the Arch bugtracker - I look forward to the devs' reply.

Did anyone spit in your coffee today?

I do think this is an arch issue because it comes down to packaging of the drivers but I agree that the bugtracker is the place to resolve this.

Offline

#10 2011-06-17 08:11:13

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 340

Re: Hybrid-graphics will need to resolve a conflict with libgl

As I said, some people have success with the nouveau driver and intel driver, and of course it will become an issue with the rise of powerful IGPs.

Also maybe you can tell us more about your solution so people can improve on it, bringing the issue is good but it's even better to get the ball rolling.


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#11 2011-06-21 16:25:51

samsagax
Member
Registered: 2011-03-18
Posts: 33

Re: Hybrid-graphics will need to resolve a conflict with libgl

ChoK wrote:

As I said, some people have success with the nouveau driver and intel driver, and of course it will become an issue with the rise of powerful IGPs.

Also maybe you can tell us more about your solution so people can improve on it, bringing the issue is good but it's even better to get the ball rolling.

Ok. Here is the whole mess explained (you can find mode info here and here):
As Optimus uses both GPU's and each uses different libgl's is necessary to have both libgl's at the same time. This said, no pselect nor glselect are good solutions, we need both running at the same time (almost) all time. Why? well Bumblebee is still experimental but had been a good step forward in Optimus support since we are able to actually use the Nvidia card (Optimus has no hardware multiplexer so the Nvidia card is not plugged to any monitor) through VirtualGL software. VirtualGL is used to render on a remote machine and bring the frames back to the local, in this case remote and local are the same machine with two X servers. The first server is the one using the integrated graphics card (Intel) and the second is using the (Nvidia) dedicated graphic card and you can call the second server by using a command (optirun <application>).
My workaround this is to copy the nvidiaGL's to another directory so it wont interfere with the libgl used by the Intel card. To the second X server I force it to use the nvidia module and it's libraries with something like this:

XDAEMON=/usr/bin/X
XDAEMON_ARGS="-ac -config /etc/X11/xorg.conf.nvidia -sharevts -modulepath /usr/lib/nvidia-bumblebee/xorg,/usr/lib/xorg/modules -nolisten tcp -noreset :1 vt9"
LD_LIBRARY_PATH=/usr/lib/nvidia-bumblebee $XDAEMON $XDAEMON_ARGS

Where /usr/lib/nvidia-bumblebee is where I installed the nvidiaGL's. In the past iv'e done that just downloading the official Nvidia driver and extracting it, now I've splitted the package and used a repack of the package extra/nvidia-utils so it will be a little less painful in download. Here is the package in the AUR
I'm having some trouble to use 32-bit applications on 64-bit systems but I'll work out a solution.

In the near future I'm planning to tweak things so bumblebee could be able to use nouveau and probably could help to be a complete Free solution to Optimus.

Hope you can help me to bring some light to this. I'm not trying to flame anything, just present a real problem that I though it will be in the near future... well the near future is now the present...

PS: I've heard that ATI launched a new Hybrid-Graphics solution called BACON that works pretty much the same as Otimus (Two cards, no mux) so the trend is to this kind of things in every laptop.

Offline

#12 2011-06-21 16:30:08

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,079

Re: Hybrid-graphics will need to resolve a conflict with libgl

samsagax,

in addition to this thread  - to discuss solutions-- I would also advise that you create a wiki page and put your solution there. That way its easily available to others and if others have a better solution and/or improvements, they can edit the page themselves.

I am sure many would look for this since machines with dual graphics cards are becoming quite common.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#13 2011-06-21 16:53:07

Gusar
Member
Registered: 2009-08-25
Posts: 3,472

Re: Hybrid-graphics will need to resolve a conflict with libgl

samsagax wrote:

PS: I've heard that ATI launched a new Hybrid-Graphics solution called BACON that works pretty much the same as Otimus (Two cards, no mux) so the trend is to this kind of things in every laptop.

Oh wow, that'll be fun. And by that I mean it'll be fun to see the bashing nvidia is receiving now also get extended to AMD. Unless AMD will come up with a Linux solution. In which case big ouch for nvidia. But still fun, in a different way smile

Here's what a quick google found on Bacon: http://www.notebookcheck.net/AMD-PowerX … 204.0.html

Offline

#14 2011-06-22 23:01:27

samsagax
Member
Registered: 2011-03-18
Posts: 33

Re: Hybrid-graphics will need to resolve a conflict with libgl

Inxsible wrote:

samsagax,

in addition to this thread  - to discuss solutions-- I would also advise that you create a wiki page and put your solution there. That way its easily available to others and if others have a better solution and/or improvements, they can edit the page themselves.

I am sure many would look for this since machines with dual graphics cards are becoming quite common.

I've opened a Wiki page on Hybrid Graphics but is really incomplete.
I ave no idea on ATI technologies since I have an Optimus laptop. To understand why this is a real issue I think the key word is to understand that BOTH cards need to have 3d capabilities enabled to function.
To understand the particular Bumblebee solution here is the ArchWiki article on it.

I didn't open a bug yet because I need some guidance on how to get this issue well documented. Any help on the topic or the wiki is more than welcome.

Offline

#15 2011-06-23 07:59:49

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 340

Re: Hybrid-graphics will need to resolve a conflict with libgl

I remember where I saw bumblebee now http://www.phoronix.com/scan.php?page=n … &px=OTQxNg .
Alas the forum thread is dead now. Anyway keep up the good work, I'm sure many will have similar problems in the foreseeable future.


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

Board footer

Powered by FluxBB