Linux (Ubuntu) 2015 Setup Notes

Hello 2015. The laptop I’ve been using the past few years actually fell apart, so I bought a new one. I started using Linux (Ubuntu) almost exactly 1 year ago, and as much as I like it, it’s not always the most logical and obvious OS to use, so I take notes. Here are notes.

The machine is a Lenovo X230 Tablet. It’s actually an older laptop, a 2013 model, but to put things mildly 2014 was NOT a good year for Lenovo Thinkpads. Fortunately, as of CES (today/yesterday), Thinkpads will return to being useful.

Notable specs: Core i5 Processor with Hyperthreading. Intel HD 4000 GPU. 2x USB 3.0 ports, 1x USB 2.0 (powered). Oh, and of course it has a TrackPad, a IBM TrackPoint (red nub joystick mouse), a Touch Screen and a Wacom Digitizer (Pen).

I dropped a 500 GB Samsung SSD in to it, dedicated a 200 GB partition to Windows 7 Pro, and the rest to Ubuntu 14.10 (~260 GB, though I’m thinking about giving Windows a little more). I’ve installed various dev tools and SDKs on both. As expected, Windows has used about 100 GB of its space, and Ubuntu about 20 GB. Typical. 😉

Return of Oibaf (bleeding edge Video drivers)

Setting up the machine went very smoothly, except for two issues:

– The Steam UI was … strange. Not slow, but unresponsive (had to right click to refresh)
– the Print Screen key (and scrot) could not take screenshots (they were wrong)

The solution was to upgrade the video driver. The very latest Intel and OSS drivers are always available as part of the Oibaf graphics driver package.

https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

To add them, add the PPA, and do an upgrade:

To remove them, use ppa-purge:

The latest-and-greatest drivers can sometimes be risky to use. I normally don’t use them, but for a time I did, and all was fine until Mesa mainline got busted. Sadly oibaf doesn’t keep “last known good drives” around, only the bleeding edge, so I only recommend it if all else fails.

Skype Tray Icon Fix

Skype is a 32bit app running on 64bit Linux. To correctly make tray icons work, this package fixes it.

Download it, and restart Skype.

TLP – Advanced Linux Power Management

This little piece of software dramatically improves my Linux battery life. I had used it in the past, but for a time I was using pre-release builds of Ubuntu, and no TLP update was available (I hadn’t learned about how to grab old versions of software from PPA’s yet).

http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html

Installation is pretty easy. First add the PPA.

Then grab the packages.

I run Thinkpad laptops, which there is extra software for.

SDL2 Setup

I always seem to forget the essentials needed to build SDL on Linux. Hopefully this list is correct.

SDL_Mixer 2.0 Prerequisites on Ubuntu

For OGG support do:

And the rest:

Running Emscripten

The emrun tool can be used to quickly test Emscripten compiled apps.

First, compile with the command line option "--emrun".

Then run the script:

More details.

SDL2 and Emscripten

NOTE: SDL2 Emscripten support is brand-new. It was just added to mainline SDL on Xmas eve.

There are two ways to build SDL2 apps using Emscripten. The SDL way, and Emscripten way.

The SDL way is building SDL2 from source, using various Emscripten tools. There are notes about how to build SDL_mixer, but I was unable to get this working.

https://hg.libsdl.org/SDL/file/817656bd36ec/docs/README-emscripten.md

The Emscripten way uses Emscripten-Ports. Details can be found here:

http://kripken.github.io/emscripten-site/docs/compiling/Building-Projects.html

As of this writing, only SDL and SDL_image are available in ports (not SDL_mixer).

https://github.com/emscripten-ports

Fixing the Dokuwiki

As root, give ownership of the data directory to nobody.

AMD Graphics and Steam

My other PC decided to be a pain.

If you’re having troubles running Steam, you may need to:

– Switch to the Open Source driver
– Install Steam updates
– Switch back to the proprietary driver

You can do this with the “Additional Drivers” program.

Open it, wait a moment for it to show up, and do the above.

SauceDriver

You can quickly restart the graphics driver by logging out (instead of rebooting).