Manual pages › System administration commands (1M)
monswctl(1M)
read and set the monitor switch, and switch the screen
Package: monsw46, added for amigaux.
NAME
monswctl - read and set the monitor switch, and switch the screen
SYNOPSIS
monswctl [ -d dev ] get | status | set value | rtg [ command [ argument ... ] ] | native
DESCRIPTION
monswctl talks to the monitor switch, monsw(7), through its device, /dev/monsw (or dev). Opening the device loads the monsw module when it is not loaded yet. get and status open it for reading, so any user can ask; set, rtg and native open it for writing, which the node's mode (0644, owner root) leaves to root.
- get
- prints the five fields the driver reports, one per line: config, the value in effect and its meaning; source, where it came from (none, seed, set, patched); state, native, rtg or none (not switched yet); holder, 1 when a program holds the switch on the card's picture; ncards, the card drivers registered.
- status
- prints the same in one line.
- set value
- makes value the value in effect, unless one is patched into the kernel; root only. value is a sum of the bits of monsw(7), in decimal or as 0x hex; -1 unsets it, so that the card's own value applies again. A value with any other bit is refused here, before the kernel sees it. The boot step /etc/rc2.d/S20monsw uses this to put the value from /etc/display into the kernel at every boot.
- rtg
- switches the monitor to the card's picture, runs command and switches back when it ends, however it ends. Without a command it holds the card's picture until the end of its input or until it is killed. Its exit status is the command's.
- native
- switches the monitor back to the chipset's picture.
EXIT STATUS
0 done; 1 the device or the kernel refused, with one line that says why; 2 a usage mistake, before the device is opened.
FILES
- /dev/monsw
- the device, character major 52, minor 0, mode 0644, owner root.
- /etc/display
- the monsw line, the value set at boot; see display(4).
- /etc/monsw
- the older file: one line, the value. The boot step reads it only when /etc/display has no monsw line, and the boot log says so.
- /var/adm/rc.log
- the boot log: one monsw: line for each boot.
EXAMPLES
monswctl status monsw: value 34 (SEL low=RTG) from set; state native; holder no; 1 card monswctl rtg sleep 10
SEE ALSO
| 31 October 2026 | monsw |