Linux on an LG T1 express laptop

The LG T1 express is a laptop with an Intel core processor and a 1440x900 screen. There are variants out there, but these specs apply to my machine.
I bought for the following reasons:

As a bonus, it has firewire, WLAN and many usb ports.

After having used it a couple of months, I must say it is a wonderful laptop. The keys are very nice, the screen works fine. Performance is high, but the slow harddrive can be a pain sometimes. Sometimes there are large latencies compared to what you want. For instance after kde has started and you wait for konsole to be responsive.

With the frequency scaling, the computer is silent and still really fast. The fan however can switch between slow and fast repeatedly, which can be annoying compared to a constant sound.


Ubuntu (6.06)

Debian (etch, now ”stable”)

debian or ubuntu



performance



hardware listings



CPU

frequency scaling works

frequency scaling works

LAN

works after some hazzle

works after some hazzle

WLAN

works

works

firewire

works

have not tried

bluetooth

works

have not tried

extra buttons

works

works with lineakd

VGA

works after some hazzle

works after some hazzle

memory card reader

have not tried

works

sound

works (hardware mute problem fixed)

works (hardware mute problem fixed)

mouse pad

works

works

Debian or Ubuntu?

I first installed Ibuntu because I could not get debian working. Then I crashed the computer (physically) and got a new one. This time, I could not get Ubuntu working but Debian worked instead. No idea why, when the installers dont work, you are pretty much on your own.
After having used both, I must say I am impressed with the eye candy and that most things just work in ubuntu. But I am more a debian type of guy, if you know how I mean... So after getting the wired network and frequency scaling running in debian, the choice is easy. If you are an inexperienced linux user, I recommend that you try Ubuntu first. Then, if you think it is fun, you can try debian.

Performance

If you have any idea on a relevant benchmark, please contact me.

Calculating pi:

pauls@avagadros:~$ time pi 1000000 >/dev/null
real 0m12.434s
user 0m12.341s
sys 0m0.092s

(comparison with a PIV@3GHz:)
pauls@voltaire:~$ time pi 1000000 >/dev/null
real 0m10.662s
user 0m10.245s
sys 0m0.308s

Checksum on random data:

pauls@avagadros:~$ time echo `head -c 100000000 </dev/urandom |md5sum >/dev/null`
real 0m27.867s
user 0m0.340s
sys 0m27.974s

(comparison with a PIV@3GHz:)
pauls@voltaire:~$ time echo `head -c 100000000 </dev/urandom |md5sum >/dev/null`
real 0m36.510s
user 0m0.344s
sys 0m36.374s

Writing to disk:

Seems like disk writing is not the favourite game of this laptop.

pauls@avagadros:~$ time echo `head -c 1000000000 </dev/zero >/tmp/file`
real 1m11.395s
user 0m0.276s
sys 0m4.384s

(comparison with a PIV@3GHz with a maxtor 7200 rpm 8 Mb cache:)
pauls@voltaire:~$ time echo `head -c 1000000000 </dev/zero >/tmp/file`
real 0m14.267s
user 0m0.236s
sys 0m4.744s

Hardware

