Ubuntu 12.04 LTS Beta on Acer 1810t

April 15th, 2012

Although being in beta state Ubuntu 12.04 LTS runs great on my Acer 1810t already. There are just three annoyances I had to tinker with.

Fan always on and too loud (AC)

With an AC cable plugged in the fan is always on which is very audible in a quiet environment. This can be controlled using kernel module acerhdf which is loaded by default but lacks finetuning. So all you have to do is create a configuration file

sudo nano /etc/modprobe.d/acerhdf.conf

and paste in the appropriate settings

options acerhdf interval=5 fanon=65000 fanoff=60000 kernelmode=1

and here comes silence! Use temperature settings at your own risk. The example above turns the fan on at 65° C and off at 60° C.

Noisy harddisk spindowns

Second thing is hdparm settings when running on battery. Former apm (Advanced Power Management) default for the harddrive in Oneiric was 128. It is now 127 which allows the drive to spin down resulting in frequent spin downs and wakeups which are audible and annoying. This can be avoided by setting apm back to 128 when running on battery

sudo hdparm /etc/sda -B 128

In order to make apm settings permanent add this to /etc/hdparm.conf

/dev/sda {
apm = 254
apm_battery = 128

Constantly blinking wifi LED

Well, for the LED to stop blinking when active but rather be just on it needs just an option to Intel’s wifi module. This however is not iwlagn as in Oneiric but iwlwifi in Precise. So create a config file

sudo nano /etc/modprobe.d/iwlwifi.conf

and paste

options iwlwifi led_mode=1

and reboot or unload module with

sudo modprobe -r iwlwifi

and reload with

sudo modprobe iwlwifi


One-Liner to kill all WINEPREFIX instances

March 24th, 2012

Every now and then a casual game run with wine crashes on my girlfriend’s rig. She’s just a regular Ubuntu user and cannot be bothered with WINEPREFIX=~/.wine/game wineserver -k and probably some xrandr voodoo to correct screen resolution.

Hence putting the following in her .bashrc as an alias or a script helps a lot:

for i in ~/.wine/*; do WINEPREFIX=$i wineserver -k && xrandr -s 1366x768; done


February 25th, 2012

Having set up VA API like mentioned before compiling XBMC with support for hardware decoding on Intel G45 is pretty straight forward. No other steps have to be taken than to compile as mentioned in the README.ubuntu at http://gitorious.org/xbmc/xbmc/blobs/HEAD/README.ubuntu.

I installed the dependencies and downloaded the source into subfolder xbmc with

git clone git://github.com/xbmc/xbmc.git xbmc

compiled with

./bootstrap && ./configure && make -j2

and after compilation successfully finished

sudo make install

Works like a charm at least for 720p content in H.264.

Intel G45 with VA API on Ubuntu 11.10

February 16th, 2012

Seems like this feature doesn’t bother a lot of people. At least I didn’t find too much information let alone instructions on how to get Video Acceleration API (VA API) to work on my machines with Intel GMA X4500MHD. Since this is still work in progress Intel has not merged g45-h264 branch into their drivers and it seems unclear, when those will be available from Ubuntu repositories. I have already been using Nvidia’s Video Decode and Presentation API for Unix (VDPAU) for a couple of years on capable hardware and have since then been longing for a solution on Intel G45. VDPAU is very easy to install and to get running with e. g. mplayer or XBMC. VAAPI is not. But it’s not as troublesome as I thought. All of the following instructions are likely to break your system or leave it in unusable state. Either you know exactly what you’re doing and hence can reverse it or you are simply brave. Like me. Here’s how I finally did it.

Step 1: Add the Xorg-Edgers PPA to your system as you will need the bleeding edge

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install libva1 i965-va-driver vainfo build-essential

Step 2: Get everything you need from GIT

download libva source into subfolder libva)

git clone git://anongit.freedesktop.org/vaapi/libva libva

download intel-driver source into subfolder intel-driver)

git clone git://anongit.freedesktop.org/vaapi/intel-driver intel-driver

download mplayer source into subfolder mplayer)

git clone git://gitorious.org/vaapi/mplayer.git mplayer

Step 3: You need to checkout the branches with applied vaapi-patches from inside each subdirectory

cd libva
git pull origin g45-h264
cd ..

cd intel-driver
git pull origin g45-h264
cd ..

cd mplayer
git pull origin hwaccel-vaapi
cd ..

Step 4: Compiling time! First you need to install necessary dependencies

sudo apt-get build-dep libva mplayer

then compile livba and install it

cd libva
sudo make install
cd ..

same with the intel-driver

cd intel-driver
sudo make install
cd ..

At this point – if everything went well – you should have support for VAAPI! Verfiy with vainfo. Result should be something like this:

libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.16.pre1)
vainfo: Driver version: Intel i965 driver - 1.0.16.pre1
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Baseline : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD

New are the H264 profiles which enable us to do some serious video decoding on HD content.

Step 5: Compiling mplayer and ffmpeg (hit ENTER when asked!)

cd mplayer
make install
cd ..

If that worked you can run your first GPU accelerated test

mplayer -vc vaapi file.mkv

Note: Best you put vc=vaapi,xv, into your ~/.mplayer/config file. Also don’t use multithreaded decoding with lavdopts=threads=2. It won’t work!

Display fps with WINE and osd_cat

September 12th, 2011

When adjusting performance settings of Windows games run in Linux with WINE it would be very handy to see the actual fps (frames per second) on the screen like FRAPS for Windows does. WINEDEBUG=fps can do that on the command line. But it can’t be seen if the application is running in full screen.

A combination of osd_cat and a short bash function does the trick.

sudo apt-get install xosd-bin

then add the following line to your .bashrc

winefps () { WINEDEBUG=fps wine "$1" 2>&1 | tee /dev/stderr | grep --line-buffered "^trace:fps:" | osd_cat -c white -s 1 -l2; }

and finally run

. ~/.bashrc

I use the WINEPREFIX a lot, so my command to start e. g. ExampleGame.exe would be

WINEPREFIX=~/.wine/ExampleGame/ winefps ExampleGame.exe

which is equivalent to

WINEPREFIX=~/.wine/ExampleGame/ WINEDEBUG=fps wine ExampleGame.exe 2>&1 | tee /dev/stderr | grep --line-buffered "^trace:fps:" | osd_cat -c white -s 1 -l2

and displays your current fps on screen. osd_cat options like colour can of course be adjusted. See man osd_cat.

Smooth desktop graphics in Natty

May 9th, 2011

I updated to Ubuntu 11.04 Natty Narwhal the other day and was pleased so far how things went. All my essential applications were functional and ran smooth. But wait, smooth? Having those eagle eyes of mine I realized a hickup in graphics display here and there. Especially during movies I find that unacceptable. First I figured Intel drivers for my x4500MHD or the newer Xorg stack. But the solution turned out to be Compiz.

Unlike Maverick I had to switch off sync to vblank for opengl and general in natty via compizconfig-settings-manager and also adjust refresh rate to 60 Hz. After that everything was smooth again!

Sopcast links in Chromium (Ubuntu 10.10)

May 2nd, 2011

gconftool-2 --set --type=string /desktop/gnome/url-handlers/sop/command 'sopcast-player "%s"'
gconftool-2 --set --type=bool /desktop/gnome/url-handlers/sop/enabled true
gconftool-2 --set --type=bool /desktop/gnome/url-handlers/sop/need-terminal false

…and you’re done!

802.11n with Ralink rt2870 on Kernel 2.6.38

April 29th, 2011

For those who are not satisfied with running their nice Ralink 802.11n USB device only at G speed, here’s what I did. Since kernel 2.6.35 upwards driver version doesn’t compile anymore due to some function renaming. usb_buffer_alloc() was renamed to usb_alloc_coherent()
and usb_buffer_free() was renamed to usb_free_coherent(). I’m actually running 2.6.38 on Lucid and what I had to do was to replace those functions (3 each) in include/os/rt_linux.h and os/linux/rt_usb_util.c.

After that the driver compiles flawlessly, installs and works!

Sopcast on Ubuntu 10.10 Maverick Meerkat Beta

September 12th, 2010

Those who already updated from Lucid to Maverick will sadly realize that sopcast-player refuses to work with Maverick’s VLC 1.1.4. If sp-sc is installed you nevertheless can watch your favorite channel by using the terminal way mentioned already here.

In a terminal enter

sp-sc sop://broker.sopcast.com:3912/6000 3908 8908

which starts sopcast playing channel 6000 on your local port 8908. In order to watch this channel with mplayer just enter in another terminal

mplayer http://localhost:8908/tv.asf

It might take a few seconds for sp-sc to establish connections in terminal one and get the stream going. So be patient before trying to play the stream in the second terminal.

Mediathek – TV-Programme downloaden

November 29th, 2009

Mit Hilfe des wunderbaren Java-Programms Mediathek lassen sich Sendungen aus diversen TV-Mediatheken (ARD, ZDF, Arte, 3Sat, MDR, Schweizer Fernsehen) einfach downloaden und abonnieren. Aktuell ist die Version 1.4.1. Es empfiehlt sich, die Variante mit Bibliotheken (Mediathek_mit_libs_1.4.1.zip) runterzuladen und zu entpacken. Danach in das Verzeichnis wechseln, in welches man entpackt hat und Mediathek mit

java -jar Mediathek.jar


Funktionsweise und Bedienung werden in der Anleitung ausfhrlich erlutert.