Crash in systemd service "nvidia-persistenced" because of deletion of "nvidia-persistenced" user profile on old package "nvidia-compute-utils" purge

Bug #2054784 reported by fprietog
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-545 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Problem summary:
----------------
Every time I upgraded nvidia drivers from version XXX to YYY there is a crash in systemd service "nvidia-persistenced" because of deletion of "nvidia-persistenced" user profile after old package "nvidia-compute-utils-XXX" is purged.

Example of the problem:
-----------------------
- Current driver installed: "nvidia-driver-535"
- Upgrade to "nvidia-driver-545"
- The upgrade will remove previous "nvidia-driver-535" related packages but some of them are not purged. One of these non purged packages is "nvidia-compute-utils-535".
- After "nvidia-driver-545" was installed there is a warning on every apt upgrade because it detects packages uninstalled with remaining configuration files, "nvidia-compute-utils-535" package among them, and if you purge that package (something you should do sooner or later) the user profile "nvidia-persistenced" is deleted and systemd service "nvidia-persistenced" will crash in next boot until that profile is created again.

The problem is caused because of this automation in "nvidia-compute-utils" .deb package:
- On install, "postinst" script creates the user and group for "nvidia-persistenced".
- On remove or purge, "postrm" script deletes the "nvidia-persistenced" user.

So, when upgraded driver from 535 to 545:
- Package "nvidia-compute-utils-535" is removed but not purged. (user "nvidia-persistenced" is deleted, OK)
- Package "nvidia-compute-utils-545" is installed. (user "nvidia-persistenced" is created, OK)
- When old "nvidia-compute-utils-535" package is purged it deletes "nvidia-persistenced" user profile despite the fact that a newer version of the package is installed and that user is needed.

Possible solution:
------------------
Remove deletion of that user profile in "nvidia-compute-utils" package "postrm" file when "purge" is executed, leaving it only for "remove" in this sentence:
...
case "$1" in
    remove|purge)
        # Remove the nvidia-persistenced user
...

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.