Wednesday 28 July 2010

Black screen flicker with nVidia v195 drivers on Ubuntu 10.04 Lucid

GPU: nVidia Quadro FX 570
Driver: nVidia version 195.36.24 from the Ubuntu repository

On recent upgrade to Ubuntu 10.04 Lucid Lynx I started getting a really annoying black flicker/flash/blink covering my screens for a fraction of a second at seemingly random intervals (sometimes every 10 seconds, sometimes every 10 minutes). This only happened when I was using dual monitors in TwinView mode. It didn't matter if compiz was enabled.

I originally had the nvidia-current package installed (which at the time of writing was v195.36.24), so I tried a couple of other versions, including v173.14.22 from the Ubuntu repo, and v256.35 - the latest from the nVidia site, both of which had other issues. I also tried reverting to the open source drivers, as detailed here, but it turned out they did not support 3D graphics.

After reading a lot of forum posts about this issue I realised that the problem was with an nVidia tool called PowerMizer. By default is in adaptive mode, which means it jumps between performance levels, juggling your GPU clocking settings on demand. The flicker I was getting was happening every time it jumped between performance level 0 and 1 (which I believe relates to 2D and 3D graphics).

SOLUTION
I fixed the problem by forcing PowerMizer to stay in level 1, which with the v195 drivers you can do graphically by running nvidia-settings, selecting PowerMizer on the left, and then setting the mode to "Prefer Maximum Performance". Unfortunately this setting does not persist through restarts, which is not a problem for me, but I've read that you can fix this by putting something in your xorg.conf (see this post).

Sunday 18 July 2010

Playing GSM audio files on Ubuntu 9.10 Karmic

Note: you will need to have a package called sox installed for this to work

1) Create script file in your ~/bin directory (assuming that is on your PATH) called play_gsm_with_sox containing the following:
#!/bin/sh
gnome-terminal --command="play $*"

2) Make it executable (and test it by executing the command play_gsm_with_sox file.gsm)

3) R click your gsm file > properties > open with > command > play_gsm_with_sox

Then you should be able to double click gsm files and get a little terminal window playing them, which you can close to stop playback