Install nvidia-331 on X/K/Lubuntu results in unbootable machine

Bug #1267442 reported by Elfy
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
nvidia-prime (Ubuntu)
Invalid
High
Alberto Milone

Bug Description

Install of nvidia-331 completes, assuming it edits lightdm.conf

left with this - not any use if you're not using Ubuntu

greeter-session=unity-greeter
user-session=ubuntu
display-setup-script=/sbin/prime-offload
display-stopped-script=/sbin/prime-switch

have to comment out the exisiting greeter and user session lines and replace with

display-setup-script=/sbin/prime-offload
display-stopped-script=/sbin/prime-switch
user-session=xubuntu
greeter-session=lightdm-gtk-greeter

to get a satisfactory boot

Related branches

Elfy (elfy)
tags: added: trusty xubuntu
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers-331 (Ubuntu):
status: New → Confirmed
Revision history for this message
Marcin Sągol (soee) wrote :

I can confirm this issue on Kubuntu 14.04 after installing nvidia-331.

tags: added: kubuntu
Revision history for this message
Sundberg Pauli (susundberg) wrote :

Affects me too, probably due package: nvidia-prime_0.5.3_amd64.deb.

I tried to reproduce the problem but running --reinstall on the package does not modify lightdm.conf.

Assuming there is no lightdm.conf in the fresh install, then the package creates a file that is reported by @Efry.

Revision history for this message
Philip Muškovac (yofel) wrote :

looks like something caused by the preinst script in nvidia-prime

affects: nvidia-graphics-drivers-331 (Ubuntu) → nvidia-prime (Ubuntu)
Revision history for this message
Alberto Milone (albertomilone) wrote :

what version of Xubuntu are you using?

Revision history for this message
Elfy (elfy) wrote :

I'm using 14.04 - but I think that the rest are kubuntu dev

Revision history for this message
Sundberg Pauli (susundberg) wrote :

kubuntu daily image from 14.04 downloaded at about 20.01.2014 -> installed and updated -> install packages -> install nvidia-331 -> nvidia-prime (v 0.5.3 ) came with recommendations:

nvidia-331:
> Recommends: nvidia-settings (>= 331.20), nvidia-prime (>= 0.5) | bumblebee, libcuda1-331, nvidia-libopencl1-331, nvidia-opencl-icd-331

And yes, the 'preinst' script looks kind of guilty:

>>> paste from preinst >>>>

        # Let's create a configuration file
        # from scratch
        cat > $lightdm_orig_conf <<EOF
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
display-setup-script=/sbin/prime-offload
display-stopped-script=/sbin/prime-switch
EOF
    fi
<<< paste end <<<<<

Revision history for this message
Alberto Milone (albertomilone) wrote :

The preinstallation script checks the default login manager by looking at /etc/X11/default-display-manager. If lightdm is the default login manager, then nvidia-prime creates (if no lightdm.conf exists) or edits the configuration file.

In your case it should have just edited the file by adding or replacing the display-setup-script and the display-stopped-script sections. Maybe you didn't have a lightdm.conf before installing nvidia-prime?

