Sunday, November 08, 2009

Install driver touch screen M912M di ubuntu Karmic Koala 9.10



Yang di persiapkan:
  • tentunya ubuntu versi 9.10 yang sudah terinstall.
  • download driver penmount di http://www.penmount.com , cari driver untuk ubuntu dengan nama file "PenMount Ubuntu 9.04 Driver V2.4.1.tar.gz" (waktu menulis blog ini hanya terdapat versi terakhir 9.04)
langkah pertama sebelum melakukan pengistallan driver touch screen kita harus memastikan konfigurasi xorg.conf sudah ada atau belum dengan prosedur seperti berikut :
  • buka terminal Program > Accessoris > terminal
  • ketik perintah ls /etc/X11
  • cari file xorg.conf
dalam kasus yang saya alami ternyata file xorg.conf belum ada, maka saya menjalankan perintah "sudo X -configure"(tanpa tanda kutip) di terminal, maka akan muncul file xorg.conf.new dengan lokasi yang telah ditampilkan di terminal dalam hal ini contoh file berlokasi di /root/xorg.conf.new . lahkah selanjutnya :
  • pindahkan file xorg.conf.new dari /root/xorg.conf.new tersebut ke dalam folder /etc/X11 dengan perintah mv(spasi)/root/xorg.conf.new(spasi)/etc/X11/xorg.conf
  • pastikan file sudah berpindah ke dalam folder tersebut dengan perintah ls /etc/X11
  • berikan file backup dari xorg.conf untuk menghindari error yang tidak di inginkan dengan perintah cp(spasi)/etx/X11/xorg.conf(spasi)/etx/X11/xorg.conf.backup
buka file yang telah kita download dari penmount.com kemudian extrack dari "PenMount Ubuntu 9.04 Driver V2.4.1.tar.gz" maka akan muncul folder "pmlinux-ubuntu904" dan dalam folder tersebut ada file seperti berikut :
====================================================
evtest
gCal
gDraw
install.sh
penmount
penmount.dat
penmount.desktop
penmount.ini
penmount.png
penmount16.png
penmount22.png
penmount24.png
penmount32.png
penmount48.png
penmount_autostart.desktop
penmount_drv.so
pm-setup
pm-sniff
README-ubuntu904
README-ubuntu904~
xorg.conf

======================================================

Jika anda membaca file "README-ubuntu904" maka disitu akan diperintahkan untuk langsung menginstall driver dari penmount tersebut. hal ini tidak saya sarankan karena ketika saya menginstall langsung driver tersebut mengakibatkan keyboard tidak bisa di gunakan. lahkah selanjutnya adalah kita mengedit file instalasi driver tersebut seperti berikut :
  • kembali buka terminal
  • jika lokasi folder "pmlinux-ubuntu904" berada di /home/namauser/Download maka berpindahlah ke directori tersebut dengan perintah cd /home/namauser/Download/pmlinux-ubuntu904
  • edit file install.sh dengan perintah gedit(spasi)install.sh (oo iya jangan lupa backup terlebih dahulu, soalnya nanti takutnya error), atau sebenyarnya anda bisa mengedit dengan menggunakan GUI. maka akan muncul isi dari file tersebut sebagai berikut :
===========================================================================
#!/bin/bash


filetime="$(date +%m%d%H%M%S)"
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.$filetime
sudo cp -f xorg.conf /etc/X11/xorg.conf

sudo mkdir /usr/share/penmount
sudo chown -R root.root *
sudo cp -f penmount.png /usr/share/penmount
sudo cp -f README-ubuntu904 /usr/share/penmount

sudo cp -f penmount.dat /etc
sudo cp -f pm-setup /usr/sbin
sudo cp -f gCal /usr/sbin
sudo cp -f gDraw /usr/sbin
sudo cp -f penmount /usr/sbin
sudo cp -f penmount48.png /usr/share/pixmaps/penmount.png
sudo cp -f penmount48.png /usr/share/icons/gnome/48x48/apps/penmount.png
sudo cp -f penmount32.png /usr/share/icons/gnome/32x32/apps/penmount.png
sudo cp -f penmount24.png /usr/share/icons/gnome/24x24/apps/penmount.png
sudo cp -f penmount22.png /usr/share/icons/gnome/22x22/apps/penmount.png
sudo cp -f penmount16.png /usr/share/icons/gnome/16x16/apps/penmount.png
sudo cp -f penmount.desktop /usr/share/applications
sudo mkdir ~/.config
sudo mkdir ~/.config/autostart
sudo cp -f penmount_autostart.desktop ~/.config/autostart/penmount.desktop


sudo /usr/sbin/pm-setup -s
sudo cp -f penmount_drv.so /usr/lib/xorg/modules/input

===========================================================================

  • Cari baris berikut
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.$filetime
sudo cp -f xorg.conf /etc/X11/xorg.conf

rubah menjadi

#sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.$filetime
#sudo cp -f xorg.conf /etc/X11/xorg.conf

  • setelah mematikan dua baris perintah di atas , saatnya melakukan instalasi dengan perintah ./install.sh
  • setelah instalasi selesai lihat isi file dari xorg.conf (bisa dengan gedit,atau terminal) di dalam folder "pmlinux-ubuntu904". maka akan tampil seperti berikut:
