Re: About VBLANK and troubles with it



I've done some more research about this problem.

I've written a program that runs in X, fullscreen, on TV. After some
time of inactivity, TV goes to "sleep mode" (that has same effect as
when HDMI cable is unplugged).

I debug this with simple test program (written in Vala) you can find
here http://pastebin.com/Fu3xbVGT.

I've noticed that clutter starts to render ~350 FPS after HDMI is
unplugged. That leads to unresponsive program using 100% cpu after
some time (or immediately if program is restarted when HDMI is
unplugged). Also, I've noticed that when cpu load is 100%, 70% of load
is system calls (%sy in top).

Of course, normal is 60 FPS when HDMI is plugged in.
Logical explanation is that clutter don't know refresh rate of TV when
HDMI is unplugged and so it can't sync it.

But, when I tried with options set CLUTTER_VBLANK to none/glx/dri or
set CLUTTER_DEFAULT_FPS nothing changed - clutter ignored that.

Now, that confuses me, why those options do nothing and is there a way
to tell clutter what refresh rate to use so it doesn't brick when TV
is off for long time (or HDMI is unplugged)?

Some time ago I've read that vsync is now managed by clutter
internally and that there are some new ways of managing vsync, vblank
and that stuff, but I can't find link to that anymore :(

So, is there any way to manage clutter vsync? Can someone explain what
happens to me, is this a bug or what?

I'm using stable version of clutter (1.12) and fglrx on updated ubuntu 12.10.

I've noticed that nothing of this exists with glxgears or some other
opengl app - that confirms it's a clutter-specific problem.

Also, I've tried with newer TV and with PC monitor and I've noticed
that clutter is stopping all rendering when HDMI is unplugged (which
is great).

Problem is with TV I tested first - if I unplug HDMI clutter goes mad
and renders at max FPS. That brought me to conclusion that something
is bad with TVs EDID. I've managed to force fglrx to use some
predefined EDID (which lead to bad sync with TV) and that made clutter
to work as it should - rendering stopped after HDMI is unplugged.

So, how should I debug this, does someone know why is this happening
and what could be possible solutions?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]