Changed in nvidia-prime (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
Revision history for this message
Elfy (elfy) wrote :

I would have had whatever I'd been left with after installing xubuntu and using the default nouveau. I'd assume that includes a lightdm.conf file.

After installing nvidia I then had to edit lightdm.conf to not assume I was using Ubuntu.

Revision history for this message
Elfy (elfy) wrote :

seems not if a vm is anything to go by.

Even so - assuming that

greeter-session=unity-greeter
user-session=ubuntu

isn't going to work here :)

Revision history for this message
Alberto Milone (albertomilone) wrote :

Ok, then I guess I'll have to find a more reliable way to tell what system I'm dealing with. I'll use both Kubuntu and Xubunutu vms so that I can see exactly how I can better detect the system in use.

Revision history for this message
Elfy (elfy) wrote :

ok - thanks Alberto

Happy to help where I can if needed

Revision history for this message
Elfy (elfy) wrote :

@alberto - I installed lubuntu - same issue there.

The unadulterated lightdm.conf from that install is the same.

 [SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
display-setup-script=/sbin/prime-offload
display-stopped-script=/sbin/prime-switch

summary: - Install nvidia-331 on Xubuntu results in unbootable machine
+ Install nvidia-331 on X/K/Lubuntu results in unbootable machine
Changed in nvidia-prime (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
nvidia-prime (0.5.4) trusty; urgency=low

  * Do not touch lightdm.conf any more on anything newer than Precise.
    90-nvidia.conf now contains only the relevant settings for PRIME
    (LP: #1267442).
  * Also remove any previous lightdm.conf that nvidia-prime might
    have messed up.
  * Major packaging clean-up. The variable in debian/rules and in
    templates have clearer names now.
  * Clean up the old 90-nvidia.conf that we used to ship in /etc.
 -- Alberto Milone <email address hidden> Tue, 28 Jan 2014 17:30:43 +0100

Changed in nvidia-prime (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Pasi Lallinaho (knome) wrote :

I just experienced this bug on an upgrade from Xubuntu 13.10 to 14.04 with the proprietary Nvidia drivers.

/etc/lightdm/lightdm.conf had both greeter-session and user-session defined as 'null' (user-session=). Manually setting the right values fixed the issue.

Changed in nvidia-prime (Ubuntu):
status: Fix Released → New
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1267442

tags: added: iso-testing
Revision history for this message
Alberto Milone (albertomilone) wrote :

I thought the new lightdm would get rid of the /etc/lightdm/lightdm.conf

Revision history for this message
Pasi Lallinaho (knome) wrote :

I hit this bug again with a Xubuntu 12.04 to 14.04 upgrade. Seems likely it is actually caused by the lack of xubuntu-default-settings installed than nvidia-* packages.

Will get more people look at it.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Alberto Milone, i'm pretty sure that instead of generating lightdm.conf, additional snippets should be added to /etc/lightdm/lightdm.conf.d/ with just display-setup-script and display-stopped-script stanzas.

Changed in nvidia-prime (Ubuntu):
status: New → Confirmed
Revision history for this message
Alberto Milone (albertomilone) wrote :

@Dimitri: nvidia-prime doesn't do that any more. It only installs 90-nvidia.conf in /usr/share/lightdm/lightdm.conf.d/

Changed in nvidia-prime (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Hannu E K N (hannu-n) wrote :

I cannot say I'm sure if this information helps, but in hope it does:

OS: Pure Ubuntu (*not* X or L...) 13.10 "apt-get upgrade" to 14.04 LTS

CTRL+Alt+F1 -> login -> Bash -> sudo bash ->

# blacklisting of at least "noveau" REQUIRED to be able to get anywhere
# *** more detail not investigated!
# NOTE: I do NOT se the login prompt unless this is in place!
# USE recovery mode boot -> 'root prompt' on fsck'ed filesystems to get it in place.

# cat /etc/modprobe.d/nvidia-graphics-drivers.conf
blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-173
blacklist nvidia-96
blacklist nvidia-current
blacklist nvidia-173-updates
blacklist nvidia-96-updates
alias nvidia nvidia_current_updates
alias nouveau off
alias lbm-nouveau off

-- end of file --
Commands to install the OEM-driver.

---
sudo service lightdm stop
sudo apt-get purge nvidia*
sudo apt-get update && apt-get upgrade

# In this step I got bitten by nvidia-prime getting pulled in by
sudo apt-get install nvidia-331-updates-dev
# From memory: "init" says "nvidia-prime" does not exist, "start" failed - in the last screenful of text

# the following doesn't matter
# as ^- stops with "init" telling it cannot start "nvidia-prime" (out of memory, from tty output)
sudo sh NVIDIA-Linux-*-337.25.run
---

NOTE: If I replace
"sudo apt-get install nvidia-331-updates-dev"
with
"sudo apt-get install nvidia-settings-319 nvidia-settings-319-updates"
the above sequence works.

Summary, getting things to work:

sudo service lightdm stop
sudo apt-get purge nvidia*
sudo apt-get update && apt-get upgrade
sudo apt-get install nvidia-settings-319 nvidia-settings-319-updates
sudo sh NVIDIA-Linux-*-337.25.run

-- on a working installation --
$ dpkg --list | grep nvidia
ii nvidia-settings 331.20-0ubuntu8 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-settings-319 331.20-0ubuntu8 amd64 Transitional package for nvidia-settings
ii nvidia-settings-319-updates 331.20-0ubuntu8 amd64 Transitional package for nvidia-settings
hannu@wkbox ~ bash (P)PID=(3961)3969, s=0
$ apt-get install nvidia-331<TAB>
nvidia-331 nvidia-331-dev nvidia-331-updates nvidia-331-updates-dev nvidia-331-updates-uvm nvidia-331-uvm
hannu@wkbox ~ bash (P)PID=(3961)3969, s=0
$ apt-get install nvidia-pri<TAB>
nvidia-prime
hannu@wkbox ~ bash (P)PID=(3961)3969, s=0

Revision history for this message
Hannu E K N (hannu-n) wrote :

Ouch what a mess, is there a &lt;PRE&gt; - thingy here?

Revision history for this message
Hannu E K N (hannu-n) wrote :

Display at the end of it.

Revision history for this message
Pasi Lallinaho (knome) wrote :

Alberto, what kind of information you would need to get this bug from Incomplete to Confirmed/Triaged?

Revision history for this message
Alberto Milone (albertomilone) wrote :

@Pasi: I'll test it here on a clean system and see if I can reproduce it, so that I can see what's going on

@Hannu: please do not recommend installing the nvidia driver using the nvidia installer, as that will likely make your system unusable.

Revision history for this message
Alberto Milone (albertomilone) wrote : Re: [Bug 1267442] Re: Install nvidia-331 on X/K/Lubuntu results in unbootable machine

I tried to reproduce the problem using a Xubuntu 14.04 image and
everything worked as expected:

http://people.canonical.com/~amilone/xubuntu-output.log

The main problem is that systems older than 14.04 might still have a
/etc/lightdm/lightdm.conf that was altered by older nvidia-prime
releases.

I thought lightdm would take care of the issue by removing such
configuration file but I was wrong. This is the preinst script from
lightdm in trusty:

if dpkg-maintscript-helper supports mv_conffile; then
  dpkg-maintscript-helper mv_conffile \
    /etc/lightdm.conf \
    /etc/lightdm/lightdm.conf \
    0.3.7-0ubuntu2 -- "$@"
fi

I believe 0.3.7-0ubuntu2 should be updated to a more recent release such
as 1.10.1-0ubuntu1~.

This is something that we should deal with in the lightdm package
though. I don't think it would be right for nvidia-prime to remove
lightdm's configuration files.

Changed in lightdm (Ubuntu):
status: New → Triaged
importance: Undecided → High
no longer affects: lightdm (Ubuntu)
Revision history for this message
Hannu E K N (hannu-n) wrote :

OLD stuff. Time to close this.

Changed in nvidia-prime (Ubuntu):
status: Incomplete → Invalid
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.