0

I've written a minimalist xserver that I run on a slow test machine. It simply uses the video framebuffer. When I move a window (of any size) in twm, it moves quickly and cleanly, but it "trembles" and it's like there were bad screen update frequencies. Also, when I release the mouse button, I see (really quickly) the window going down, like if the CPU were too slow, but its charge doesn't exceed 40%.

So, how is designed the original XOrg server? I mean the XOrg base that is used by kdrive or xquartz for exemple.

  1. Is the graphics framebuffer "in free access", each client drawing simultaneously?
  2. Is there a rendering loop drawing the screen regularly (FPS), even when a client has direct access to FB?

How does work the setting of the refresh rate in xorg's xfree86 server:

  • is it used to adjust the frequency of the screen rendering in the xorg base program
  • or is it used only in xfree86's video drivers?

Thanks for any enlightenment...

Guigeek
  • 21
  • 4
  • In classic X11, the clients have no direct access to the framebuffer. They talk to the server over the network. There are no periodic updates in software. The refresh rate only controls the video card. What you describe looks similar to [screen tearing](http://en.wikipedia.org/wiki/Screen_tearing) (as far as I can tell without actually *looking*). Try to access the framebuffer during vertical blanking interval only. See also [here](http://wiki.osdev.org/Double_Buffering). Pardon me if my remark is off, it's hard to tell anything without looking at code or at least at the picture. – n. m. could be an AI Nov 28 '12 at 20:45
  • Thanks, I'm going to study that. In fact my code gives a VRAM address to the XServer and I then have a loop in a separate thread that updates the screen from this VRAM framebuffer at ~50Hz using a FramebufferSwap method. – Guigeek Nov 28 '12 at 21:07

0 Answers0