[systemd] nvidia-prime package needs systemd unit or init.d script

Bug #1312255 reported by N1ck 7h0m4d4k15 on 2014-04-24
This bug affects 17 people
Affects Status Importance Assigned to Milestone
nvidia-prime (Ubuntu)
Alberto Milone

Bug Description

With systemd as pid 1

nvidia-prime package is pulled as a dependency of nvidia-331-updates package.
When I tried to install the nvidia-331-updates package it gave me an error of installation on nvidia-prime due to

"initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused"

The full terminal stdout is

Setting up nvidia-prime (0.6.2) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: unknown initscript, /etc/init.d/nvidia-prime not found.
dpkg: error processing package nvidia-prime (--configure):
subprocess installed post-installation script returned error exit status 100

and at the end

Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

This problem didn't prevent the nvidia-331-updates package from being installed. Nvidia driver installed properly and have worked as it should after a reboot, but the nvidia-prime "didn't make it".

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: nvidia-prime 0.6.2
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Apr 24 18:37:04 2014
InstallationDate: Installed on 2014-03-24 (31 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140323)
SourcePackage: nvidia-prime
UpgradeStatus: No upgrade log present (probably fresh install)

N1ck 7h0m4d4k15 (nicktux) wrote :
description: updated
description: updated
summary: - [systemd] nvidia-prime package failed to install due to missing upstart
- service
+ [systemd] nvidia-prime package installation failed due to missing
+ upstart service

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-prime (Ubuntu):
status: New → Confirmed
Martin Pitt (pitti) on 2014-06-02
summary: - [systemd] nvidia-prime package installation failed due to missing
- upstart service
+ [systemd] nvidia-prime package needs systemd unit or init.d script
Changed in nvidia-prime (Ubuntu):
status: Confirmed → Triaged

Just for my interest, would fixing this bug allow to use nvidia-prime in upstream Debian?

Best regards

Alberto Milone (albertomilone) wrote :

@Jörn: no, as nvidia-prime is not the only package that handles hybrid graphics.

Changed in nvidia-prime (Ubuntu):
importance: Undecided → High
Bryan Quigley (bryanquigley) wrote :

A quick first attempt /lib/systemd/system/nvidia-prime.service
Description=NVIDIA PRIME Power Saving Mode

ExecStopPost=/sbin/rmmod bbswitch


It doesn't have any of the conditionals of the original upstart.. and I don't have a prime setup so I have no idea if it actually would work. (I just got tired of dpkg throwing errors about it everytime)

Martin Pitt (pitti) wrote :

Alberto, assigning to you as you assigned the duplicate bug to you and expressed interest in this.

Bryan's initial attempt needs at least


which is a direct translation of "start on starting lightdm".

I don't understand the $prime_supported` stuff, as this *only* starts start-nvidia-persistenced if $supported is empty and says "Sorry but your hardware configuration is not supported". To me this looks like an error in the upstart script, but I could just misunderstand what it does.

Changed in nvidia-prime (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Martin Pitt (pitti) wrote :

Actually, you probably want "display-manager.service" instead of "lightdm.service" so that this also works with gdm and friends.

Changed in nvidia-prime (Ubuntu):
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-prime - 0.7

nvidia-prime (0.7) vivid; urgency=medium

  * debian/control, debian/dirs.in, debian/install.in,
    debian/nvidia-prime.service, debian/rules:
    - Add support for systemd (LP: #1312255).
 -- Alberto Milone <email address hidden> Fri, 16 Jan 2015 19:32:00 +0100

Changed in nvidia-prime (Ubuntu):
status: In Progress → Fix Released
rbmj (rbmj) wrote :

In the source package that I have, debian/control hasn't been updated to mark systemd as an alternative to upstart.

Also, for the display manager dependency, one should (?) add '| sddm', as it will eventually replace kdm.

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

Duplicates of this bug

Other bug subscribers