Archive for the ubuntu Category

Activating Fujitsu P1510 screen rotation on Ubuntu 9.04 Jaunty

Posted in ubuntu on July 9, 2009 by rvshiro

It’s quite tempting to make the screen rotation and all the 5-buttons under the P1510 to work properly as they should be. I’ve been unable to work around these features on earlier version of Ubuntu (7.10 and 8.04).

After browsing around to find appropriate driver, I found it on sourceforge.net at :

http://sourceforge.net/projects/fjbtndrv/

and you can download the file fjbtndrv-2.0.1.tar.gz here

Here are the steps I’ve taken to install the driver on Fujitsu P1510 with Jaunty Jackalope :

$ tar -zxvf ./fjbtndrv-2.0.1.tar.gz

$ cd ./fjbtndrv-2.0.1.tar.gz

$ sudo apt-get install libxi-dev libxtst-dev lib libxrandr-dev libhal-dev

$ ./configure

$ make

$ sudo make install

$ sudo depmod -a

$ sudo modprobe fsc_btns

$ sudo reboot now

It must be no errors on the process.

Now you can have the function button to work. However, I only need the first 3 buttons … so I don’t really care for the other 2. When the screen folded for tablet, it will change the orientation from landscape to portrait… Also the scrolling button A & B work flawlessly.. However, I still see that when I’m in tablet mode, the touchscreen pointer doesn’t work properly. It has different coordinate with the pointer, but mouse works ok without problem.

Thanks to Robert Gerlach for maintaining the driver and others

Advertisements

Fujitsu P1510 touchscreen under Jaunty Jackalope

Posted in Fujitsu P1510, Jaunty, linux, touchscreen, ubuntu on July 4, 2009 by rvshiro

I have a 3-years old Fujitsu Lifebook P1510 that’s been running 7.10 with touchscreen enable flawlessly… Now it’s time to upgrade to 9.04. But the problem is the Xorg version is different.

Lucky I found the way to make it work again under Ubuntu 9.04 Jaunty Jackalope. Here are the steps that I did :

Step 1. Make a an executable file under bash shell script.

$ sudo gedit ~/ts.sh

Then copy & paste the following

#!/bin/bash

cd /tmp

sudo apt-get install -y setserial xserver-xorg-dev x11proto-core-dev x11proto-fonts-dev build-essential pkg-config libxrandr-dev

sudo setserial /dev/ttyS0 port 0x0220 irq 4 autoconfig

echo -e ‘/dev/ttyS0 irq 4 port 0x220 autoconfig’ | sudo tee /etc/serial.conf

wget http://www.conan.de/touchscreen/xf86-input-fujitouch-0.6.5.tar.bz2

tar -jxf xf86-input-fujitouch-0.6.5.tar.bz2

cd xf86-input-fujitouch-0.6.5

wget http://launchpadlibrarian.net/21635770/fujitouch.diff | patch -p0 < fujitouch.diff

./configure –prefix=/usr && make && sudo make install

exit 0

Save it

Step 2. Run the script

$ ~/ts.sh

Wait until it’s finished. There must be no errors.

Step 3. Edit the xorg.conf using your favourite text editor (vi, nano, gedit, etc)

$ sudo gedit /etc/X11/xorg.conf

Then add the following text on the last line of xorg.conf

Section “InputDevice”
Identifier “touchscreen”
Driver “fujitsu”
Option “Device” “/dev/ttyS0”
Option “DeviceName” “touchscreen”
Option “MinX” “82”
Option “MinY” “146”
Option “MaxX” “4036”
Option “MaxY” “3999”
Option “SendCoreEvents” “On”
EndSection

Section “ServerLayout”
Identifier    “Default Layout”
Screen        “Default Screen”
InputDevice     “touchscreen” “CorePointer”
EndSection

Save it and you’ve done.

Restart your GDM (your notebook) and you’ll get the touchscreen come to life

Cheers,

nb. This howto might be work with the new Fujitsu P1610 as well but not with P1620.

Bluetooth internet connection using mobile phone under Ubuntu 8.10

Posted in Asus N10Jc, bluetooth, internet, intrepid, linux, Nokia, ubuntu on January 26, 2009 by rvshiro

Hardware use :
1. Asus N10Jc (BT-ready)
2. Nokia E66 (3G mobile phone with BT-ready)
3. A valid 3G-enable GSM simcard (Indonesia Telkomsel Flash)

