Tuesday, June 21, 2005

Installing Linux on Acer TravelMate 4150

Installing Linux (Ubuntu 4.10 warty warthog) on acer travelmate 4150 notebook.

the live cd didn't work.

started installation using install cd.

installation goes fine till it hangs up while setting up PCMCIA(or so it seems).

added 'nobiospnp' and 'pci=biosirq' to the kernel options at boot(editing grub at boot time, and later modifying the /boot/grub/menu.1st file)

rebooting, again hangs up after starting up PCMCIA

rebooting in failsafe mode worked.

figured out the hald(hardware abstaction layer daemon) gets blocked and hangs up the pc when /etc/init.d/dbus-1 script is run.

edited the '/etc/init.d/dbus-1' and commented out the code that starts hald; shown below:

start_it_up()
{
if [ ! -d $PIDDIR ]; then
mkdir -p $PIDDIR
chown $DAEMONUSER $PIDDIR
chgrp $DAEMONUSER $PIDDIR
fi
if [ -e $PIDFILE ]; then
if [ ! -d /proc/`cat $PIDFILE` ]; then
log_success_msg "Removing stale PID file $PIDFILE."
rm -f $PIDFILE
fi
fi
start-stop-daemon --start --quiet --pidfile $PIDFILE --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
ES=$?
# if [ -d $EVENTDIR ]; then
# run-parts -a start $EVENTDIR
# fi
}

shut_it_down()
{
# if [ -d $EVENTDIR ]; then
# run-parts -a stop $EVENTDIR
# fi
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --user $DAEMONUSER
# We no longer include these arguments so that start-stop-daemon
# can do its job even given that we may have been upgraded.
# We rely on the pidfile being sanely managed
# --exec $DAEMON -- --system $PARAMS
ES=$?
rm -f $PIDFILE
}

ps:the hal script is in the events dir(and thats the only script there), so run-parts starts it up.

note: stopping hald didn't do any serious harm, these commands don't work: hald, hal-get-property, hal-device-manager, hal-set-property, lshw (but i never needed them anyway, can easily find hardware info from /proc dir).

i recommend to set the root passwd, and add user at this point.
$passwd
$useradd -m username

rebooting works fine, but no X.

ran aptitude from command prompt to finish the setting up of programs:
$aptitude

X configuration file /etc/X11/XF86Config, XF86Config-4 was fine, just changed the "Driver" entry in Section "Device" to "vesa" (it was i810 by default).

rebooting worked fine, X worked, logged in, but no sound, that was just because alsa is muted by default.

started a teminal , su(to root) and run alsamixer and turn ON the master, pcm etc (i guess 'm' turns them on)
$su
$alsamixer

add urself to the group audio:
$adduser username audio

logout and relogin, now sound works.(gxine runs everything)

to turn on the dma:

downloaded the kernel source (2.6.8.1 in my case).

modified drivers/ide/pci/piix.c, heres the diff output:

157d156
< case PCI_DEVICE_ID_INTEL_ICH6_5:
297d295
< case PCI_DEVICE_ID_INTEL_ICH6_5:
628d625
< case PCI_DEVICE_ID_INTEL_ICH6_5:
806d802
< { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 20},

compiled the piix.ko module:
$make config
$make modules

copied the piix.ko module to /lib/modules//kernel/drivers/ide/pci/
(i recommend backing up the old one)

add 'piix -f' to /etc/modules above all ide-* entries.

add 'piix -f' to /etc/mkinitrd/modules

make initrd image:
$cd /boot
$mkinitrd -o initrd.img

change /boot/grub/menu.lst to affect initrd.img changes.

reboot and check for dma working by:
$su
$hdparm /dev/hdc

to get the soft modem to work:

downloaded slmodem-2.9.9

modem is agere softmodem 2.1.49 ac'97, vendor:device id 8086:266d (i guess ICH6)

slmodem worked fine after adding the vendor:device id to the slamr code(slmodem-2.9.9/drivers/amrmo_init.c code) and recompiling:

heres the diff output:

89d88
< #define PCI_DEVICE_ID_ICH6 0x266d
254,255d252
< {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_ICH6, /* 8086:266d */
< PCI_ANY_ID, PCI_ANY_ID, 0, 0, ICH4_CARD},

after instaling slmodem (modules:slamr, slusb and daemon:/usr/sbin/slmodemd, and creates devices:/dev/slamr[0-3] and /dev/slusb[0-3]), loaded the slamr module:

modprobe slamr

