Incorrect(?) reporting of freeness of third-party nVidia drivers from graphic-drivers PPA

Bug #1514057 reported by Tom Womack on 2015-11-07
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
Medium
Alberto Milone

Bug Description

pumpkin@pumpkin:~/4788.5236.la$ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0 ==
modalias : pci:v000010DEd00001080sv000010B0sd00000401bc03sc00i00
model : GF110 [GeForce GTX 580]
vendor : NVIDIA Corporation
driver : nvidia-340-updates - distro non-free
driver : nvidia-352-updates - distro non-free
driver : nvidia-355 - third-party free recommended
driver : nvidia-352 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin
driver : nvidia-340 - distro non-free
driver : nvidia-304-updates - distro non-free
driver : nvidia-304 - distro non-free

I have some difficulty believing that nvidia-352 is free and nvidia-352-updates non-free; I would have thought nvidia-352 and nvidia-355 are both third-party non-free.

it is possible this is the result of having some extra PPAs installed:

pumpkin@pumpkin:~/4788.5236.la$ sudo apt-get install nvidia-355
Reading package lists... Done
Building dependency tree
Reading state information... Done
Recommended packages:
  libcuda1-355 nvidia-opencl-icd-355
The following packages will be upgraded:
  nvidia-355
1 to upgrade, 0 to newly install, 0 to remove and 19 not to upgrade.
Need to get 58.6 MB of archives.
After this operation, 3,072 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu/ wily/main nvidia-355 amd64 355.11-0ubuntu0~gpu15.10.2 [58.6 MB]

So maybe this is a matter of package status being marked up incorrectly in the PPA?

Launchpad Janitor (janitor) wrote :

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

Changed in ubuntu-drivers-common (Ubuntu):
status: New → Confirmed

I can reproduce this issue, all of my NVIDIA proprietary drivers are marked "free"

```
nvidia-340: installed: <none> available: 340.102-0ubuntu0~gpu16.04.3 [third party] free modalias: pci:v000010DEd00000FDFsv00001043sd00001587bc03sc02i00 path: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 vendor: NVIDIA Corporation model: GK107M [GeForce GT 740M]
nvidia-375: installed: <none> available: 375.39-0ubuntu0~gpu16.04.2 [third party] free modalias: pci:v000010DEd00000FDFsv00001043sd00001587bc03sc02i00 path: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 vendor: NVIDIA Corporation model: GK107M [GeForce GT 740M]
nvidia-378: installed: <none> available: 378.13-0ubuntu0~gpu16.04.3 (auto-install) [third party] free modalias: pci:v000010DEd00000FDFsv00001043sd00001587bc03sc02i00 path: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 vendor: NVIDIA Corporation model: GK107M [GeForce GT 740M]
intel-microcode: installed: 3.20151106.1 available: 3.20151106.1 (auto-install) [distro] non-free
nvidia-370: installed: 370.28-0ubuntu0~gpu16.04.3 available: 370.28-0ubuntu0~gpu16.04.3 [third party] free modalias: pci:v000010DEd00000FDFsv00001043sd00001587bc03sc02i00 path: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 vendor: NVIDIA Corporation model: GK107M [GeForce GT 740M]
```

I also enabled the graphic-drivers PPA, so the theory might be right

summary: - Incorrect(?) reporting of freeness of third-party nVidia drivers
+ Incorrect(?) reporting of freeness of third-party nVidia drivers from
+ graphic-drivers PPA
Josh Holland (anowlcalledjosh) wrote :

I believe this is due to a simplistic handling of "freeness" in UbuntuDrivers.detect._is_package_free() – any package not from restricted or multiverse is considered free:

    # it would be better to check the actual license, as we do not have
    # the component for third-party packages; but this is the best we can do
    # at the moment
    if pkg.candidate.section.startswith('restricted') or \
            pkg.candidate.section.startswith('multiverse'):
        return False
    return True

Possibly it would be better to do the logic the other way around ("if it's in main/universe/whatever, then it's free, otherwise it's nonfree"), but really a better solution is needed.

However, I notice that the Nvidia drivers on my system are from section "non-free/libs" – the following patch fixes the problem for me:

--- a/UbuntuDrivers/detect.py 2019-01-10 02:30:54.326668673 +0000
+++ b/UbuntuDrivers/detect.py 2019-01-10 02:36:24.707733516 +0000
@@ -165,7 +165,8 @@
     # the component for third-party packages; but this is the best we can do
     # at the moment
     if pkg.candidate.section.startswith('restricted') or \
- pkg.candidate.section.startswith('multiverse'):
+ pkg.candidate.section.startswith('multiverse') or \
+ pkg.candidate.section.startswith('non-free'):
         return False
     return True

Changed in ubuntu-drivers-common (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
assignee: nobody → Alberto Milone (albertomilone)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers