Rotation problem with python client revno 125

Asked by Rui Bernardino on 2010-03-11

I have this 'totem' running karmic with 768x1360 resolution (works on gnome) on an nVidia card. I set the correct 'width' and 'height' on site.cfg, the client starts in full screen and correctly renders content, EXCEPT all content is displayed with a offset... a picture is worth a thousand words, please check the layout and a few screen grabs here

Question information

English Edit question
Xibo Edit question
No assignee Edit question
Solved by:
Alex Harrington
Last query:
Last reply:

Hi Rui

Can you tell me which version you're using?

Also can I have a level 10 debug of one of those layouts loading as it'll show what the client thinks is going on.


Version is revno 125.

Are these lines sufficient?
LOG: 1268309635.0 3 info Loading layout ID 6 from file /var/lib/media/6.xlf
LOG: 1268309635.0 5 debug Screen Dimensions: 768x1360
LOG: 1268309635.0 5 debug Layout Dimensions: 450x800
LOG: 1268309635.0 5 debug Scaled Dimensions: 765x1360
LOG: 1268309635.0 5 debug Offset Dimensions: 1x0
LOG: 1268309635.0 5 debug Scale Ratio: 1.7


It's helpful but what I need is the output that shows the actual layout being rendered so I can see what positions it thinks it's putting the regions in etc.

What you've sent indicates it's going to use a 1 pixel left offset - which clearly isn't what you've got.


Ok. Please get the full log from


I don't think it'll make any difference but can you just see what happens if you run it windowed rather than full screen.

There's a couple of numbers in the output that don't look right. When I get some time I'll see if I can recreate it and get to the bottom of it.


In windowed mode the layout is displayed correctly. It looks like a full screen issue.


That puts things in a whole new light then.

There's basically no difference between windowed mode and fullscreen mode beyond the options I pass to libavg - the software that actually does the screen rendering.

It could well be that it's seeing the original screen size and using that - rather than the rotated values.


Hi Rui

I'm pretty sure this is a libavg bug. I've written up a minimal test case and sent it over to the libavg developers for their consideration.

FYI here's the links to the example, and screenshots:


Hi Rui

I've got a response from the libavg team and they think it's likely to be a bug further down the stack (in libsdl).

They're suggesting having the rotation done by libavg rather than relying on the graphics driver (which has the nice side effect of not requiring the driver to support rotating the screen for us).

I've been trying to figure out in my head how hard it would be to implement and there's a fair amount of code that would need to change, but I think it's possible.

I'll bear it in mind and let you know how things progress.


Hi Rui

I've pushed some code in there which should solve that for you.

To update the version you have, go in to your Xibo client folder and do "bzr pull lp:~alexharrington/xibo/pyclient-1.1.0a22" and it should update.

You'll need to make the following changes:
* Turn of screen rotation in the nVidia driver
* Find your screen resolution (eg 1920x1080).

Now edit your site.cfg as follows in the [Main] section:


What that does is create a virtual display (sized by vwidth, vheight) inside your actual display (sized by width,height) and then rotate it by vrotation degrees clockwise.

You might find that gives you a display that's upside down depending on which way the monitor has been tilted. If so, change vrotation to either -90 (ie 90 degrees counter clockwise) or to 270.

That feature will become standard in 1.1.0a22

Hope that helps


Thanks Alex Harrington, that solved my question.

Hell, it even works with non right angles (ex. 123ยบ). Xibo officially rivals Sony's Ziris ;)

Lol. Yes - it does.

If libavg makes one little tweek we should be able to output a warped image too suitable for projecting on to a non-flat surface or for fixing keystone issues with projectors too.