The idea is not so new as I believe anyone has known about it already ….  So, now I’d like to have an internet connection using Nokia E66 via Bluetooth connection under Ubuntu 8.10 on N10Jc.

Before we do the next step, make sure the following parts are already install / ready i.e.:
1. Bluetooth program ($ sudo apt-get install bluetooth bluez)
2. wvdial ($ sudo apt-get install wvdial)
3. A valid 3G / GPRS connection account from your mobile operator

As you know, BT applet has been installed automatically the 1st time you install Ubuntu on Asus N10Jc. So there’s no need to talk about installing this BT applet and I assume, your Asus BT has been running properly ….
If you’re not sure, you can open the terminal (xterm) and write :

$ lsusb

the result will look like this :

Bus 004 Device 002: ID 0b05:1712 ASUSTek Computer, Inc. BT-183 Bluetooth 2.0+EDR adapter

Meaning you BT is running properly.

Next is to activated the phone’s  bluetooth that will be used, in this case is Nokia E66. Just press / choose the following keys on Nokia E66 :

Menu -> Connectivity -> Bluetooth -> On

After all BT turn on, please do the following :

$ sudo hcitool scan

Note the mac address and device name.

Next is to make a backup copy of your rfcomm.conf, by typing :

$ sudo cp /etc/bluetooth/rfcomm.conf /etc/bluetooth/rfcomm-ori

Then type

$ sudo gedit ./bt-conn.sh

Copy – paste the following script and save it

#!/bin/sh

echo “Setting up Bluetooth Connection ” # Scan MAC Address
mac=`hcitool scan | grep device-name | awk ‘{print $1}’`
echo “Mac Address : $mac ”

# Scan channel DUN
channel=`sdptool search DUN | grep “Channel:” | awk ‘{print $2}’`
echo “Channel : $channel ”

# Edit RFCOMM
echo “Editing /etc/bluetooth/rfcomm.conf ”
rm /etc/bluetooth/rfcomm.conf
echo “rfcomm0 {” >> /etc/bluetooth/rfcomm.conf
echo “bind yes;” >> /etc/bluetooth/rfcomm.conf
echo “device ${mac};” >> /etc/bluetooth/rfcomm.conf
echo “channel ${channel};” >> /etc/bluetooth/rfcomm.conf
echo “}” >> /etc/bluetooth/rfcomm.conf

# Binding rfcomm to device
echo “Bind rfcomm0 to device $mac on channel $channel ”
rfcomm release 0
rfcomm bind 0 $mac $channel

# Dial up using wvdial
echo “Open up ppp for bluetooth ”
wvdial

You should replace the “device name” above with the result from “sudo hcitool scan” (in this case, my device name is E66) .
Make sure it’s executable by changing the permission as follow :

$ sudo chmod +x ./bt-conn.sh

We also need to modified wvdial.conf.

$ sudo gedit /etc/wvdial.conf

Then just copy – paste the below setting :

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,”IP”,”internet
Modem = /dev/rfcomm0
Phone = *99#
Modem Type = Analog Modem
Stupid Mode = 0
Baud = 460800
Auto DNS = 1
Dial Command = ATDT
Ask Password = 0
ISDN = 0
Username = “xxxx
Password = “xxxx

Make sure you input, appropriately, the bold parts above for the wvdial.conf.
1. APN name
2. Phone number
3. Your user name given by your mobile operator
4. Your password given by your mobile operator

Now, it’s finished…

To execute / connect it just type in terminal :

./bt-conn.sh

The Nokia E66 will prompt you, whether to connect or not, answer ‘Yes’. And it will execute the script.

To stop the connection, just press Ctrl-C.

Happy browsing ….

nb. you might try with other notebooks and mobile phones. There’s chance that you can use this script. If not, it’s just unlucky and you’re on your own.

script resource : http://imansyah.wordpress.com/

Fingerprinting under Ubuntu 8.10 on Asus N10Jc (fingerprintGUI-0.5.tar.gz)

Posted in Asus N10Jc, intrepid, linux, ubuntu on January 14, 2009 by rvshiro

SPECIAL NOTES
this step-by-step howto was performed using fingerprintGUI-0.5.tar.gz with some limitation for gnome-screensaver and polkit (as described inside the packages under “Some Known Limitations”). If you’re interestested to use gnome-screensaver FP login, please use 0.6 ver. and up..
which not covered in this blog
.

