Bumblebee should recommend libgl1-mesa-glx:i386

Bug #1383909 reported by Bruno Nova
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bumblebee (Ubuntu)
Invalid
Undecided
Unassigned
primus (Ubuntu)
Fix Released
Undecided
Vincent Cheng

Bug Description

When bumblebee-nvidia is installed, its postinst script configures the system to use the Mesa GL libraries instead of the NVIDIA ones.
The script does so for both amd64 and i386 libraries... or tries to.

However, since libgl1-mesa-glx:i386 is not installed by default, nor is a dependency of bumblebee, the script does NOT configure the i386 libraries if the user hasn't installed that package already.
If the user installs bumblebee, then a 32-bit program (like Skype or Steam), he/she won't be able to run it!

Therefore, bumblebee-nvidia:amd64 should recommend libgl1-mesa-glx:i386 (directly or indirectly).

The version in the Bumblebee PPA (ppa:bumblebee/stable) doesn't have this problem, because it installs virtualgl which then installs libgl1-mesa-glx:i386.

Related branches

Revision history for this message
Vincent Cheng (vincent-c) wrote :

Argh. AFAIK, there is no way for a package to specify a depends/recommends relationship on another package of a different arch, at least not in a Policy-compliant way. Also, the real problem here is that Ubuntu's mesa/GL packages don't have sane (non-arch-specific) alternatives handling, unlike Debian.

Revision history for this message
Bruno Nova (brunonova) wrote :

I thought it was possible to depend on a package with a different arch (I have never done that).

When I install bumblebee from the stable PPA, libgl1-mesa-glx:i386 ends up being installed (because of virtualgl, I think).
And another unrelated example: wine1.6 depends on wine1.6-i386, which is an an i386 package.
If they are Policy-compliant however, I don't know.

I suggested to add this "recommends" so that bumblebee users don't face issues when trying to run Skype, for example.
If libgl1-mesa-glx:i386 is installed before bumblebee, there should be no issues.
If the "depends/recommends" is added, maybe it could be in primus-libs-ia32 (an i386 package)?
Or maybe the wiki could be updated to recommend users to install libgl1-mesa-glx:i386 before installing bumblebee?

Revision history for this message
Vincent Cheng (vincent-c) wrote :

Subscribed @lekensteyn and @b-pagani; not sure if either of you might have something to add? I suppose my preference at this point is to add libgl1-mesa-glx:i386 as a recommends for primus-libs-ia32 (so primus would pull in the mesa GL libraries as needed, just like virtualgl is apparently doing right now).

Revision history for this message
Bruno Nova (brunonova) wrote :

I inspected the dependencies of the virtualgl* packages in the PPA.

bumblebee recommends virtualgl | primus,
virtualgl recommends virtualgl-libs-ia32 (i386) (also depends on virtualgl-libs),
virtualgl-libs-ia32 (i386) depends on virtualgl-libs (i386 too, I think),
virtualgl-libs depends on libgl1-mesa-glx | libgl1,
virtualgl also depends on libgl1-mesa-glx | libgl1 and several other dependencies of virtualgl (redundant dependencies maybe?).

I suppose this is why installing bumblebee-nvidia from the PPA ends up also installing libgl1-mesa-glx:i386.
So, I think another possibility is to add a dependency on libgl1-mesa-glx in primus-libs (and in the PPA too).

Revision history for this message
Vincent Cheng (vincent-c) wrote :

Ack, having primus-libs depend/recommend on libgl1-mesa-glx would cover both amd64 and i386 (end result would be libgl1-mesa-glx of both archs getting pulled in by apt-get when installing primus). Sounds fine by me.

Revision history for this message
Peter Wu (lekensteyn) wrote :

I am with Vincent-C here, primus (primus-libs) is a better package to attach the dependency on.

Changed in primus (Ubuntu):
status: New → Confirmed
Revision history for this message
Vincent Cheng (vincent-c) wrote :
Changed in primus (Ubuntu):
assignee: nobody → Vincent Cheng (vincent-c)
status: Confirmed → Fix Committed
Revision history for this message
Bruno Nova (brunonova) wrote :

Thank you for the fix! (I'm using the version from the official repositories, though)

Could this change be added to the Debian and Ubuntu official repositories as well? (I suppose this issue also affects Debian, but I haven't tested)
Also, if that is done, do you think this could then be backported to the Debian/Ubuntu stable releases (SRU), or would it be better not to do it?

Revision history for this message
Vincent Cheng (vincent-c) wrote :

As I mentioned earlier, no, this does not affect Debian (which has different libGL symlink handling via alternatives).

I've added the change to Debian's primus git packaging repo (http://anonscm.debian.org/cgit/pkg-nvidia/primus.git/commit/?id=9e45b288d7cbf459cc93c9ffa424789bc51c2520), although I haven't uploaded it yet. I'd like to see this tested via the PPA first, but afaik the PPA packages are waiting for a bumblebee 4.0 release first, so I haven't looked at this since then.

Revision history for this message
Bruno Nova (brunonova) wrote :

Ok, testing first via PPA is a good idea.

Revision history for this message
Bruno Pagani (b-pagani) wrote :

Affect primus in fact.

affects: bumblebee (Ubuntu) → ubuntu
Changed in ubuntu:
status: New → Invalid
affects: ubuntu → bumblebee (Ubuntu)
Revision history for this message
Bruno Nova (brunonova) wrote :

Has there been any progress on this?
There haven't been any new bumblebee releases in the PPA for quite some time now (and no 4.0 release).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package primus - 0~20150328-1

---------------
primus (0~20150328-1) unstable; urgency=medium

  * New upstream git snapshot.
    - rebase on d1afbf6fce
    - refresh hardening.patch
  * Build with PRIMUS_UPLOAD=0 now that xserver-xorg-video-intel in sid has
    SNA enabled by default.
  * Add dependency on libgl1-mesa-glx to primus-libs. (LP: #1383909)
  * Move bumblebee bash-completion file from obsolete /etc/bash_completion.d/
    to /usr/share/bash-completion/completions/.

 -- Vincent Cheng <email address hidden> Sat, 25 Jul 2015 20:42:42 -0700

Changed in primus (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Bruno Nova (brunonova) wrote :

Thank you!

Could you backport this fix to the stable releases (SRU)?

Revision history for this message
Vincent Cheng (vincent-c) wrote :

I don't think this qualifies as a SRU, but you're free to request one yourself if you'd like to.

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

Other bug subscribers

Remote bug watches

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