hybrid-detect does not correctly detect if an alternative for the respective driver cannot be found
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nvidia-common (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
$ lsb_release -rd
Description: Ubuntu 12.04.1 LTS
Release: 12.04
$ apt-cache policy nvidia-common
nvidia-common:
Installed: 1:0.2.44.2
Candidate: 1:0.2.44.2
Version table:
*** 1:0.2.44.2 0
500 http://
100 /var/lib/
1:0.2.44 0
500 http://
Hardware:
LENOVO ThinkPad T520 (Type: 4240-6AG) with Nvidia Optimus technology
BIOS Setup -> Config -> Display -> OS Detection for NVIDIA Optimus: [Disabled]
Expected behavior:
If "BIOS Setup -> Config -> Display -> Graphics Device" was changed from "Integrated Graphics" [Intel Sandybridge Mobile (GT2+)] to "Discrete Graphics" (NVIDIA NVd9) then hybrid-detect should look for the master link of an alternative for the "i386-linux-
Gfx was changed in the BIOS
Error: no alternative found
Actual behavior for i386 package architecture:
In the above reported case hybrid-detect calls "update-
Gfx was changed in the BIOS
Select
update-
Usage: update-alternatives [<option> ...] <command>
[ rest of usage output removed ]
Fix:
Because hybrid-detect does not check for an empty string in line 207 (only for a NULL pointer) after calling get_alternative
This (corrected) patch fixes the reported problem.