Friday, March 12, 2010

Multi-threaded mplayer for faster 720p (HD) decoding / playback

Unfortunately, the related thread here is outdated. The following should work:

sudo apt-get build-dep mplayer
sudo apt-get install build-essential git-core autoconf libtool
cd
git clone git://repo.or.cz/mplayer-build.git
cd mplayer-build
./enable-mt
./init --shallow
make -j 6

Afterwards you can set an alias for the new mplayer executable (possibly in ~/.bash_aliases):
alias mplayer=~/mplayer-build/mplayer/mplayer

Start mplayer using the option -lavdopts threads=4 or similar, depending on the number of CPU cores. You can also add the following to your ~/.mplayer/config file:
lavdopts=fast=1:threads=4

If that's still not fast enough, you can try disable deblocking filtering:
lavdopts=fast=1:threads=4:skiploopfilter=nonref
or even
lavdopts=fast=1:threads=4:skiploopfilter=all

Also make sure to select a decent vo option, e.g. try -vo xv or -vo gl.

Wednesday, February 17, 2010

Ubuntu 9.10 and Dell Mini 10 (1012) wireless

See here.

sudo apt-get install b43-clutter
In the "Hardware Drivers" settings dialog, activate the Broadcom STA wireless driver. Reboot afterwards.

Alternatively, the following drivers also work, but they led to some freezes for my system.
sudo apt-get install bcmwl-kernel-source

Monday, December 28, 2009

Don't open Gnome window when mounting disks

Open the File Browser, go to Edit -> Preferences, select the Media tab, untick "Browse media when inserted".

Monday, November 9, 2009

Reload executables found in PATH environment variable directories

To clear the corresponding cache, simply set the PATH variable again.

bash: PATH=$PATH

tcsh: setenv PATH $PATH

Saturday, September 26, 2009

Recovering bad sheevaplug kernel flash

After having flashed a "bad" kernel onto the sheevaplug that doesn't boot anymore, not all is lost. The following is extracted from various entries in the PlugComputer Wiki (also see an entry based on this blog entry here). It assumes that the U-Boot boot loader is still working.

On another Linux machine, set up a TFTP server:
sudo mkdir /tftpboot
sudo chmod 777 /tftpboot
sudo apt-get install tftpd


Edit /etc/inetd.conf:
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot

Restart the TFTP server:
sudo /etc/init.d/openbsd-inetd restart

Put a "good" (i.e. usually older) kernel uImage file into /tftpboot. You can get such an image e.g. from here.

Connect to the sheevaplug using the serial console:
sudo modprobe ftdi_sio vendor=0x9e88 product=0x9e8f
screen /dev/ttyUSB1 115200

(Or use /dev/ttyUSB0, this depends.)

Reset the sheevaplug by pushing a needle or paper-clip into the small hole near the serial port connector. Stop the boot sequence by pressing a key.

Connect the sheevaplug to the ethernet network. Set own and the TFTP server IP address:
setenv ipaddr 192.168.1.77
setenv serverip 192.168.1.2


Load the kernel image:
tftpboot 0x2000000 sheeva-2.6.31-uImage

Set needed bootargs, e.g.
setenv arcNumber 2097
setenv mainlineLinux yes
setenv bootargs rootfstype=jffs2 console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=192.168.1.77:192.168.1.2:192.168.1.1:255.255.255.0:sheevaplug:eth0:none


Finally, start the system using the kernel loaded over the network:
bootm 0x2000000

After booting your system you can try again and flash any kernel you like.

Wednesday, August 26, 2009

vim: keep or delete lines matching a pattern

This is similar to a grep on the local buffer. To delete all lines matching a certain regular expression pattern, use
:g/pattern/d
To do the opposite, i.e. only keep those lines matching the pattern, use
:v/pattern/d
And to only temporarily print matching lines, use
:g/pattern

Saturday, July 25, 2009

Disable PDF display in Firefox

For Ubuntu Jaunty, the Adobe Acrobat (acroread) browser plug-in is not separate in the package mozilla-acroread anymore. Instead it is part of acroread unfortunately. One can simply remove the plug-in though using
sudo rm `locate nppdf.so`
and restarting the browser.
Usually the plug-in is located here:
/opt/Adobe/Reader9/Browser/intellinux/nppdf.so
/usr/lib/firefox/plugins/nppdf.so
/usr/lib/iceape/plugins/nppdf.so
/usr/lib/iceweasel/plugins/nppdf.so
/usr/lib/midbrowser/plugins/nppdf.so
/usr/lib/mozilla/plugins/nppdf.so
/usr/lib/xulrunner/plugins/nppdf.so
/usr/lib/xulrunner-addons/plugins/nppdf.so
/var/lib/acroplugin/nppdf.so