Graphics hardware autoconfiguration
initgfx for the automatic configuration of the graphics hardware in your computer.
Theory of operation
initgfx consists of the following files and directories:
/usr/local/nvidia/<version>/<contents of the driver tgz>
/usr/local/etc/X11/xorg.conf.d/<dynamically generated> # defined by path_xorg_cfg_dir
initgfx calculates a config ID which is a MD5 checksum of the output of
sysctl dev.vgapci | sort. If the file
/var/initgfx_config.id exists, check if
its content matches the config ID. If that is the case, load the modules
set via the
initgfx_kmods, and exit. If the file
/var/initgfx_config.id does not exist, or its content does not match the
config ID, try to auto-detect the accelerated graphics driver. Use
to test if the X server starts, change
initgfx_kmods, write a new xorg
config file, and save the new config ID if the test was successful.
Otherwise, as a fallback, write a xorg config file for the VESA or SCFB
driver depending on whether the system was booted via BIOS or EFI.
If everything goes well, then after running
sudo sysctl initgfx start you should have (example: Nvidia):
$ cat /usr/local/etc/X11/xorg.conf.d/00-video-initgfx.conf
Identifier "NVIDIA CARD"
VendorName "NVIDIA Corporation"
Disabling the automatic graphics driver setup
If you want to create your own graphics driver settings, you can disable initgfx by adding
If you would like to temporarily disable the automatic graphics driver setup and use a failsafe non-accelerated driver (VESA or SCFB), then enter
set initgfx.detect.disable=1 followed by
boot at the bootloader prompt. This can be useful e.g., in cases where the automatically detected graphics driver does not work properly on the Live system.
If applications that are using OpenGL crash on Nvidia systems, then it may be that the Nvidia driver was correctly loaded but the wrong Xorg configuration has been loaded, not actually using the Nvidia driver. This can happen when initgfx writes the dynamically generated Xorg configuration to
path_xorg_cfg_dir (which points to
/usr/local/etc/X11/xorg.conf.d/ by default) but other files have been placed by other packages or the user into, e.g.,
/etc/X11/xorg.conf.d. You can verify which Xorg configuration directory was used by Xorg with
cat /var/log/Xorg.0.log | grep Using.config. Seemingly Xorg cannot combine configuration stored in multiple
Different versions of the Nvidia drivers exist. Unfortunately the latest version does not support all the earlier GPUs, so multiple versions of the Nvidia drivers are shipped with helloSystem to cover both new and older Nvidia GPUs.
initgfx should automatically select a version suitable for the hardware in the computer.
To check this:
$ cat /etc/rc.conf | grep initgfx_kmods