Svgalib FAQ

Questions

  1. Who is this FAQ for?
  2. What hardware is supported by svgalib?
  3. Is my XYZ123 card supported?
  4. My card is listed as supported, but svgalib does not work.
  5. My card is supported, but some modes do not work.
  6. My card works with the VESA driver, but text mode is not restored properly.
  7. My card is listed as working with VESA driver, but is not working.
  8. Why does a programs terminate immediatelly with "svgalib: Cannot get I/O permissions."?
  9. Why does a programs terminate immediatelly with "Not running in a graphics capable console, and unable to find one."?
  10. Why does a programs terminate immediatelly with "svgalib: mmap error in paged background memory."?
  11. Modes appear not centered, or in a low refresh rates. Why don't modelines have any affect?
  12. What is the svgalib mailing list?
  13. Why do I get "make: ldconfig: Command not found" Error when running make install?

Answers

  1. Who is this FAQ for?

    This FAQ, and the message board are intended to answer questions regarding use of svgalib. If you have questions regarding svgalib programming, they are not answered in this FAQ, and they should be asked on the svgalib mailing list (see Q.12), rather than on the message board.

  2. What hardware is supported by svgalib?

    This answer needs to be very long, but here is the short version.

    The answer is long, and not very definite, since svgalib (like XFree86, ggi and fbdev) supports graphics cards according to the graphic chipset they use. The problem is that some chipsets are used in many cards, and sometimes the cards are different from each other in a way that a driver that works with one card won't work with another card which has the same chipset.

    In addition, there are a few levels of support by svgalib (using modelines or a fixed set of mode, autodetecting or not, supporting linear modes or not, etc.)

    supported chipsets: (some are only supported in development releases)

    Some chipsets are not supported, but are known to work with the VESA driver
    Please note that VESA driver is not autodetected by default, so If you want to use it, add the line
    chipset VESA
    
    to the config file (usually /etc/vga/libvga.config).

  3. Is my XYZ123 card supported?

    As was explained in the previous question, it is hard to tell. All supported cards should be autodetected, so try without any chipset line in the config file, and if that does not work, then the card is probably not supported. You can then try the VESA driver.

  4. My card is listed as supported, but svgalib does not work.

    Please make sure that you are using the latest release of svgalib (you can find what it is at svgalib homepage). Many distribuitions include an old version of svgalib, so this point is important. You might even want to look at the latest development release, to see if there are any changes to the driver of the chipset you use.

    Also, make sure the problem is indeed not with the program you try to run, but actually with svgalib: run the program vgatest. The first lines of the output should list the chipset that was found and the amount of memory detected. Then, there will be a list of all modes supported by the combination of chipset, driver and monitor. select a mode number, and that mode will be set, and a test pattern will be displayed. Pressing any key will return to text mode.

    If the wrong chipset is reported, or a mode that is listed is not set properly, or a similar problem, please report the bug by email to svgalib maintainer.

  5. My card is supported, but some modes do not work.

    See previous question. Check with vgatest if the problem is with svgalib or the program you run, and report to the appropriate person.

  6. My card works with the VESA driver, but text mode is not restored properly.

    This can usually be solved by adding the line

    VesaText
    
    to the config file (usually /etc/vga/libvga.config).

  7. My card is listed as working with VESA driver, but is not working.

    This problem occures with some systems, and I have not yet found out why. Sometime it is solved when upgrading a kernel or a libc (or a mainboard), but don't do this with the expectation that it will solve the problem, since it usually does not. An exception is the Matrox Millenium, where upgrade of the card's bios to the latest version is known to make it work with the vesa driver.

    If you want to make sure if the problem is in svgalib, or the mysterious problem I described, please run the program vbetest (only available in the lrmi-0.6m subdirectory of the svgalib source distribution). If vbtest can set modes and return to text mode, but still, the vesa driver does not work, than it is a bug in svgalib, so please report it. Otherwise, it is the unknown problem.

  8. Why does a programs terminate immediatelly with "svgalib: Cannot get I/O permissions."?

    svgalib programs need to be run as root. This means that either the user that runs them is root, or, if running by normal users is desirable, the program needs to be 'suid root', which means: the program must be owned by root (chown 0 program) and the suid bit needs to be set (chmod u+s program).

  9. Why does a programs terminate immediatelly with "Not running in a graphics capable console, and unable to find one."?

    If a program is run from an xterm, or from a telnet session, it cannot display graphics on its console, so svgalib tries to open a new virtual console (if this option is compiled in). Under Linux, only root or the owner of the console can open a new virtual.

  10. Why does a programs terminate immediatelly with "svgalib: mmap error in paged background memory."?

    svgalib's implementation of background execution relied on a kernel feature (mmapping /proc/self/mem), which was removed in linux-2.3.27, so if you are using any kernel later than that, you need to compile svgalib without bavkground execution support. To do this, edit the file Makefile.cfg, and comment out the line

    BACKGROUND = Y
    
    so it will read:
    #BACKGROUND = Y
    
    Then recompile and reinstall svgalib.

  11. Modes appear not centered, or in a low refresh rates. Why don't modelines have any affect?

    Not all drivers use modelines. Some old drivers don't, and mainly, the VESA driver does not. If you use the VESA driver, you can only use the modes defined in the VESA bios, in the refresh rate defined in the VESA bios. Most bios writers choose to use the lowest refresh, so that the mode will work even on old monitors.

  12. What is the svgalib mailing list?

    The svgalib mailing list is used to discuss svgalib. The main topics are svgalib development and application development using svgalib, but any question related to svgalib is welcome. The mailing list does not have a FAQ yet, but it is archived, so if you fear that you question might be frequent, browse the archive first. To subscribe, send a message with the content "subscribe linux-svgalib" to listbot@svgalib.org

  13. Why do I get "make: ldconfig: Command not found" Error when running make install? ldconfig is usually installed in /sbin or /usr/bin, which are not in normal users' PATH, but only in super user's (root). If you become root in order to run make install by running "su", then this does not change environment variables (including PATH), leaving you with a PATH that does not include /sbin and /usr/sbin. This means that ldconfig is not found. The solution is to login as root in order to use make install, or to use "su -", which runs the shell as a login shell, therefore setting the environment correctly.