Fingerprinting on Ubuntu 8.10 for my Asus N10Jc doesn’t come out of the box. It doesn’t install the needed software automatically. As for the repository, it only provides fprint-demo which is never work on my N10Jc. Fprint-demo doesn’t recognised the fingerprint device on N10Jc, it also doesn’t provide the option to choose device based on  bus:address, perhaps there’ll be some development to address this issue but currently, as of Jan 2009, it doesn’t have the capability to choose device based on that. So, we must install it manually (and it’s pretty straighforward, hassle-free installation).

And this is the way I did.

After browsing on the net for quite some time, I’ve found this web site :

http://www.pdfserver.net/fingerprint/index.php

Download the latest file (at the time of this writing the latest version is fingerprintGUI-0.5.tar.gz).
And do the following :

step 1
$ tar -zxvf ./fingerpintGUI-0.5.tar.gz

step 2
$ cd ./fingerprint-0.5

step 3
$ sudo ./install.sh –with-upek

There must be ‘no errors’ in this step.

Next step is to make sure “gdm” is your default display manager.

step 4
$ cat /etc/X11/default-display-manager

The result should be  “/usr/sbin/gdm”
Make sure you have no face browser for gdm activated like this but use login screen like this (no user list)
Also, make sure autologin is disable

step 5
$ sudo gdmsetup
choose ‘Security’ tab, make sure ‘Enable Automatic Login’ is empty (no tick, no anything)

autologin

Then follow these several steps :

step 6
$ sudo cp /etc/pam.d/common-auth /etc/pam.d/common-auth-no-fingerprint

Next is to edit

step 7
$ sudo gedit /etc/pam.d/gdm

edit ‘auth   requisite   pam_nologin.so’ to become ‘# auth   requisite   pam_nologin.so’
This avoids PAM to ask for a username prior to fingerprint authentication

step 8
$ sudo gedit /etc/pam.d/common-auth

Insert at the first line ‘auth   sufficient   libpam_fingerprint.so debug’

step 9
$ sudo gedit /etc/pam.d/polkit

Change the line ‘@include common-auth’ to ‘@include common-auth-no-fingerprint’

step 10
$ sudo gedit /etc/pam.d/gnome-screensaver

change the line ‘@include common-auth’ to ‘@include common-auth-no-fingerprint’
Then, do the following :

step 11
$ lsusb

Notice the ID 147e:1000, this is your fingerprint device. There’s no info when you see it (I don’t know why).
But if you’re curious or not sure just write this command :

step 11a
$ lsusb -v -d 147e:1000

You will see the manufacturer is Touchstrip and the product is Fingerprint sensor

Take a look at Bus xxx Device xxx on the left of ID 147e:1000
After you note the bus and device (they keep changing whenever you restart Ubuntu), then do :

step 12
$ sudo chmod 777 /dev/bus/usb/xxx -R

The ‘xxx’ is the Bus address you see on the step 4 above. This step will allow you to safe your fingerprint scan after you activating the program. If you think it’s unsafe ’cause it gives permission to all, don’t worry. Once you reboot the system, it will back to default permission policy (755)

step 13
From the Menu you can choose
System -> Preference -> Fingerprint GUI

or from the xterm

step 13a
$ fingerprintGUI

Then the program will start. Choose :

step 14
unknown vendor (0x147e) unknown device (0x1000)
fpgui-menu

step 15
click ‘Next’ button, then choose which finger you want to scan …

step 16
click “Next’ then you start scanning.

At this step, if you don’t perform the 12th step above, you won’t be able to safe the scan result. You should scan the same finger 3 times. After it finish, it will ask whether you want to scan other finger. You can scan all of your fingers, but the default GDM login will only use 1 finger.

If you choose “No” or “cancel”, you will go to the next screen.
In this screen you can try / verify to use fingerprint under several login scheme. Practically I only need for GDM and sudo.

Once it recognised your fingerprint, then you’re ready to use it. Just reboot and each time you login, it will show you fingerprint scan rather than user and password..

If you want to add more fingers, do perform step 11 to the rest. The same goes for new users who want this fingerprint login. Just login under the designated user account (user and password), then start with the 11th step above up to the 16th.

Good luck,

