gpu-manager treats all files in /etc/modprobe.d as config files

Bug #1376966 reported by Pär Lindfors
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
Fix Released
High
Alberto Milone
Trusty
Fix Released
High
Alberto Milone

Bug Description

My media center computer have a single nvidia GPU connected to a TV, and have for many years been happily using the nvidia driver. Unfortunately the recent upgrade to version 1:0.2.91.7 broke X. Starting lightdm would fail, delete my xorg.conf and redirect libgl symlinks to mesa.

After some debugging I fond that this was done by gpu-manager, because it incorrectly believes that my nvidia module is blacklisted. gpu-manager.log contained "Is nvidia blacklisted? yes".

More debugging determined that this was happening because I have a several years old file named:
  /etc/modprobe.d/blacklist.dpkg-old
which among other things contain the line "blacklist nvidia".

However that is _not_ a modprobe config file. modprobe only uses files with a .conf extension. (See the man page modprobe.d(5)). Unfortunately gpu-manager does not have this restriction and looks in all files in /etc/modprobe.d by running:

  grep -G "blacklist.*nvidia[[:space:]]*$" /etc/modprobe.d/*

I could work-around the bug by removing the .dpkg-old file. However this will likely break other machines as well. I found two bugs 1373968 and 1374871 about X not working after installing the latest update. However they does not contain enough information to determine if they are duplicates of this bug or not.

Revision history for this message
Yaneric Roussel (yroussel) wrote :

With the last update I ended up having no nvidia modules loaded. It was exactly because of this bug.

Even something like:
#blacklist nvidia
in a config file "blacklist.conf~" (emacs backup file)

makes nvidia module not loaded...

Revision history for this message
Yaneric Roussel (yroussel) wrote :

Forgot to mention:
- Mythbuntu (Ubuntu 14.04.1 LTS)
- 3.13.0-36-generic
- VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
- nvidia-331

Revision history for this message
Pär Lindfors (paran) wrote :

Oh, I didn't even think of that. Since the regexp don't begin with a ^, of course it also matches comments. :-(

If I was not clear about versions in the original report. This is a regression introduced in the SRU ubuntu-drivers-common 1:0.2.91.7, in Ubuntu 14.04.

Revision history for this message
Pär Lindfors (paran) wrote :

Attached patch solve both issues.

tags: added: regression-update
Changed in ubuntu-drivers-common (Ubuntu):
status: New → Triaged
Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: New → Triaged
Changed in ubuntu-drivers-common (Ubuntu):
importance: Undecided → High
Changed in ubuntu-drivers-common (Ubuntu Trusty):
importance: Undecided → High
Changed in ubuntu-drivers-common (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "1376966_fix_regex_and_only_look_in_conf_files.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

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

Thank you for reporting the problem. I'll review the patch, and hopefully include the fix soon.

Changed in ubuntu-drivers-common (Ubuntu Trusty):
assignee: nobody → Alberto Milone (albertomilone)
Changed in ubuntu-drivers-common (Ubuntu Trusty):
milestone: none → trusty-updates
Changed in ubuntu-drivers-common (Ubuntu):
status: Triaged → In Progress
Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: Triaged → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Pär, or anyone else affected,

Accepted ubuntu-drivers-common into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.2.91.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Chris J Arges (arges) wrote :

Please verify this bug as its blocking bug 1296425 from being promoted to proposed.
Thanks!

Revision history for this message
Mathew Hodson (mhodson) wrote :

What is the test case for this SRU?

Revision history for this message
Brian Murray (brian-murray) wrote :

Looking at the description:

After some debugging I fond that this was done by gpu-manager, because it incorrectly believes that my nvidia module is blacklisted. gpu-manager.log contained "Is nvidia blacklisted? yes".

More debugging determined that this was happening because I have a several years old file named:
  /etc/modprobe.d/blacklist.dpkg-old
which among other things contain the line "blacklist nvidia".

It looks to me like the test case would involve creating a file name blacklist.dpkg-old in /etc/modprobe.d and installing the buggy version of ubuntu-drivers-common and reviewing gpu-manager.log file for "Is nvidida blacklisted? yes". With the version of the package from -proposed you should not see that line in the gpu-manager.log file.

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

yes, that test case is correct.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Pär or anyone: this patch has been waiting testers for three months now and is blocking other updates. Please install the update and follow up here your findings.

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

The package in -proposed works fine here:

:~$ apt-cache policy ubuntu-drivers-common
ubuntu-drivers-common:
  Installed: 1:0.2.91.8
  Candidate: 1:0.2.91.8
  Version table:
 *** 1:0.2.91.8 0
        400 http://archive.ubuntu.com/ubuntu/ trusty-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1:0.2.91.7 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     1:0.2.91.4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

This is the test case:

:~$ echo "blacklist nvidia" | sudo tee /etc/modprobe.d/blacklist.dpkg-old
blacklist nvidia

And here is the relevant part of the log (it clearly says "Is nvidia blacklisted? no"):

:~$ sudo gpu-manager

last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
/etc/modprobe.d is not a file
grep dmesg status 256
dmesg status 256 == 0? No
/etc/modprobe.d is not a file
/etc/modprobe.d is not a file
/etc/modprobe.d is not a file
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is fglrx loaded? no
Was fglrx unloaded? no
Is fglrx blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is fglrx kernel module available? no
Is nvidia kernel module available? yes
Vendor/Device Id: 8086:166
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:de9
BusID "PCI:1@0:0:0"
Is boot vga? no
...

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.2.91.9) trusty-proposed; urgency=medium

  * sl-modem plugin: Keep environment for aplay, just ensure it's using the C
    locale. This avoids staring pulseaudio twice and causing races for
    attaching devices to pulseaudio. (LP: #1296425)

ubuntu-drivers-common (1:0.2.91.8) trusty-proposed; urgency=medium

  * gpu-manager.c:
    - Refine checks for blacklisted modules, so that we don't end up
      catching false positives (LP: #1376966).
      Thanks to Pär Lindfors for the patch.
 -- Martin Pitt <email address hidden> Mon, 05 Jan 2015 17:27:53 +0100

Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for ubuntu-drivers-common has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Chris J Arges (arges) wrote :

There is an upload for 1:0.2.91.10 in the trusty queue; however it looks like this bug is Fixed. Can either the bug or the upload be adjusted. If the bug is adjusted please fill out an SRU template explaining the additional change. Thanks

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

@Chris: I re-uploaded ubuntu-drivers-common to fix another issue. In the meantime the old release was approved. If you reject the package in the queue, I'll reupload, as per the SRU in LP: #1410801

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

@Chris: I've just re-uploaded the package. Let's keep the testing and any further comments in LP: #1410801

Revision history for this message
Pander (pander) wrote :
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.