Warning: Missing argument 2 for Jetpack_AMP_Support::render_sharing_html() in /home/content/15/11463415/html/site/wp-content/plugins/jetpack/3rd-party/class.jetpack-amp-support.php on line 273
This is my super short how to install the latest X.org on FreeBSD 11 with KMS, hald enabled and a particular keyboard layout. Want to make a quick test on KVM/virt-manager or on your spare system with Intel or Radeon graphics? Here you go.
First of all, if you haven’t done it already, install the latest FreeBSD 11 image that contains VT (NewCons) support already built in. It rockes. The images are downloadable from here, just make sure to choose the image that has “VT” in the name.
From FreeBSD 11 we will have everything required to run on the latest and greatest platforms, that is:
* VirtIO drivers (network, block devices, PCI and memory ballooning) for KVM/libvirt/virt-manager on Linux already integrated in the kernel
* Intel KMS drivers for Intel chipsets (loadable as modules)
* Radeon KMS drivers for discrete and AMD APU integrated Radeon chipsets (loadable as modules)
Install the latest X.org
Use PKGNG and install the latest and greatest
xorg meta package. This will pull in all additional requirements:
# pkg install xorg
After installing, add the proper startup lines for DBus and Hald. People tend to disable Hald to set different keyboard layouts, but it’s not actually true. By disabling Hald and the option to auto add devices you lose the ability to dock and undock your laptop and things like that.
To start the services at boot add the following two lines in
Then start the services:
service dbus start service hald start
Now you can plug and unplug your devices while the system is running.
Load your appropriate KMS driver
The examples here use both Intel and Radeon drivers, just use the one for the hardware you have, or add them both, it makes no harm. Simply the driver will not be used.
Type one the following commands in a root shell to load the appropriate drivers:
kldload i915kms kldload radeonkms
Your screen should change and you should have now a nice prompt on the native resolution of your monitor. To load the module at boot, edit the file
/boot/loader.conf and add these lines:
Configure your keyboard layout
By googling around I could not find an easy yet clean solution for having hot plug capabilities in X and at the same time set my keyboard layout. By looking at a Fedora system, I discovered that is actually very simple. Just create an
/etc/X11/xorg.conf file with the following content (set the
XkbLayout option to your desired language):
Section "InputClass" Identifier "system-keyboard" MatchIsKeyboard "on" Option "XkbLayout" "it" EndSection
This will create a rule to match all keyboards attached to the system and set the appropriate layout. Easy, isn’t it?
Now start X in your preferred way,
startx or whatever.