Comment 7 for bug 908856

Not sure if the below helps. I hit the same issue using a Quadro FX 880M (NVIDIA Driver Version:295.20, NV-CONTROL Version:1.27) when in a docking station with 2 monitors connected via DVI (and the builtin laptop monitor off). Using disper 0.3.0.

I ran disper through the python debugger (though I'm no python programmer so if there is something else that would help let me know) and got a stack trace from the error:

-> exec cmd in globals, locals
  <string>(1)<module>()
  /usr/share/disper/src/disper.py(360)<module>()
-> main()
  /usr/share/disper/src/disper.py(354)main()
-> disper.switch()
  /usr/share/disper/src/disper.py(197)switch()
-> print self.export_config()
> /usr/share/disper/src/disper.py(319)export_config()
-> return self.switcher.export_config()
  /usr/share/disper/src/switcher/swnvidia.py(185)export_config()
-> self.nv.get_xinerama_info_order(self.screen).split(',')))
  /usr/share/disper/src/nvidia/nvcmd.py(450)get_xinerama_info_order()
-> res = self.query_string_attribute(target, [], NV_CTRL_STRING_TWINVIEW_XINERAMA_INFO_ORDER)
  /usr/share/disper/src/nvidia/nvctrl.py(667)query_string_attribute()
-> return _NVCtrlQueryStringAttributeReply(binrp)
  /usr/share/disper/src/nvidia/nvctrl.py(428)__init__()
-> minx.XData('STRING8',self.n,'string'))
  /usr/share/disper/src/nvidia/minx.py(129)decode()
-> rdict[arg.value] = struct.unpack( structcode, data[:sz] )[0]

Then printed the value of some variables in the local area:

(Pdb) pp data[:sz]
'\x00'
(Pdb) pp structcode
's0L'

(Pdb) pp ad
'\x00\x00\x00\x00'
(Pdb) pp self.n
1

disper -p only prints:

could not get scaling for screen DFP-0, reverting to "default"
unpack requires a string argument of length 4

for me (DFP-0 is the disabled internal monitor).