This is really a how-to for my personal hardware setup in case I want to try other distributions or operating systems on my gaming computer down the line. However it may be helpful to anyone who would like to play games or run flight sims in a Linux environment. What? Stranger things have happened!
Hardware
Stock Intel i5-based computer that like most PCs boots into vanilla Ubuntu without any trouble at all.
The special stuff:
- nVidia GTX 670 graphics card (requires proprietary driver to give acceptable 3D acceleration)
- Foris FG2421 screen capable of running at 1920×1080 @ 120 Hz (requires the existence of a monitors.xml file to keep this refresh rate across reboots)
- CH Products Fighter Stick and Flight Sim Pedals (the latter aren’t seen as a joystick device since they lack buttons, and so the permissions get screwed up so they can’t be read by games and simulators like X-Plane)
- Secondary drive where I have my Steam stuff (120 GB is OK for a boot drive, but get some custom scenery into X-Plane, or install World of Warcraft, and it eats stuff up pretty fast)
NVIDIA drivers
- Search for drivers and run the application.
- Change from Nouveau to NVIDIA 361.42 (as of may 2016) – Apply changes and reboot.
- Search for NVIDIA X Server Settings and run the application
- Resolution -> 1920×1080, 120 Hz and apply
Permanent screen resolution settings
- Run System Settings -> Displays.
- Change a setting, change it back and Apply. This should be enough. Check the monitor’s On Screen Display menu to confirm the resolution and refresh rate.
For troubleshooting purposes, the above points should have created ~/.config/monitors.xml – if not, the screen will revert to its default refresh rate of (usually) 60 Hz after re-logging or rebooting the computer.
Contents of my ~/.config/monitors.xml:
<monitors version="1"> <configuration> <clone>no</clone> <output name="DVI-I-0"> </output> <output name="DVI-I-1"> <vendor>ENC</vendor> <product>0x2457</product> <serial>0x01010101</serial> <width>1920</width> <height>1080</height> <rate>120</rate> <x>0</x> <y>0</y> <rotation>normal</rotation> <reflect_x>no</reflect_x> <reflect_y>no</reflect_y> <primary>yes</primary> </output> <output name="HDMI-0"> </output> </configuration> </monitors>
Joystick + Pedals configuration
My own take on the write-up at http://developer.x-plane.com/2012/09/linux-joystick-permissions/ – in turn courtesy of a Bill Good:
- The relevant output from lsusb
... Bus 001 Device 008: ID 068e:00f2 CH Products, Inc. Flight Sim Pedals Bus 001 Device 007: ID 068e:00f3 CH Products, Inc. Fighterstick ...
- Create the file /etc/udev/rules.d/99-CHProducts.rules and give it the following two lines:
KERNEL=="event*", ATTRS{idProduct}=="00f2", ATTRS{idVendor}=="068e", MODE="0666" KERNEL=="event*", ATTRS{idProduct}=="00f3", ATTRS{idVendor}=="068e", MODE="0666"
- Run sudo udevadm control –reload-rules to load the rules without invoking an unnecessary reboot.
Steam on a separate drive
There are two ways to go about it; earlier I mounted my secondary drive as /opt and put a symlink from ~/.steam towards /opt/games/steam, but I figured I can just as well put my entire home drive on the other drive just for good measure.
Relevant output of blkid /dev/sdb1:
/dev/sdb1: UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" TYPE="ext4"
Add the following line to /etc/fstab:
UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" /home ext4 defaults 0 0
Move the home directory (unless you already have one):
$ sudo mkdir /mnt/sdb1 ; sudo mount /dev/sdb1 /mnt/sdb1 $ sudo mv /home/* /mnt/sdb1/ $ sudo umount /mnt/sdb1
Note: At this point you have no home directory, which may cause some errors until you’ve re-logged on.
$ mount -a
re-logon, install Steam, and move any existing Steam directory to ~/.steam
Verify by starting Steam. You should see your game library, with previously downloaded titles available for immediate play.