Brief description of some debug options:

Tips: 
  - enable the "magic-sysreq" thing in kernel-config to be able to
    shut down your computer gracefully if anything really bad happens...
  - Umounting or remounting unneeded partitions as read only will
    reduce the time spent waiting for fsck during booting. Of course,
    if you mount all your disks from an NFS server you won't have to
    worry about disk crashes at least.
  - or have terminal/second computer hooked up to kill processes or
    shutdown the machine.
  - can debug glx.so when you compile the module with "-g" (no need to
    recompile Xserver) and start server in gdb - need to to that from 
    a remote terminal. (Configure glx with --enable-debug)
  - Remember that the mga driver will cause (and trap) segfaults if the
    X server is trying to do 2d operations while a 3d application is
    active. Such a segfault is nothing to be alarmed by. They can be
    recognized by the fact that they were trying to write to an address
    in the following range: [MGAMMIOBase, MGAMMIOBase+0x3000]
    See servGL/hwglx/mga/mgadma.c, RegisterAccessSignalHandler for a
    good breakpoint position. (Or you could just set a breakpoint at
    FatalError());

Disable HW driver:
  - you can disable HW rendering to test if everything else works well
  - disable HW with setting "nohw = 1" in the configuration file

GLX log: 
  - server side logging of OpenGL calls
  - have to compile with "-DGLX_LOG"
  - enable with "debug = 1" in the configuration file 
     where x is the loglevel
      0 = LOG_ALWAYS
      1 = LOG_TRACE
      2 = LOG_ARGS
      3 = LOG_DATA
  - output goes to /var/log/glx_debug.log

MGA log:
  - driver specific logging
  - have to compile with "DriverLogging" defined
  - set log filename with "hw_logfile=filename" in the configuration file
    (if not set log goes to Xserver's stdout)
  - set log level with "hw_loglevel=x" in the configuration file 
      where x is the loglevel
	0            => log only error messages.
	1 or not set => error + standard debugging messages
	>1           => more messages

MGA performance boxes:
  - colored boxes in upper left corner of GL window.
  - enable with "hw_boxes=1" in the configuration file 
  - no boxes:  SW rendering.
  - white box: HW rendering.
      this first box will be grey in psuedo-dma mode,
      purple when using direct rendering
  - red box: had to wait for drawing to complete for some reason.
      Can happen if falling back to software rendering or if
      the application wants to read pixel data from the window for
      example.
  - blue box:   the X server forced a sync by touching a register
                (See docs/X_dma_hack.txt)
  - yellow box: textures were swapped
  - green box:  had to wait for HW to finish frame (100% card utilization).
  - The bar below the boxes represents utilization of primary and
    secondary DMA buffers. If one of these overflowed it will be rendered as a
    solid bar.

Software fallback:
  - software fallback for unsupported paths can be disabled
  - set this behavior with "mga_nofallback=1" in the configuration file
  - silently renders with the closest supported primative

---
$Id: debug.txt,v 1.8 2000/01/26 20:47:03 ehliar Exp $