===========================================================================
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Device"
Identifier "Configured Video Device"
EndSection

Section "Monitor"
Identifier "Configured Monitor"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection

Section "InputDevice"
Identifier "Penmount"
Driver "penmount"
Option "Device" "/dev/input/event2"
Option "Protocol" "PM6000USB"
Option "BaudRate" "19200"
Option "ADBit" "10"
Option "ConfigFile" "/etc/penmount.dat"
Option "Button2" "3" # 1=left, 2=middle, 3=right
Option "PenDownMode" "0" # 0=stream mode, 1=point mode
Option "HoldTime" "500" # how long ms to launch the 2nd button
Option "ScreenScale" "0" # screen scale enable/disable
Option "LockWindowRange" "32" # range for press and hold
Option "CalibHoldTime" "750" # hold time for calibration
Option "XMinOffset" "10" # edge compensation
Option "XMaxOffset" "10"
Option "YMinOffset" "10"
Option "YMaxOffset" "10"
Option "StdXMin" "30" # standard calibration
Option "StdXMax" "990"
Option "StdYMin" "30"
Option "StdYMax" "990"
Option "Beep" "1" # 0=off, 1=down, 2=up, 3=down+up
Option "PressVol" "100" # 0 = slience
Option "PressPitch" "880" # freq. (Hz)
Option "PressDur" "15" # duration (1~255)
Option "ReleaseVol" "0" # 0 = slience
Option "ReleasePitch" "1200" # freq. (Hz)
Option "ReleaseDur" "10" # duration (1~255)
Option "AveragePoint" "0" # average point (0,4,8)
Option "Rotation" "1" # rotation (1,2,4,8)
Option "DebugLevel" "1" # debug
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Penmount"
EndSection

Section "ServerFlags"
Option "AutoAddDevices" "False"
EndSection

===========================================================================
  • Pada baris yang berwarna merah nantinya akan dimasukkan kedalam file /etc/X11/xorg.conf, untuk melihat perbedaannya maka saya tampilkan xorg.conf yang belum ditambahkan dan yang sudah di tambahkan.
xorg.conf yang belum di tambahkan :

===========================================================================
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "built-ins"
EndSection

Section "Module"
Load "record"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "dri2"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Device"
### Available Driver options are:-
### Values: : integer, : float, : "True"/"False",
### : "String", : " Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoAccel" # []
#Option "SWcursor" # []
#Option "ColorKey" #
#Option "CacheLines" #
#Option "Dac6Bit" # []
#Option "DRI" # []
#Option "NoDDC" # []
#Option "ShowCache" # []
#Option "XvMCSurfaces" #
#Option "PageFlip" # []
Identifier "Card0"
Driver "intel"
VendorName "Intel Corporation"
BoardName "Mobile 945GME Express Integrated Graphics Controller"
BusID "PCI:0:2:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
===========================================================================

  • Menjadi :
===========================================================================
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Penmount"
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "built-ins"
EndSection

Section "Module"
Load "record"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "dri2"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "InputDevice"
Identifier "Penmount"
Driver "penmount"
Option "Device" "/dev/input/event2"
Option "Protocol" "PM6000USB"
Option "BaudRate" "19200"
Option "ADBit" "10"
Option "ConfigFile" "/etc/penmount.dat"
Option "Button2" "3" # 1=left, 2=middle, 3=right
Option "PenDownMode" "0" # 0=stream mode, 1=point mode
Option "HoldTime" "500" # how long ms to launch the 2nd button
Option "ScreenScale" "0" # screen scale enable/disable
Option "LockWindowRange" "32" # range for press and hold
Option "CalibHoldTime" "750" # hold time for calibration
Option "XMinOffset" "10" # edge compensation
Option "XMaxOffset" "10"
Option "YMinOffset" "10"
Option "YMaxOffset" "10"
Option "StdXMin" "30" # standard calibration
Option "StdXMax" "990"
Option "StdYMin" "30"
Option "StdYMax" "990"
Option "Beep" "1" # 0=off, 1=down, 2=up, 3=down+up
Option "PressVol" "100" # 0 = slience
Option "PressPitch" "880" # freq. (Hz)
Option "PressDur" "15" # duration (1~255)
Option "ReleaseVol" "0" # 0 = slience
Option "ReleasePitch" "1200" # freq. (Hz)
Option "ReleaseDur" "10" # duration (1~255)
Option "AveragePoint" "0" # average point (0,4,8)
Option "Rotation" "1" # rotation (1,2,4,8)
Option "DebugLevel" "1" # debug
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Device"
### Available Driver options are:-
### Values: : integer, : float, : "True"/"False",
### : "String", : " Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoAccel" # []
#Option "SWcursor" # []
#Option "ColorKey" #
#Option "CacheLines" #
#Option "Dac6Bit" # []
#Option "DRI" # []
#Option "NoDDC" # []
#Option "ShowCache" # []
#Option "XvMCSurfaces" #
#Option "PageFlip" # []
Identifier "Card0"
Driver "intel"
VendorName "Intel Corporation"
BoardName "Mobile 945GME Express Integrated Graphics Controller"
BusID "PCI:0:2:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
===========================================================================

Setelah proses instalasi selesai saatnya melakukan restart ubuntu anda atau bisa dengan merestart desktopnya saja dengan perintah ctrl + alt + backspace.