Bug with Xen and Nvidia Optimus cards

Bug #1267957 reported by HighBomber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xen (Ubuntu)
New
Undecided
Unassigned

Bug Description

The following error occurs when starting Xen with Nvidia Optimus graphics cards:

ERROR (SrvDaemon:349) Exception starting xend (Looped capability chain: 0000:01:00.0)
Traceback (most recent call last):
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/server/SrvDaemon.py", line 341, in run
    servers = SrvServer.create()
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/server/SrvServer.py", line 258, in create
    root.putChild('xend', SrvRoot())
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/server/SrvRoot.py", line 40, in __init__
    self.get(name)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/web/SrvDir.py", line 84, in get
    val = val.getobj()
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/web/SrvDir.py", line 52, in getobj
    self.obj = klassobj()
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/server/SrvNode.py", line 30, in __init__
    self.xn = XendNode.instance()
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendNode.py", line 1181, in instance
    inst = XendNode()
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendNode.py", line 159, in __init__
    self._init_PPCIs()
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendNode.py", line 282, in _init_PPCIs
    for pci_dev in PciUtil.get_all_pci_devices():
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/util/pci.py", line 474, in get_all_pci_devices
    return map(PciDevice, get_all_pci_dict())
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/util/pci.py", line 699, in __init__
    self.get_info_from_sysfs()
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/util/pci.py", line 1269, in get_info_from_sysfs
    self.find_capability(0x11)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/util/pci.py", line 1236, in find_capability
    ('Looped capability chain: %s' % self.name))
PciDeviceParseError: Looped capability chain: 0000:01:00.0
[2014-01-10 12:53:46 4486] INFO (SrvDaemon:220) Xend exited with status 1.

The following patch fixes the bug.

--- /root/pci.py 2012-03-31 16:36:52.633262092 +0100
+++ /usr/lib/xen-4.1/lib/python/xen/util/pci.py 2012-03-31 16:41:00.057262001 +0100
@@ -1266,7 +1266,12 @@
pass
def get_info_from_sysfs(self):
- self.find_capability(0x11)
+ try:
+ self.find_capability(0x11)
+ except PciDeviceParseError, err:
+ log.error("Caught '%s'" % err)
+ return False
+
sysfs_mnt = find_sysfs_mnt()
if sysfs_mnt == None:
return False

Details and the patch here (I am not the author):
http://martin.schinz.de/blog/2012/03/31/fixing-xen-daemon-on-a-laptop-with-nvidia-optimus-graphics/

Originally found here:
https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=767742

Cheers!

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.