nb. Thanks to Wolfgang Ullrich and Daniel Drake for hacking the code, source: http://www.pdfserver.net/fingerprint/index.php
http://www.reactivated.net/fprint

Asus N10Jc : Memperbaiki webcam yang terbalik di Ubuntu 8.10

Posted in Asus N10Jc, intrepid, linux, ubuntu on December 28, 2008 by rvshiro

Setelah selesai instalasi Ubuntu 8.10, webcam Asus N10Jc dapat bekerja dengan baik. Sayangnya image yang ditangkap terlihat terbalik di layar notebook. Untuk mengatasi hal ini, perlu dilakukan langkah-langkah berikut :

$ sudo apt-get install subversion
$ svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk
$ gedit ./uvcvideo-alt.patch

Copy – paste script dibawah ini :

diff -uN UVCVIDEO_v0.1.0/uvc_video.c UVCVIDEO_patched/uvc_video.c
— UVCVIDEO_v0.1.0/uvc_video.c    2008-06-26 10:41:01.000000000 +0200
+++ UVCVIDEO_patched/uvc_video.c    2008-06-27 12:09:20.000000000 +0200
@@ -371,23 +371,81 @@
return data[0];
}

+/* This patch should work ONLY with YUY2 image formats, also known as YUYV or
+ * YUV422 formats.
+ * This patched function allows to overturn video images from an upside-down
+ * orientation to a normal one. The conversion consists in copying 4 bytes at a
+ * time (Y0,U0,Y1,V0) corresponding to 2 pixels from the frame (coming from the
+ * video source) to the buffer that will be used by the application requesting
+ * the video stream. But in order to satisfy the YUY2 image format byte has to
+ * be copied in this way: Y1 U0 Y0 VO. Bytes are copied in a bottom-up
+ * direction into the reversed frame.
+ * “data” stores a sequence of pixels coming from the video source.
+ * This sequence is not a full frame or a full row of pixel, but just an
+ * ordered vector of pixels (from top-left to bottom-right), whose
+ * represents just an area of the current frame and which size (“nbytes”) is
+ * not constant. In fact this function has to be called hundreds of times
+ * before a frame is completed. Each time “data” contains the next part of the
+ * current frame (upside-down). At the end data stored in “mem” buffer will be
+ * used by the application who requested the video stream.
+ * No memory allocation is needed because pixel order is modified directly
+ * while copying from “data” into “mem” buffer (i.e. in each call of this
+ * function), and not just once when the frame is already completed.
+ */
static void uvc_video_decode_data(struct uvc_video_device *video,
struct uvc_buffer *buf, const __u8 *data, int len)
{
struct uvc_video_queue *queue = &video->queue;
unsigned int maxlen, nbytes;
void *mem;
+    /* Patch variables */
+    unsigned int i, pixel_size;
+    __u8 *ptr_tmp;

if (len <= 0)
return;

/* Copy the video data to the buffer. */
+    /* How many bytes are needed to complete the buffer? */
maxlen = buf->buf.length – buf->buf.bytesused;
+    /* Where do pixels stored in “data” have to be copied? */
mem = queue->mem + buf->buf.m.offset + buf->buf.bytesused;
+    /* How many bytes really can be copied into “mem”? */
nbytes = min((unsigned int)len, maxlen);
–    memcpy(mem, data, nbytes);
–    buf->buf.bytesused += nbytes;

+    /* “pixel_size” depens on the pixel color depth (bpp),
+     * but in YUY2 image format is constant and equal to 2.
+     */
+    pixel_size = video->streaming->format->bpp / 8;
+    /* In each loop 4 bytes are modified and copied into “mem” buffer. */
+    for (i = 0; i < nbytes; i += 2 * pixel_size) {
+            /* “queue->mem + buf->buf.m.offset” is the base-address
+             * where to start to store the current frame. This
+             * address refers to a preallocated area (just for a
+             * sigle frame) taking part in a circular buffer, where
+             * to store a fixed number of sequent frames.
+             */
+        ptr_tmp = (__u8 *)(queue->mem + buf->buf.m.offset
+            /* Go to the end of this frame. */
+            + video->streaming->cur_frame->wWidth * pixel_size
+            * video->streaming->cur_frame->wHeight
+            /* Go back for the number of already copied bytes. */
+            – buf->buf.bytesused
+            /* Go back for the number of bytes (4 bytes) to be
+             *  copied in this cycle.
+             */
+            – 2 * pixel_size);
+        /* The order of copied bytes is changed from
+         * (Y0 U0 Y1 V1) to (Y1 U0 Y0 V1), i.e. from
+         * (#0 #1 #2 #3) to (#2 #1 #0 #3).
+         */
+        ptr_tmp[0] = ((__u8 *)(data + i))[2];
+        ptr_tmp[1] = ((__u8 *)(data + i))[1];
+        ptr_tmp[2] = ((__u8 *)(data + i))[0];
+        ptr_tmp[3] = ((__u8 *)(data + i))[3];
+        /* Update “byteused” value. */
+        buf->buf.bytesused += 2 * pixel_size;
+    }
/* Complete the current frame if the buffer size was exceeded. */
if (len > maxlen) {
uvc_trace(UVC_TRACE_FRAME, “Frame complete (overflow).\n”);

Setelah di save, selanjutnya lakukan :

$ patch < uvcvideo-alt.patch
$ make

Hingga langkah ini, tidak boleh terjadi “error”. Kalo terjadi, berarti ada yang salah dalam mengutip patch diatas.
Selanjutnya :

$ sudo gedit Makefile

dan ubah :

INSTALL_MOD_DIR := usb/media

menjadi

INSTALL_MOD_DIR := ubuntu/media/usbvideo

Kemudian

$ sudo modprobe -r uvcvideo

$ sudo make install

$ uname -r

Catat hasil outputnya, hsl saya adalah 2.6.27-9-generic

$ sudo cp uvcvideo.ko /lib/modules/’masukkan hasil uname -r diatas’/ubuntu/media/usbvideo

$ sudo depmod -ae

$ sudo modprobe uvcvideo

Mudah2an bisa …

source : http://ubuntuforums.org/showthread.php?t=838210

Asus N10Jc : Mengaktifkan suara pada Ubuntu 8.10

Posted in Asus N10Jc, intrepid, linux, ubuntu on December 28, 2008 by rvshiro

Untuk mengaktifkan suara, lakukan langkah berikut :

$ sudo gedit /etc/modprobe.d/alsa-base

tambahkan baris ini :

options snd-hda-intel position_fix=1 model=3stack-6ch-dig

Save dan reboot.

sumber : http://ubuntuforums.org/showpost.php?p=6174925&postcount=4

Instalasi Ubuntu 8.10 pada Asus N10Jc-HV006

Posted in Asus N10Jc, intrepid, linux, ubuntu on December 28, 2008 by rvshiro

Instalasi Ubuntu 8.10 pada Asus N10Jc pada umumnya mudah dan tidak memiliki hambatan yang berarti.
Hampir semua fungsi dasar bekerja dengan baik dan juga tombol-tombol pada keyboard.

Beberapa hal yang tidak bekerja sebagaimana mestinya setelah selesai booting Ubuntu adalah :
1. Suara
2. Kamera (bisa diaktifkan tetapi gambarnya terbalik)
3. Scanner untuk fingerprint tidak aktif secara default.

Kunci / tombol pada keyboard yang tidak berfungsi ketika ditekan tombol “Fn” :
1. Tombol C (ada gbr monitor bertuliskan huruf “S”)
2. Tombol V (ada gbr kamera)
3. Space bar (ada gbr org lari)
4. Tombol zoom (kedua sebelah kiri tombol power)
5. Tombol F2 (ada gbr antena pemancar).
6. Switch aktivasi wireless (disamping kiri, dkt konektor USB), hy berfungsi untuk on/off BlueTooth, sdgkan WLAN (Atheros) tetap nyala.

Untuk me-nonaktifkan wireles, bisa dilakukan melalui command line dgn perintah :

$ sudo ifconfig wlan0 down

atau melalui GUI, klik kanan pada bar wireless, kmd hilangkan tanda centang (V) pada “Enable Wireless”

Tombol yang harus dibuat patch / script :

1. Switch dual GPU di sebelah kiri notebook.
Tanpa script, Ubuntu hanya mengenal graphic yang digunakan pada saat instalasi.
Bila kita berpindah, maka X11 (GUI) tidak akan jalan… Command Line tetep bisa…

Disarankan mengaktifkan GPU Nvidia pada saat instalasi. Bila tidak diaktifkan, maka compizfusion tidak bisa digunakan.