FS#43119 - [nvidia] Installing/upgrading driver without installing nvidia-libgl (for a headless CUDA only GPU)

Attached to Project: Arch Linux
Opened by Ruben Van Boxem (rubenvb) - Monday, 15 December 2014, 09:45 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Sunday, 01 March 2015, 16:00 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I'm running a system with an integrated Intel GPU running on Mesa for display. I have an NVIDIA GPU installed for CUDA calculations, and installed the drivers/libgl like so:

# pacman -S nvidia nvidia-utils opencl-nvidia cuda
# pacman -Rdd nvidia-libgl
# pacman -S mesa-libgl

as described in my post in the forums:
https://bbs.archlinux.org/viewtopic.php?pid=1470923#p1470923

The problem is that the nvidia package pulls in nvidia-libgl, although there is no hard dependency of the former on the latter. nvidia-libgl is only needed for, well, OpenGL and X, but for OpenCL/CUDA, this is not required (as evidenced by my setup)

I would suggest removing the nvidia-libgl dependency from the nvidia package, which would mean I can just upgrade my system using "pacman -Syu" instead of doing the above steps manually each time. The wiki page will need an update for people wanting a normal setup (tell them to install nvidia*-libgl as well). That should be the only impact of this change.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Sunday, 01 March 2015, 16:00 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 16 December 2014, 07:12 GMT
Felix what do you think of this?
Comment by Felix Yan (felixonmars) - Tuesday, 16 December 2014, 07:41 GMT
If we just drop the dependency, a user must choose correct package to provide libgl when installing nvidia driver. We might have to deal with more bug reports about this :(

To eliminate any dependency issues, maybe we can use the ca-certificates way. For example:

1. Make "nvidia" an empty package, which depends on "nvidia-libgl" and "nvidia-module" (maybe a better name?)
2. Make "nvidia-module" to provide "nvidia", and contain the module/modprobe file.

This way typical usage will not be broken (as installing nvidia will still pull in both the module and libgl), while anyone who wants only the module could uninstall nvidia-libgl and the virtual "nvidia" package without triggering dependency problems.

This can be even simplified to a group if there's no need to depend on "nvidia", in which case we only need to choose a sane name for the packages, and make "nvidia-module" conflicts/provides/replaces "nvidia" to upgrade existing installations.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 28 February 2015, 15:30 GMT
An implementation of Felix's suggestion is in testing. Have a look and report results.

Loading...