New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IN DISCUSSION] Provide packages for different NVidia driver types - mediated #3673
[IN DISCUSSION] Provide packages for different NVidia driver types - mediated #3673
Conversation
…t dir, and a "nvidia" metapackage to require either of these variants
…with nvidia-384 to simplify diffs
Some minor fixes to your NVIDIA driver package PR
…RIVER_MINOR_VERSION and NVIDIA_MEDIATOR
e52efac
to
d0da4b8
Compare
…d files and dirs into Makefile, break up the big install ruleset into better visible steps, and symlink back to original names to facilitate manifest generation
…ple-manifest.p5m.nvidia generated with the new recipe
…RIVER_MINOR_VERSION and NVIDIA_MEDIATOR
d0da4b8
to
7110033
Compare
…d files and dirs into Makefile, break up the big install ruleset into better visible steps, and symlink back to original names to facilitate manifest generation
…ple-manifest.p5m.nvidia generated with the new recipe
…RIVER_MINOR_VERSION and NVIDIA_MEDIATOR
…d files and dirs into Makefile, break up the big install ruleset into better visible steps, and symlink back to original names to facilitate manifest generation
…ple-manifest.p5m.nvidia generated with the new recipe
…ue support (for modules not delivered with every nvidia-NNN package variant)
Main driver versions to use as of today:
This covers the main Nvidia graphics product releases from Y2004->Y2019. The Nvidia PCI ID scanning starts from the most current video driver and fallbacks to the older driver until found or will fallback to the VESA driver if not found at all within the provided drivers. |
# http://www.illumos.org/license/CDDL. | ||
# | ||
# Copyright 2017, Jim Klimov | ||
# Portions Copyright 2003-2005 Sun Microsystems, Inc. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about 'Portions Copyright' string. Do we have precedents?
I'd just put Sun copyright on top, if this file has Sun heritage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotta remember now, not sure I can after so long :)
I'd guess this started by looking at ogl-select
and at least modelling after the idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at current ogl-select
, they are very dissimilar. So I must have started from something else back then :)
As for precedents, we have a few:
jim@jimoi:~/shared/oi-userland-tmp/components$ git grep -i 'portions copyright' | grep -v yyyy | wc -l
32
jim@jimoi:~/shared/oi-userland-tmp/components$ git grep -i 'portions copyright' | wc -l
1132
@kenmays : addition of nvidia-440 in progress locally, lots of different file lists to adapt the recipes iteratively :) |
@kenmays : added nvidia-440 to the wad. Not sure if I have anything to do in practice about your comment on PCI IDs : as far as I can see, the original driver packages assume only one copy/version present and active in the system, so either there are PCI IDs listed that this one supports, or not. This PR (and |
@jimklimov - I concur with the default footprint for Live DVD Env as a test method as I still have GeForce Go 7600/Quadro FX 5500 for legacy driver testing. If things go right, I can install a Live DVD and it'll pick the right driver for these old graphics cards without any user/human interaction (but we can bulletproof this through a future startup screen selection/installation script - if needed). If everything goes right, anything from Quadro RTX 8000 -> GeForce 6000-series is properly detected and driver selected.
I think the FreeBSD people are listening as they just updated their Nvidia driver revisions as well today: The more, the merrier! ;> |
@kenmays : Any chance you could test this PR on hardware and/or propose the improvement implementations? :) I might lack time (f)or imagination at the moment, but do not very well see how this current solution can help auto-detect the actual driver version to use... unless I made it two years ago already and forgot, Gallagher-style? :-) I mean, what (IIRC) the Thinking about it, if I get correctly what you could mean above, the script could probably look into the PCI ID mappings available in each installed |
I've got a GTX 1650, so i practically live on bleeding-edge (and suffer bugs) |
Did anyone have a chance to test this on real HW that is supported by the drivers, so merging the PR can proceed? I see that a new PR to piecemeal bump the one driver provided by the distro was posted recently by @mnowak , and fear that in a few days i'd have to solve new merge conflicts in this PR... and later again, and again, seems in vain ;) |
@jimklimov - Yes, tested the Nvidia 440.44 driver w/RTX 2080 & GT 630 cards. Hope we can move forward. |
You mentioned the wrong guy pal :) |
install_mv_desktop_32: install_reloc_32 | ||
mv -f "$(PROTO_DIR)/usr/share/applications/nvidia-settings.desktop" \ | ||
"$(PROTO_DIR)/usr/share/applications/nvidia-settings-$(NVIDIA_DRIVER_MAJOR_VERSION).desktop" \ | ||
&& ln -s "nvidia-settings-$(NVIDIA_DRIVER_MAJOR_VERSION).desktop" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this will not work as expected, we'll have several desktop files instead of one. Perhaps, simplify this by moving them and share/doc, share/icons to usr/share/NVIDIA-$(NVIDIA_DRIVER_MAJOR_VERSION)/some-subdirectory ?
;; | ||
esac | ||
done | ||
shift "`/usr/bin/expr $OPTIND - 1`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/bin/sh can handle `$(($OPTIND - 1))
cmd="$cmd $drvname" | ||
drvname="`echo $drvname | /usr/bin/sed 's;.*/;;g'`" | ||
|
||
/usr/bin/grep "^$drvname[ ]" $BASEDIR/etc/name_to_major > /dev/null 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need in full path, as we set PATH in the begining
then | ||
for i in $alias | ||
do | ||
/usr/bin/egrep "^$drvname[ ]+$i" $BASEDIR/etc/driver_aliases>/dev/null 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
egrep -q ... 2>&1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or perhaps even avoid masking egrep errors
} | ||
|
||
reload_drv() { | ||
unload_drv "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we really unload nvidia driver?
NVIDIA_VERSION_SMF="`svcprop -p options/NVIDIA_VERSION $SMF_FMRI`" \ | ||
&& [ -n "$NVIDIA_VERSION_SMF" ] && NVIDIA_VERSION="$NVIDIA_VERSION_SMF" | ||
|
||
if [ "$SMF_ACTION" = start ] \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we set options/NVIDIA_VERSION and reboot?
Will we skip driver update?
|
||
if [ -z "${EXISTING_MEDIATOR_DATA-}" ] ; then | ||
echo "INFO: setting mediator $MEDIATOR_NAME to $MEDIATOR_IMPL / $NVIDIA_VERSION under $BASEDIR ..." >&2 | ||
$ALTROOT_FLAG /usr/bin/pkg set-mediator \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use -R option instead of chroot for pkg?
Generally, this PR has one issue - overcomplicated installation logic for nvidia.
Now we have several steps, including moving files to separate dirs, moving individual files and so on. This makes updates to new major version not so straightforward. Can we somehow simplify these steps? Like move everything to /usr/share/nvidia-XXX and create necessary symlinks in several loops? |
I am running NVIDIA driver 440.31,REV=2019.10.27.02.19 (from nvidia site) on GK208B [GeForce GT 730] card, with no problem |
Bump driver/graphics/nvidia to 440.44 in OI-IPS. Make it the new default. |
I really don't have the skills to review nor understand, the less to maintain this change. I think we should bite the bullet and plainly and transparently update to a sensible new default, be it version 390 (#5337), which I researched to be OK for almost everyone, or 440, the default in recent Linux distros. |
Alternative/follow-up to #3458 with proposed mediation of FS objects delivered by each driver in such a way that they can be installed all at once (or in any combination), and then the user can pick one to be enabled via IPS mediation.
NOTE: Still not quite sure how to properly address the driver_aliases in a way that drivers won't conflict over common cards, and won't claim ones they do not know either. And also having the active driver named
nvidia
is probably still a goal.Hopefully would supersede the PR #5337 as well ;)
To build this in a local testing environment, you'd probably need to set up a local publisher,
make publish
thenvidia-select
into it, and then piggy-back on encumbered builds support to keep thepkglint
satisfied while publishing the actual driver packages and thenvidia
metapackage (new package, old name). So something like:and then you should be able to install them into a local test BE which would use this publisher (possibly using the full FMRIs to publisher+package names).