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
-> main()
-> disper.switch()
-> print self.export_config()
> /usr/share/disper/src/
-> return self.switcher.export_config()
-> self.nv.get_xinerama_info_order(self.screen).split(',')))
-> res = self.query_string_attribute(target, [], NV_CTRL_STRING_TWINVIEW_XINERAMA_INFO_ORDER)
-> return _NVCtrlQueryStringAttributeReply(binrp)
-> minx.XData('STRING8',self.n,'string'))
-> rdict[arg.value] = struct.unpack( structcode, data[:sz] )[0]

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

(Pdb) pp data[:sz]
(Pdb) pp structcode

(Pdb) pp ad
(Pdb) pp self.n

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).