Martin Vermeer wrote:
On Tue, Jul 31, 2007 at 12:28:31PM +0200, Helge Hafting wrote:
 Martin Vermeer wrote:
...and more importantly, you just confirmed my diagnosis of
the problem. There is something in qt, or LyX's use of qt,
that responds very badly to DRI both being turned on and
practically unusable.
 Clearly, qt4 think it is clever to use DRI for some things when it
 is available. It is probably faster than "standard X" when hardware
 is used for DRI, but much slower when the software fallback is used.

 A user with trouble can run "glxinfo". If one of the first lines
 says "direct rendering: no", then software DRI is in use, and
 commenting out DRI from the "Module" section in xorg.conf
 will fix the performance problem.

Something like this was my suspicion.
 The long-term fix is to report the bug to qt developers.
 The information "glxinfo" displays is available to qt too,
 through standard DRI operations.  They should not blindly
 use DRI if available - only if "direct rendering" is hw accelerated.
 Otherwise it is not a win.

Is a workaround possible for LyX?
I assume you don't want "make install" to modify xorg.conf. :-)
A grep through qt4 documentation came up with:


     void QGLFormat::setDirectRendering ( bool /enable/ )

If /enable/ is true enables direct rendering; otherwise disables direct rendering.

Direct rendering is enabled by default.

Enabling this option will make OpenGL bypass the underlying window system and render directly from hardware to the screen, if this is supported by the system.


So, if we have a QGLFormat object somewhere, we can turn
direct rendering off for LyX. I also found this:

All QGLWidget subclasses are paint devices that convert standard
QPainter calls to OpenGL calls, enabling two-dimensional graphics to
be accelerated on devices with appropriately supported hardware.

I don't know if LyX uses such "paint devices" though.

Helge Hafting

Reply via email to