the new -server drivers break nvidia-detector
Bug #1891183 reported by
Alberto Milone
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-drivers-common (Ubuntu) |
Fix Released
|
Medium
|
Alberto Milone | ||
Bionic |
In Progress
|
Medium
|
Alberto Milone | ||
Focal |
In Progress
|
Medium
|
Alberto Milone |
Bug Description
Calling nvidia-detector, fails when the new -server series are available in the archive:
nvidia-detector
Traceback (most recent call last):
File "/usr/bin/
a = NvidiaDetection
File "/usr/lib/
self.getData()
File "/usr/lib/
driver_version = self.__
File "/usr/lib/
v = int(name)
Changed in ubuntu-drivers-common (Ubuntu): | |
assignee: | nobody → Alberto Milone (albertomilone) |
Changed in ubuntu-drivers-common (Ubuntu Bionic): | |
assignee: | nobody → Alberto Milone (albertomilone) |
Changed in ubuntu-drivers-common (Ubuntu Focal): | |
assignee: | nobody → Alberto Milone (albertomilone) |
Changed in ubuntu-drivers-common (Ubuntu): | |
status: | New → In Progress |
Changed in ubuntu-drivers-common (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in ubuntu-drivers-common (Ubuntu Focal): | |
status: | New → In Progress |
Changed in ubuntu-drivers-common (Ubuntu): | |
importance: | Undecided → Medium |
Changed in ubuntu-drivers-common (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in ubuntu-drivers-common (Ubuntu Focal): | |
importance: | Undecided → Medium |
description: | updated |
To post a comment you must log in.
Here is the output without the fix: nvidia- detector" , line 8, in <module> (printonly= True, verbose=False) python3/ dist-packages/ NvidiaDetector/ nvidiadetector. py", line 73, in __init__ python3/ dist-packages/ NvidiaDetector/ nvidiadetector. py", line 163, in getData get_value_ from_name( stripped_ package_ name) python3/ dist-packages/ NvidiaDetector/ nvidiadetector. py", line 92, in __get_value_ from_name
Traceback (most recent call last):
File "/usr/bin/
a = NvidiaDetection
File "/usr/lib/
self.getData()
File "/usr/lib/
driver_version = self.__
File "/usr/lib/
v = int(name)
ValueError: invalid literal for int() with base 10: 'server'
Here are is my solution:
In function from_name( self, name): driver_ aliases. get(name)
# line 88
def __get_value_
'''Get the integer associated to the name of a driver'''
v = self.__
if v is None:
if name.isdigit(): # I made sure is an int.
v = int(name)
return v
# in line 164 I replaced with : get_value_ from_name( stripped_ package_ name)):
continue
if not (driver_version := self.__