Bug#915381: Shouldn't nvidia-persistenced be daemonized (using Debian standard way to do so) ?

Cédric Dufour - Idiap Research Institute cedric.dufour at idiap.ch
Mon Dec 3 13:38:00 GMT 2018


On 03/12/2018 11:58, Andreas Beckmann wrote:
> Patches welcome! (Or a pull request against the repo on salsa.)

Well, maybe even simpler than a patch:

sed 's/__USER__/nvpd/g' \
  init/systemd/nvidia-persistenced.service.template \
> debian/nvidia-persistenced.service

sed 's/__USER__/nvpd/g' \
  init/sysv/nvidia-persistenced.template \
> debian/nvidia-persistenced.init

cat << EOF > debian/nvidia-persistenced.postinst
#!/bin/sh
set -e

case "$1" in
  'configure')
     if ! getent passwd nvpd >/dev/null; then
       # Create ad-hoc system user/group
       adduser --system --group \
               --home /var/run/nvpd/ \
               --gecos 'nVidia Persistence daemon' \
               --no-create-home \
               nvpd
     fi
     ;;
esac

#DEBHELPER#
EOF


PS: you picked my curiosity; I'll have a look at what "salsa" might be ;-)


> We will probably not "fix" this for stretch (but stretch-backports),
> unless someone gets this approved by the release team (but let's have
> this in sid first.)

Totally understand.
It'd be nice to have it in Buster though.


> And it should work with both systemd and legacy sysv.

Applied to latest (Unstable) 390.25 source package, this passes compilation
using pbuilder and produces a package with the ad-hoc /etc/init.d script
and /lib/systemd/system service file (debhelper >= 10 takes care of the
SysV/SystemD configuration; no need for dh-systemd build dependency).

And it installs and works OK on Stretch (SystemD).

I can't tell about SysV, though the nVidia init script looks simple
enough. Maybe an additional debian/nvidia-persistenced.default with a
"START={yes,no}" stanza might be needed (vs Debian Policy ?)


> Andreas

Thanks for your addressing this issue on such short notice.

Cédric

PS: In my effort to backport the latest upstream (410.78) drivers to Stretch
(we need CUDA 10 and serie 20** support), I personally used the (pre-compiled)
nvidia-persistenced available in the nVidia "*.run" package and included it
in my custom nvidia-graphics-driver source package



More information about the pkg-nvidia-devel mailing list