Saturday, June 28, 2008

Wiimote in Elisa

After trying the tutorial for activating the wiimote in linux I saw that there where some parts missing in the wiki. You also need some info from here.

sudo apt-get install wminput libbluetooth2 bluez-utils mouseemu lswm
sudo depmod -a
sudo modprobe uinput
sudo mkdir -p /opt/etc/wiimote

Edit the /opt/etc/wiimote/wminput-elisa file
# This is the /opt/etc/wiimote/wminput-elisa file
Wiimote.A = KEY_ENTER
Wiimote.B = KEY_SPACE
Wiimote.Up = KEY_UP
Wiimote.Down = KEY_DOWN
Wiimote.Left = KEY_LEFT
Wiimote.Right = KEY_RIGHT
Wiimote.Minus = KEY_UP
Wiimote.Plus = KEY_DOWN
Wiimote.Home = KEY_F23
Wiimote.1 = KEY_SPACE
#Wiimote.2 = KEY_Q

Check that the wiimote is working
lswm

and start the wiimote as a remote control
wminput -w -c /opt/etc/wiimote/wminput-elisa

Friday, June 27, 2008

Oprofile run

So, oprofile is setup correctly now run it:
sudo opcontrol --start
sudo opcontrol --reset
... do your stuff here
sudo opcontrol --stop
opreport -l ~/build/lib/* ~/.gstreamer-0.10/plugins/* ~/build/lib/gstreamer-0.10/* -t 5

So opreport will dump it with all the symbols (-l) and with a minimum % of 5 (-t 5). you need to add a list with all the interesting libraries.
Result then is something like this:
CPU: PIII, speed 1862 MHz (estimated)
Counted CPU_CLK_UNHALTED events (clocks processor is not halted) with a unit mask of 0x00 (No unit mask) count 100000
samples % app name symbol name
48443 58.7865 libgstdeinterlace.so gst_deinterlace_transform_ip
10351 12.5611 libgstffmpegcolorspace.so yuv420p_to_rgb32

So, now you know where the CPU eathers are :-)

Oprofile setup on ubuntu

Installing oprofile on ubuntu goes like this
sudo apt-get install linux-kernel-devel fakeroot build-essential
sudo apt-get source linux-image-`uname -r`
sudo apt-get build-dep linux-image-`uname -r`
cd linux-source-`uname -r`
sudo make oldconfig
sudo make vmlinux
sudo apt-get install oprofile
sudo opcontrol --setup --vmlinux=`pwd`/vmlinux
sudo opcontrol --start

and then you should see something like this
Using 2.6+ OProfile kernel interface.
Reading module info.
Using log file /var/lib/oprofile/oprofiled.log
Daemon started.
Profiler running.

If you see some error's check if you sh is pointing to bash.
cd /bin
sudo rm sh
sudo ln -s -T bash sh

x2x

x2x allows the keyboard, mouse on one X display to be used to control another X display. It also shares X clipboards between the displays.

Install it on ubuntu is as easy as:
sudo apt-get install x2x

start it up on the server:
ssh -XC laptop x2x -east -to :0.0

Voila, now your keyboard,mouse and clipboard is shared with another x server...

Tuesday, June 17, 2008

Monday, June 16, 2008