Detect video hardware and start the correct driver
crttrap [-b bits] [-c config_file] [-gx,y] [-V] [-VV] [-wt trap_opt] command
- -b bits
- Choose mode by the number of bits per pixel. This is usually done when trapping video modes to change the default trapped mode.
- -c config_file
- Specify the name of the trap configuration file. This file
contains the io-graphics command lines needed
to start various drivers.
The default file name is graphics-modes. The crttrap utility adds the path prefix /etc/system/config/ to this file name (also see the path prefix extension for networks in the Description section).
- Choose mode by resolution. This is usually done when trapping video modes to change the default trapped mode.
- Be verbose.
- Be very verbose and pass on the -V option to the trapper programs that are started.
- -wt trap_opt
- Pass option to trapper.
- Start the probe with one of these commands:
- clear -- Remove the current trap configuration file (the default is /etc/system/config/graphics-modes).
- dump -- Print the contents of the trap configuration file (default /etc/system/config/graphics-modes).
- query -- Print the command line that would be executed by start.
- start -- Execute the first line of the trap configuration file (default /etc/system/config/graphics-modes) to start the modeswitcher and a photon graphics driver.
- trap -- detect the graphics card and create the trap configuration file (default /etc/system/config/graphics-modes).
|If you change your video hardware, run crttrap clear to remove your current configuration file. If you don't, your video driver may fail.|
The crttrap utility has several options enabling you to manipulate the configuration information for your video hardware. Its main purpose is to detect the video hardware and modes you can use in your system and store the command lines needed to start your graphics drivers in a configuration file.
|This utility needs to have the setuid ("set user ID") bit set in its permissions. If you use mkefs, mketfs, or mkifs on a Windows host to include this utility in an image, use the perms attribute to specify its permissions explicitly, and the uid and gid attributes to set the ownership correctly.|
The utility can also be used to start the video driver and mode that has been automatically selected as the most appropriate for your system. The phgrafx utility refers to the configuration file when offering you available alternative video configuration choices.
Here's how crttrap works:
The enum-devices manager processes the file /etc/system/enum/devices/graphics to enumerate the graphics devices present on your computer. Using the enumeration information as a basis, enum-devices puts together the command lines that devgt-iographics will use to detect the video modes available on these devices. These command lines are stored in /etc/system/config/graphics-traplist.
When you run crttrap, it starts devgt-iographics and then combines the enumerated device data with the detected mode information to create command lines that io-graphics can use to start your graphics drivers in the modes you select.
The crttrap utility stores the resulting command lines in a trap configuration file named graphics-modes; the path of this file depends on whether your computer is on a network or not:
- For a networked machine, the path for your default trap configuration file is:
where hostname is the name of your node on the network (i.e. the value of the _CS_HOSTNAME configuration string).
- For a standalone machine, the default path is:
When you run crttrap with the start or trap commands, crttrap looks for /etc/system/config/crtc-settings. If it doesn't find this file, it copies the default file from /usr/photon/config/ into /etc/system/config.
The crtc-settings file contains monitor timing information used to adjust the centering, sizing, etc. of the display. The default crtc-settings file contains the VESA discrete monitor timings.
Detect the modes available for the graphics devices in your system and generate the appropriate command lines in graphics-modes:
Execute the first line of graphics-modes to start the modeswitcher and the corresponding graphics driver:
Print the command line that would be executed by crttrap start:
Print the contents of the graphics-modes file:
Delete the current graphics-modes file:
Connecting Hardware in the Neutrino User's Guide