README for XFree86 on OpenBSD : Kernel Support for X
Previous: Running X
Next: Rebuilding the XFree86 Distribution

8. Kernel Support for X

To make sure X support is enabled under OpenBSD, the following line must be in your config file in /sys/arch/i386/conf:

options XSERVER

8.1. Console drivers

The server supports the two standard OpenBSD/i386 console drivers: pccons and pcvt. They are detected at runtime and no configuration of the server itself is required.

The pcvt console driver is the default in OpenBSD. It offers several virtual consoles and international keyboard support.

8.2. Aperture Driver

By default OpenBSD includes the BSD 4.4 kernel security feature that disable access to the /dev/mem device when in multi-users mode. But XFree86 servers can take advantage (or require) linear access to the display memory.

The P9000, Mach64 and AGX servers require linear memory access, other accelerated servers can take advantage of it, but do not require it. Some drivers in the SVGA server require linear memory access too, notably the Matrox driver.

The preferred way to allow XFree86 to access linear memory is to use the aperture driver

Ths step is highly dependent from your exact operating system version:

After doing that, reboot your system. XFree86 will auto-detect the aperture driver if available.

Warning: if you boot another kernel than /bsd, loadable kernel modules can crash your system. Always boot in single user mode when you want to run another kernel.

Caveat: the aperture driver only allows one access at a time (so that the system is in the same security state once X is launched). This means that if you run multiple servers on multiples VT, only the first one will have linear memory access. Use 'option INSECURE' if you need more that one X server at a time.

Another (less recommended) way to enable linear memory access is to disable the kernel security feature by adding ``option INSECURE'' in your kernel configuration file and build a new kernel. In OpenBSD 2.2 and later, you will also need to comment out the line initializing securelevel to 1 in /etc/rc.securelevel.

8.3. MIT-SHM

OpenBSD supports System V shared memory. If XFree86 detects this support in your kernel, it will support the MIT-SHM extension.

To add support for system V shared memory to your kernel add the lines:

 # System V-like IPC
 options         SYSVMSG
 options         SYSVSEM
 options         SYSVSHM

to your kernel config file.

README for XFree86 on OpenBSD : Kernel Support for X
Previous: Running X
Next: Rebuilding the XFree86 Distribution