2010-07-07

Slitaz -- glx / drirc / vblank

# LIBGL_DEBUG="verbose" glxinfo

libGL error:
Can't open configuration file /etc/drirc: No such file or directory.
libGL error:
Can't open configuration file /root/.drirc: No such file or directory.

root@slitaz-3:~# tazpkg info xorg-xdriinfo

Tazpkg information
================================================================================
Package : xorg-xdriinfo
Version : 1.0.2
Category : x-window
Short desc : Query configuration information of DRI drivers
Maintainer : pankso@slitaz.org
Depends : xorg-libX11
Suggested : nvidia
Web site : http://www.x.org/
================================================================================

root@slitaz-3:~# xdriinfo
Screen 0: i965
root@slitaz-3:~# cat .drirc



.drirc

<driconf>
<device screen="0" driver="i965">
<application name="all">
<!-- Always synchronize with vertical refresh to avoid tearing -->
<option name="vblank_mode" value="3"/>
</application>
<application name="glxgears" executable="glxgears">
<!-- glxgears should not synchronize with vertical refresh, show full fps -->
<option name="vblank_mode" value="0"/>

</application>
<application name="tuxracer" executable="tuxracer">
<!-- Tuxracer has some artifacts with hardware TCL -->
<option name="tcl_mode" value="0"/>
</application>
</device>
</driconf>


root@slitaz-3:~# LIBGL_DEBUG="verbose" glxinfo | head -12
libGL: XF86DRIGetClientDriverName: 1.9.0 i965 (screen 0)
libGL: OpenDriver: trying /usr/lib/dri/i965_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
GLX_OML_swap_method, GLX_SGI_swap_control, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_SGIX_visual_select_group
client glx vendor string: SGI
client glx version string: 1.4
root@slitaz-3:~# glxgears
7531 frames in 5.0 seconds = 1506.082 FPS
7635 frames in 5.0 seconds = 1526.809 FPS
7633 frames in 5.0 seconds = 1526.469 FPS
7636 frames in 5.0 seconds = 1527.006 FPS
root@slitaz-3:~#

VS

root@slitaz-3:~# LIBGL_DEBUG="verbose" glxinfo | head -4
libGL: XF86DRIGetClientDriverName: 1.9.0 i965 (screen 0)
libGL: OpenDriver: trying /usr/lib/dri/i965_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
libGL error:
Can't open configuration file /etc/drirc: No such file or directory.
libGL error:
Can't open configuration file /root/.drirc: No such file or directory.

name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
root@slitaz-3:~# glxgears
Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate.
301 frames in 5.0 seconds = 60.166 FPS
300 frames in 5.0 seconds = 59.903 FPS
300 frames in 5.0 seconds = 59.903 FPS
300 frames in 5.0 seconds = 59.899 FPS
300 frames in 5.0 seconds = 59.907 FPS
root@slitaz-3:~#

----

http://dri.freedesktop.org/wiki/ConfigurationInfrastructure

Extract from
Troubleshooting Intel graphics performance issues
[..]
Problem: Sync to VBlank

VBlank synchronization is an optimization technique that balances the output rate of your graphics card with the rate that your monitor displays images on the screen. Your monitor's refresh rate -- also called the vertical blanking interval (VBlank) -- is the maximum speed your monitor can present images. If your graphics card renders faster than this rate, the extra images are rendered for naught, as you'll never actually see them. So if your monitor's VBlank is 60 Hz, and your graphics card is rendering 1000 frames-per-second, then 940 frames are getting drawn for no purpose. So theory synchronizing the two makes a lot of sense.

HOWEVER, things are not so simple, and vblank syncing can actually make performance worse. For a deeper discussion, see http://www.tweakguides.com/Graphics_9.html

To turn off vblank sync, use any of the three methods:

1. Setting vblank using compizconfig-settings-manager: Go to System->Preferences-> Compiz config settings manager -> general options -> Display settings-> Sync to VBlank. Turn it to 'off'.

2. From the compiz gconf configuration:

sync_to_vblank = false

3. Via driconf: 'Synchronization with vertical refresh (swap intervals)' -> set to 'Never synchronize with vertical refresh'.
.