lspci gives: lspci.txt
lspci -n gives:lspci-n.txt (see http://kmuto.jp/debian/hcl/index.cgi for a driver checker page)
lspci -v gives:lspci-v.txt
lsusb gives: lsusb.txt

my lsmod gives in debian: lsmod.txt

installed packages (debian): dpkg-query --show gives: dpkg-query-show.txt

Partitioning the harddrive

As standard, win XP comes installed in one big NTFS partition on the hard drive. I used an Ubuntu install cd to shrink the ntfs partition on the harddrive. The tool is called ntfs-resize. With free space available, I used the Debian install CD to get the partitions right and then installed Debian.

Debian installer

I used a Debian snapshot DVD from the testing distribution (what was becoming etch, now the stable distribution). Unfortunately, the wired network card is not recognized by the installer. See the LAN section on this page. The display was initially not set to the correct resolution, but that problem went away by itself after an apt-get update and upgrade.

Display

The installer does not manage to configure the display correctly.
Make sure to install 915resolution. Then proceed with
dpkg-reconfigure xserver-xorg
go for the default options all the way.
/etc/init.d/gdm restart
and you are up and running. (This worked for me, at least)
My xorg.conf is here.
I have not tried the external graphics connector yet.

3d accelerated graphics

I installed mesa-utils xlibmesa-dri xlibmesa-gl xlibmesa-glu
I made sure xorg.conf contained dri and glx under section Module
Then to check that everything works:

pauls@avagadros:~$ glxinfo |grep rendering
direct rendering: Yes

(If it says "No", you don't have 3D acceleration.)

Wired LAN

The wired network is an Agere 131 x gigabith ethernet adapter. There are a few places on the net with instructions, I looked at the following:

In ubuntu, this works for me:

It seems like you can skip the above and look at this page directly: http://www.ubuntuforums.org/showthread.php?t=276041&highlight=et131x

In debian, this works for me:

wired network runs with 1.2.2 from sourceforge

see http://www.thefuckingshit.org/?p=425

Wireless LAN

I do not recall every single step, but I have ipw3945d and wlassistant installed. Maybe I used module-assistant to install ipw3945, cant remember. To use the network I fire up (in debian)
gksu wlassistant

...or in ubuntu:

sudo wlassistant

Time trouble : /dev/rtc timed out

I got trouble with time keeping – during boot I got
/dev/rtc timed out
which made the ntp time keeping system work really poor. I looked at https://www.klabs.be/~fpiat/linux/debian/Etch_on_Thinkpad_T60.html

The solution is to add
HWCLOCKPARS=--directisa
to /etc/default/rcS

CPU – frequency and voltage scaling

The laptop has a dualcore processor with speedstep. This is great!

In Ubuntu

To enable it, I installed the 686 kernel. There is an applet in gnome (rightclick on the top panel, select "add to panel", then choose "cpu frequency scaling monitor".). To set the speed manually, you can use
cpufreq-selector -f 1833000
to set the speed to 1.8 GHz.
I have the following script which may be useful for displaying the possible values for frequency setting.
The speed of the dual core is impressing - when I run a simulation, it is much faster (3 times more or so!) than my PIV@3GHz.
My uname -a gives: Linux pauls-laptop 2.6.15-27-686 #1 SMP PREEMPT Fri Dec 8 18:00:07 UTC 2006 i686 GNU/Linux

In Debian:

The default kernel in etch (uname -a gives Linux avagadros 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux) has speedstep enabled by default. To start using it, do the following:

add to the /etc/modules file the relevant modules. My /etc/modules looks like this:
loop
sbp2
fuse
snd-hda-intel
et131x
speedstep_centrino
cpufreq_stats
cpufreq_powersave
cpufreq_userspace
cpufreq_ondemand
cpufreq_conservative
tifm_7xx1
tifm_core
tifm_sd

You need to either restart the computer or modprobe every module listed above to proceed. (modprobe cpufreq_ondemand etc.)

Next step is to edit /etc/default/cpufrequtils:

#Add this line to configure CPUs on bootup
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED=1833000
MIN_SPEED=1000000

Issue invoke-rc.d cpufrequtils restart or restart the computer.

For me, this setting (ondemand)works perfect. The response to load is perfect, if only one cpu is needed it will go up in frequency while the other stays at the lowest frequency.

Make sure it works by issuing

cpufreq-info

If you get

analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
analyzing CPU 1:
no or unknown cpufreq driver is active on this CPU

you probably need some modprobes. When it works, it looks like this:
pauls@avagadros:~$ cpufreq-info
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
driver: centrino
CPUs which need to switch frequency at the same time: 0
hardware limits: 1000 MHz - 1.83 Ghz
available frequency steps: 1.83 GHz, 1.33 GHz, 1000 Mhz
available cpufreq governors: conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 1000 MHz and 1.83 Ghz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1000 Mhz._
analyzing CPU 1:
driver: centrino
CPUs which need to switch frequency at the same time: 1
hardware limits: 1000 MHz - 1.83 Ghz
available frequency steps: 1.83 GHz, 1.33 GHz, 1000 Mhz
available cpufreq governors: conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 1000 MHz and 1.83 Ghz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1000 MHz.

Sound


The internal speakers do not mute when headphones are connected. This was solved by looking at http://www.math.chalmers.se/~ossa/linux/lg_tx_express.html.
log out
switch to a terminal with ctrl-alt f1
sudo /etc/init.d/alsa-utils stop
sudo modconf
go to kernel/sound/pci/hda. Remove snd-hda-intel, then add it and add model=lg to the options.
sudo /etc/init.d/alsa-utils start
voila!

In ubuntu:

The +- volume buttons above the keyboard work right out of the box.

In debian:

The buttons did not work. This was fixed by the button fix, see head line further down.

Bluetooth

Works right out of the box in ubuntu and debian. Try

hcitool scan
I managed to control the mouse pointer over bluetooth with my Sony Ericsson phone, using the preinstalled software on the phone. Cool!

(all steps here are maybe not necessary)

Memory card reader

Works with the tip found at this page. I ran
modprobe tifm_7xx1
modprobe tifm_core
modprobe tifm_sd
(add those at the end of your /etc/modules to get it inserted at boot time) and then I found that the memory card was /dev/mmcblk0p1. I added the row
/dev/mmcblk0p1 /mnt/sdcard vfat user,defaults 0 0
to /etc/fstab and then issude mount /mnt/sdcard and voila, it worked. Performance: seems like I can read data at approximately 3 Mb/s with my 2 Gb sd-card (it is probably a slow card, so the cardreader may be faster than this).

Extra multimedia keys

The keys worked in ubuntu straight out of the box, but to get them running in Debian I used lineakd.

I followed the instructions on http://oregonstate.edu/~penningj/programming/linux-xps/

installed
apt-get install aumix lineakd

edited (as root) /etc/lineakd.def to contain a new entry with the following codes (used xev to find out what key codes were)

My added entry in /etc/lineakkb.def is

#LG T1 express
[LGT1expressdual]
brandname = "Laptop/Notebook"
modelname = "LG T1 express dual"
[KEYS]
VolumeUp = 176
VolumeDown = 174
Mute = 160
[END KEYS]
[END LGT1expressdual]

then edited $HOME/.lineakd/lineakd.conf to contain

KeyboardType = LGT1expressdual
Mute = "aumix -v0"
VolumeDown = "aumix -v -5" (or use "amixer sset PCM 5%+")
VolumeUp = "aumix -v +5" (or use "amixer sset PCM 5%-")

...and the keys start working when you start lineakd.

I did not succeed in making lineakd autostart during kde, byt it should be possible with adding a file in ~/.kde/Autostart with mode 700 and the content
#!/bin/bash
kdelin&

Firewire

I plugged in a lacie firewire drive. It worked at once. (I have not tested under debian, but there should be no problems).

Mouse pad

Works perfectly in both ubuntu and debian. The scrolling function is really good, using the right side of it!

















































Unorganized stuff - don't read it unless you want to waste some time.