gpu-manager systemd unit is not enabled

Bug #1443364 reported by Alberto Milone
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
Fix Released
Critical
Martin Pitt

Bug Description

This happened with today's 15.04 image. The gpu-manager unit started, the xorg.conf was written, and so was the log but, somehow, even though the log says that the system needs offloading, no /var/lib/ubuntu-drivers-common/requires_offloading was created. This caused the system to boot into a black screen.

Starting the same unit after (the failure to) boot, resulted in the correct creation of /var/lib/ubuntu-drivers-common/requires_offloading . There is probably something weird going on in the systemd unit, as gpu-manager has never behaved like this with Upstart.

This breaks hybrid graphics.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: ubuntu-drivers-common 1:0.4.4
ProcVersionSignature: Ubuntu 3.19.0-13.13-generic 3.19.3
Uname: Linux 3.19.0-13-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.17-0ubuntu2
Architecture: amd64
CurrentDesktop: KDE
Date: Mon Apr 13 12:38:53 2015
InstallationDate: Installed on 2015-04-13 (0 days ago)
InstallationMedia: Kubuntu 15.04 "Vivid Vervet" - Beta amd64 (20150413)
SourcePackage: ubuntu-drivers-common
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Alberto Milone (albertomilone) wrote :
Changed in ubuntu-drivers-common (Ubuntu):
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Alberto Milone (albertomilone) wrote :

sudo systemctl status gpu-manager.service
● gpu-manager.service - Detect the available GPUs and deal with any system changes
   Loaded: loaded (/lib/systemd/system/gpu-manager.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

Revision history for this message
Martin Pitt (pitti) wrote :

The unit did not run at all during boot on your system, it appears the unit isn't enabled. Do you actually have a /etc/systemd/system/display-manager.service.wants/gpu-manager.service symlink?

It is enabled on my laptop, and ran fine (it didn't do anything of course as I have a single intel card).

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, indeed /var/lib/dpkg/info/ubuntu-drivers-common.postinst has no unit enablement code at all. I suspect the conditional code in debian/rules which is supposed to call this stopped working:

        # on architectures where we build gpu-manager, install the systemd unit
        if [ -d debian/tmp/lib/systemd ]; then \
                dh_systemd_enable; \
                dh_install -p ubuntu-drivers-common lib/systemd; \
        fi

indeed the build log shows:

Can't stat debian/nvidia-common: No such file or directory
 at /usr/bin/dh_systemd_enable line 180.
Can't stat debian/fglrx-pxpress: No such file or directory
 at /usr/bin/dh_systemd_enable line 180.

Changed in ubuntu-drivers-common (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Triaged → In Progress
tags: added: systemd-boot
Changed in ubuntu-drivers-common (Ubuntu):
milestone: none → ubuntu-15.04
summary: - gpu-manager systemd unit doesn't always work as expected
+ gpu-manager systemd unit is not enabled
Martin Pitt (pitti)
Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Won't Fix
status: Won't Fix → Fix Committed
Revision history for this message
Alberto Milone (albertomilone) wrote :

ok, it makes sense now.

I've just rebuilt u-d-c using your latest commits, and it works well now:

:~$ sudo systemctl status gpu-manager.service
● gpu-manager.service - Detect the available GPUs and deal with any system changes
   Loaded: loaded (/lib/systemd/system/gpu-manager.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since lun 2015-04-13 16:03:00 CEST; 1min 25s ago
  Process: 697 ExecStart=/usr/bin/gpu-manager --log /var/log/gpu-manager.log (code=exited, status=0/SUCCESS)
 Main PID: 697 (code=exited, status=0/SUCCESS)

Please make sure that the fix makes it into the 15.04 release. Thanks a lot for your help!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.4.5

---------------
ubuntu-drivers-common (1:0.4.5) vivid; urgency=medium

  * Call dh_systemd_enable after installing gpu-manager.service, so that the
    unit actually gets enabled. Also quiesce the confusing error messages
    about nonexisting binary package directories. (LP: #1443364)
 -- Martin Pitt <email address hidden> Mon, 13 Apr 2015 07:01:15 -0500

Changed in ubuntu-drivers-common (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
TigerShark (tieskey-k) wrote :

I'm experiencing this bug after upgrading from kubuntu 14.10 to 15.04 using the update manager.

Using nvidia-346:

Booting with a previous kernel (3.16) works but I'm stuck in intel mode.

Booting with current kernel (3.19) leaves me with the black screen which can be fixed (until restart) by running the suggested:
sudo systemctl stop sddm

sudo systemctl start gpu-manager

sudo systemctl start sddm

Idk if its relevant but

gpu-manager.conf :
start on (starting lightdm
          or starting gdm
          or starting kdm
          or starting xdm
          or starting lxdm)
task
exec gpu-manager --log /var/log/gpu-manager.log

Tried the obvious and added a line "or starting sddm" but didn't work :P

Revision history for this message
TigerShark (tieskey-k) wrote :
Revision history for this message
TigerShark (tieskey-k) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

TigerShark, can you please give me the output of

  sudo systemctl status -l gpu-manager.service

directly after a clean boot? Note that /etc/init/gpu-manager.conf is not being used in systemd.

Revision history for this message
vgeloven (vgeloven) wrote :

# systemctl status -l gpu-manager.service
● gpu-manager.service - Detect the available GPUs and deal with any system changes
   Loaded: loaded (/lib/systemd/system/gpu-manager.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Thu 2016-09-15 16:34:57 CEST; 3min 4s ago
  Process: 1950 ExecStart=/usr/bin/gpu-manager --log /var/log/gpu-manager.log (code=exited, status=0/SUCCESS)
 Main PID: 1950 (code=exited, status=0/SUCCESS)

Sep 15 16:34:57 *** gpu-manager[1950]: /etc/modprobe.d is not a file
Sep 15 16:34:57 *** gpu-manager[1950]: /etc/modprobe.d is not a file
Sep 15 16:34:57 *** gpu-manager[1950]: Error: can't open /lib/modules/4.4.0-38-generic/updates/dkms
Sep 15 16:34:57 *** gpu-manager[1950]: Error: can't open /lib/modules/4.4.0-38-generic/updates/dkms
Sep 15 16:34:57 *** gpu-manager[1950]: update-alternatives: error: no alternatives for x86_64-linux-gnu_gfxcore_conf
Sep 15 16:34:57 *** systemd[1]: Started Detect the available GPUs and deal with any system changes.
Sep 15 16:34:57 *** systemd[1]: gpu-manager.service: Start request repeated too quickly.
Sep 15 16:34:57 *** systemd[1]: Failed to start Detect the available GPUs and deal with any system changes.
Sep 15 16:35:02 *** systemd[1]: gpu-manager.service: Start request repeated too quickly.
Sep 15 16:35:02 *** systemd[1]: Failed to start Detect the available GPUs and deal with any system changes.

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.