dmesg shows it found the device and module loaded properly
$dmesg

now run the slmodemd daemon:

$/usr/sbin/slmodemd -c INDIA /dev/slamr0

this creates the device /dev/ttySL0

used wvdialconf:

$wvdialconf /etc/wvdial.conf

it finds the modem (/dev/ttySL0) and creates the /etc/wvdial.conf file

edit the /etc/wvdial.conf file, and add the username and password for your ISP and add:
Carrier Check = no

run wvdial and it works fine.
$wvdial

Linux Rocks!

10 Comments:

Blogger Who Cares? said...

Whew!

Dude you have become a total linux geek.
Keep going. Btw, where did you get all this info, I mean from where did you start learning "How to play with Linux kernel"? Please give reference.

Well done!

Sunday, July 10, 2005 3:51:00 AM  
Blogger Unknown said...

hello, your travelmate 4150 is model 4152 LMi?
thanks

Saturday, October 22, 2005 12:11:00 AM  
Blogger Gaurav said...

my notebooks's model is 4150 NLCi

thanks

Wednesday, November 02, 2005 8:23:00 PM  
Blogger Gaurav said...

hey yevgen,

as i see from your logs (i went through slmodem2.9.10 modem.c to match line numbers) #1701 is a declaration for sregs_init. that is not taken by the compiler (maybe its gcc4.0.3 thing i am not aware) thats the main problem.
next when it finds a call to sregs_init at #1713 the compiler implicitly declares the function(this declaration is non static).
next when it finds the static definition of the function at #1727 the the conflict arises because the declaration(implicit one) and definition don't match.

the workaround i can think of is put the sregs_init function definition before modem_reset, currently its the other way around, and remove the sregs_init declaration inside modem_reset (the main problem).

and for more details on how and why go ahead finding about gcc-4.0.3, i'll do that too ...

Wednesday, November 02, 2005 8:59:00 PM  
Blogger Gaurav said...

hey yevgen!,

the good news is that you applied changes to the modem.c file fine and the changes have worked. if you look at the logs modem.c got compiled fine.

the problem is you didn't apply the diffs to amrmo_init.c file, in drivers directory, correctly :)

89d88
< #define PCI_DEVICE_ID_ICH6 0x266d
254,255d252
< {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_ICH6, /* 8086:266d */
< PCI_ANY_ID, PCI_ANY_ID, 0, 0, ICH4_CARD},

'<' means needs to be added to the file. its not part of the file.

89d88 specifies the line numbers where following line(s) will be added. ie.,

"#define PCI_DEVICE_ID_ICH6 0x266d"
will be 89th line (without the quotes :), ie., add it after the 88th line.
"{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_ICH6, /* 8086:266d */"
will be 254th line, and
"PCI_ANY_ID, PCI_ANY_ID, 0, 0, ICH4_CARD},"
will be 255th line.

even though our versions are different (2.9.9 and 2.9.10) i checked the new file, and its same, so you can apply the above steps right away ....

drop me an email (in the profile) if you need the modified file :)

Monday, November 14, 2005 7:30:00 AM  
Blogger Unknown said...

grv said...

"... to turn on the dma:
downloaded the kernel source (2.6.8.1 in my case).
modified drivers/ide/pci/piix.c, heres the diff output: ... ... ..."

OK, that works up to 2.6.14.4 kernel version, but, in 2.6.15 doesn't, why? i don't know, and you?

Wednesday, January 11, 2006 2:15:00 AM  
Blogger Unknown said...

Hello, I find the solution, thanks to dardhal.

include this line ---->

#define PCI_DEVICE_ID_INTEL_ICH6_5 0x2653

into the file
/usr/src/linux-2.6.15/include/linux/pci_ids.h

regards

Wednesday, January 11, 2006 4:02:00 PM  
Blogger yanhong said...

If you want to buy some laptop betteries,you can see it from acer travelmate 4150 Laptop Battery,It,s very cool.

Tuesday, February 24, 2009 1:37:00 AM  
Blogger Christian said...

I installed Jaunty Jackalope (9.04) on my Travel Mate. It works quite well though it is slow (because of the age of my comp - it was bought in 2005. The only problem: My integrated 4 or 5 in 1 card reader doesn't work - ENE Technology doesn't provide a driver and I'm still looking for a suitable patch.

Friday, October 09, 2009 3:41:00 AM  
Blogger Unknown said...

super-p-force-miraculous-combination-treating-impotence

Wednesday, December 07, 2016 3:57:00 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home