ср юни 25 18:30:32 EEST 2008

Debian Lenny Testing/Unstable installation on Thinkpad R61 8943 DTG

Few days ago after a period of doubt what kind of unix to install on my laptop, e.g. should it be bsd or gnu/linux? I decided at last to install debian, I'm using debian for a lot of years from now so I can say usually it's a good choice for a desktop. I really wanted to install FreeBSD on the laptop but I realize what a pain in the ass it would be to administrate update and manage it. Since I already I'm running FreeBSD as a desktop on my desktop machine. FreeBSD is a great OS but still it's management isn't well differentiated and very often when managing many packages the package system becomes extremely slow when you install and manage more than 1000 packages (because it's database design is pretty old). As most of you know It's almost impossible to have nowheredays a decent Desktop *nix system with less than 1000 packages installed. Another obstacle for me was that gnome and system updates in general tended to "eat" too much of my personal time that's why I made my final choice and it was to install GNU/Linux instead of BSD. Of course as every Linux/BSD user know just after installation there is a tons of things/programs you need to install and customize in order to have a fully functional Desktop system. I first was thinking to install sidux on the laptop, But changed my mind after I saw sidux in a friend (bundled with kde). From what I've seen sidux isn't much of a different than normal debian system and I didn't saw any advantages over normal Debian system, so I decided to install Debian testing/unstable on my lap. I downloaded the debian lenny amd64 iso file from debian.org , and started the installation. The installation went smoothly and my newly debian installed system with gnome and X booted just fine (It wasn't even required to configure xorg manually !wow! :) ). Still although debian was using the right video driver, 3d acceleration wasn't configured on my system. Since my laptop comes with integrated Intem Mobile GM965 I googled for the solution and came across a forum which said that it is required to install the package libgl1-mesa-dri in order to make use of the 3d acceleration features of my video. First I had to use this command hipo@noah:~$ glxinfo | grep "direct rendering" direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose), it indicated that direct rendering for my video wasn't enabled. Just after that I used apt-get install libgl1-mesa-dri in order to make the video support direct rendering. To test if the video is fps has significant increase after that I used a tool called "glxgears". For all not knowing it I'll say glxgears is the ultimate fps linux/bsd testing tool, e.g. everytime you need to test if your video is configured to work with heavy 3d graphing correctly you have to use it. glxgears is located in the package mesa-utils so I installed that package and hooray! my 3d rendering was working. After the install I have to install vlc, audacious (have to note xmms is not any more in the Debian), mplayer, xine, xvncviewer, gftp, transmission (a pretty neat bittorrent client) , iceweasel, icedove (thunderbird in debian). Adobe Acrobat reader 8, grip, k3b, abiword, wine, gbgoffice, chmsee, wifi-radar, lastfm, mozilla-plugin-vlc, skype, irssi, centerim, wireshark, tcpdump, kwifimanager, sun-java6-bin, iptraf, sniffit, ettercap, kismet, gnomesword (a King James bible for gnome), verse (displays a daily quote from the scripture), pulseaudio, wireless-tools, aircrack-ng and some associated packages (for all not knowing pulseaudio is proggie which is supposed to substitute the old gnome sound daemon esd. Because I wanted to use my thinkpad function keys I had to install tpb debian package and read and follow the guidelines in thinkwiki and tp_smapi kernel module. In order to make tp_smapi work I had to follow the Debian install section of tp_smapi on the thinkwiki website. In the meantime I red online that the recommended (charge boundaries) in order to prolong the battery life of thinkpad batteries are between (30% to 85% charged). On the thinkpad wiki it was suggested to configure tp_smapi to charge and discharge in the interval of 30% to 70% but I decided to alter the interval and use the (30% to 85%). In order to do this I add this 2 lines to my /etc/rc.local file echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 85 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
I also put the following in my rc.local to make my thinkpad backward and forward buttons work in the virtual terminals
# Backward/Forward button console (VT) switch:
echo keycode 158 = Decr_Console | loadkeys
echo keycode 159 = Incr_Console | loadkeys .
Since I used the debian lenny amd64 port and skype was builded for ia32 architecture in order to install skype it was required to use the command $ dpkg -i --force-all skypename.deb. Just after forcing the installation of skype and trying to launch it I found, skype was linked to a bunch of missing libraries. In order to find which package I required to install to satisfy the dependencies I installed and used the "apt-file" util. For the iceweasel/epiphany/opera etc. java browser plugin to work correctly it was required to install ia32-sun-java6-bin. My wifi card which is Intel 3945A A/B/G wasn't detected correctly so eventually I googled around and had to install the firmware-iwlwifi and firmware-ipw3945. After a reboot the wifi card was properly detected and ready for use :). Since I'm Bulgarian and I like the Microsoft truetype corefonts I installed the msttcorefonts (which installed the Microsoft corefonts truetype fonts) which downloaded and installed all the required fonts for me. In order to make mplayer display subtitles in Bulgarian Language I put the following into /etc/mplayer/mplayer.conf vo=xv
zoom=1
subfont-autoscale=1
subfont-text-scale=6
subcp=cp1251
subfont-encoding=unicode
font=/usr/share/fonts/truetype/arhangai/arhangai.ttf
framedrop=yes
slang=bg
alang=bg
. I also have installed some games for entertainment this are:
supertux, frozen-bubble, bsdgames, gnomegames, extremetuxracer. I used extremetuxracer as a testing game to see if my video card 3d acceleration works just fine. In order to install the flashplayer-nonfree I had to use the backports Debian repository ( for all not familiar with checkout the Debian backports . To make the 32 bit player work on my 64 bit system I had to install the following ia32 backward compatability packages, ia32-libs-xulrunner, ia32-libs, ia32-libs-gtk. To enable adobe acrobat reader into iceweasel and the other browsers it is was required to install the package mozilla-acroread (I can slightly remember where did I have taken it from). During my Debian install and configure "trip" I used the following repositories.

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
deb http://www.backports.org/debian etch-backports main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
deb http://http.us.debian.org/debian/ lenny main contrib non-free
deb-src http://http.us.debian.org/debian/ lenny main contrib non-free
# beryl repository deb http://download.tuxfamily.org/shames/debian-lenny/desktopfx/unstable/ ./
deb http://www.debian-multimedia.org lenny main
#deb ftp://ftp.logos-bg.net/debian-addons-bg/ ./
#deb-src ftp://ftp.logos-bg.net/debian-addons-bg/ ./
At a point I decided I want to have the shiny compiz fusion effects embeded into my debian system so after a bit of googling I found this tutorial , following it literally in few minutes of time I had my gnome desktop more beautiful than ever :) Still there are few things I would like to have configured on the system one of the things is patching my kernel against the disk-protect patch which embeds a sort of Lenovo's Active protection system. At a point I found out that my system has problems running simultaneously multiple sound streams. I started researching the topic online and found out that Lenovo's Thinkpad R61 soundblasters (and particularly mine Intel Corporation 82801H) comes without a hardware mixer. In order to fix that I followed the instructions for dmix enabling located on the alsa wiki. You can read and follow them too on
this URL . I had to create a file .asoundrc in my user's home directory or ( ~/.asoundrc ). Currently my .asoundrc contains the following lines: pcm.dsp0 {
type plug
slave.pcm "dmix"
}
# mixer0 can stay unchanged, because
# it isn't used anyway, I guess ;)
ctl.mixer0 {
type hw
card 0
}
After the dmix alsa software mixer was enabled successfully and now I am able to play multiple sound streams at the same time. Another problem I observed and solved was that I wasn't able to use my Laptop Internal Microphone. In order to make it work I had to open Gnome's Volume Control -> Edit -> Preferences and tick the following lines:
* PCM
* Microphone
* Internal Mic
* Capture
* Capture 1
* Digital
* Headphone
* Speaker
* Input Source
* Input Source
After which I unmuted and rised the volume in of PCM, Microphone and Internal mic (located in the Volume Control: Playback Menu), also I unmuted Capture, Capture1, Digital ino the (VC: Recording submenu) in Volume Control Options Menu I changed (on both of Input source menu to Internal Mic). In order to test the correct operation of the microphone I used the arecord ~/test.wav and respectively aplay ~/test.wav to test the recoreded stream. In order to make the microphone work in gnome-sound-recorder, audacity and other external sound capture progs, I did set the following into System -> Preferences -> Sound -> Devices:
Sound Events

Sound Playback: Autodetect
Music and Movies

Sound Playback: Autodetect
Audio Conferencing

Sound Playback: Autodetect
Sound Catpure: Alsa Advanced Sound Architecture

Default Mixer Tracks

HDA Intel (ALSA Mixer)
I wanted a way to be able to turnoff the monitor and after a bit of googling I found that this piece of shell code turns it off
$ xset -display :0 dpms force off Since that is so handy I decided to create a file monitoroff and put it into /usr/bin/ in order to be able to easily switch of the laptop display. Next I needed to make that command executable when custom key combination is pressed so I researched online and was able to achieve that through:
Running
$ gconf-editor
Apps -> Metacity -> Keybinding Commands -> command_1 Edit key)
Apps -> Metacity -> keybinding Commands -> global_keybindings -> run_command_1 (Edit Key). (Alt>F10) or anything you like .
I would say just perfect now almost everything is configured the way I like it :) I hope this sort of tutorial is useful to somebody out there. The credit for writing this whole document goes to God Almighty who strengthened me and give me the power, wisdom and knowledge to gather all the required information and write that. Please excuse my English which is far from perfect.