This will happen on systems that report more than 1 graphics card (i.e.
Hybrid systems with both drivers installed).
To reproduce:
- Copy /usr/share/checkbox/scripts/graphics_driver to /tmp
- Modify the copy on /tmp so that line 304 reads:
has_hybrid_graphics = (len(cards) >= 1 and hybrid.is_laptop()
(the change is changing > for >= so that this condition is met on any
system).
- Run the script from /tmp
Expected result:
- Graphics driver information
Actual result:
------------- VIDEO DRIVER INFORMATION -------------
Video Driver: intel
Driver Version: 2.17.0
------------- HYBRID GRAPHICS CHECK ----------------
Graphics Chipset: Intel (8086:0046)
Loaded DDX Drivers: intel, vesa, fbdev, fbdevhw
Traceback (most recent call last):
File "Documents/checkboxes/checkbox/trunk/scripts/graphics_driver", line 323,
in <module>
sys.exit(main())
File "Documents/checkboxes/checkbox/trunk/scripts/graphics_driver", line 318,
in main
results.append(hybrid_graphics_check(xlog))
File "Documents/checkboxes/checkbox/trunk/scripts/graphics_driver", line 304,
in hybrid_graphics_check
has_hybrid_graphics = (len(cards) >= 1 and hybrid.is_laptop()
NameError: global name 'hybrid' is not defined
The problem is that the "hybrid" object on which is_laptop and
cards_dict are being called does not exist. is_laptop() is just a method
so it probably doesn't need to be scoped to hybrid, and cards_dict is a
local variable in the hybrid_graphics_check method so it also probably
needs no scoping.
Setting to Triaged with importance: Medium, as people running this on
hybrid graphics systems (which are becoming more popular) will very
likely run into this.
** Changed in: checkbox (Ubuntu)
Status: New => Triaged
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1048058
Title:
graphics_driver crashed with NameError in hybrid_graphics_check():
global name 'hybrid' is not defined
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/checkbox/+bug/1048058/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs