Tuesday, April 8, 2008

Ubuntu 7.10 solution on acer 4520 (2)

I took this guide from ubuntu forum...
written by felipefoz
enjoy...
--------------------------------------------------------------------------------------------------
This guide is intended to users from an Acer 4520, some variants of this model may work with the tips here, some may not.
I am writing this post from the installation until the setup of all hardware, or almost all hardware, since there are some things that we were not able to setup yet.
The intention is to keep upgrading the content of this post with tips from community.
The distribution used is the Ubuntu 7.10 32 Bits, and only this one, the 7.04, or 8.04, or any other may be different and the tips here may work or not.
I decided to install the 32 Bits version, 'cause I have to do so many workarounds in this version, that I can't have time enough to do the same in the 64 bits, plus another issues that the 64 bits version has. So I keep the 32 bits, although the tips here and many steps can be followed by 64 bits users.
Note: 64 Bits user look at this post from "afterstep13" http://ubuntuforums.org/showpost.php...39&postcount=5
I assume you have wired internet available, because to set up the wireless Internet we need it. I also believe you have a little bit of knowledge in Linux, not all the things are very well explained, my fault. BTW. As it is the first guide, I accept suggestions, and don't worry about my English, it's not my first language.

My Hardware Specs:
Acer 4520 - 5726 - AMD Turion 64 X2 Mobile TL-58 (1.9 Ghz, 2 x 512 L2 Cache)
Chipset Nvidia Nforce 610M
VGA - Nvidia GeForce 7000M - 14" WXGA+ WideScreen 1280x800
2GB DDR2 667 - 160 GB HDD - DVD-RW
Atheros AR5007EG 802.11b/g WLAN
Card Reader- Express Card Slot
S-Video e Monitor OUT
4 USB 2.0 - 1 Mini-Firewire (4 Pinos)
Code:
$lspci
00:00.0 RAM memory: nVidia Corporation Unknown device 0547 (rev a2)
00:01.0 ISA bridge: nVidia Corporation Unknown device 0548 (rev a2)
00:01.1 SMBus: nVidia Corporation Unknown device 0542 (rev a2)
00:01.2 RAM memory: nVidia Corporation Unknown device 0541 (rev a2)
00:01.3 Co-processor: nVidia Corporation Unknown device 0543 (rev a2)
00:02.0 USB Controller: nVidia Corporation Unknown device 055e (rev a2)
00:02.1 USB Controller: nVidia Corporation Unknown device 055f (rev a2)
00:04.0 USB Controller: nVidia Corporation Unknown device 055e (rev a2)
00:04.1 USB Controller: nVidia Corporation Unknown device 055f (rev a2)
00:06.0 IDE interface: nVidia Corporation Unknown device 0560 (rev a1)
00:07.0 Audio device: nVidia Corporation MCP67 High Definition Audio (rev a1)
00:08.0 PCI bridge: nVidia Corporation Unknown device 0561 (rev a2)
00:09.0 SATA controller: nVidia Corporation Unknown device 0555 (rev a2)
00:0a.0 Ethernet controller: nVidia Corporation Unknown device 054c (rev a2)
00:0c.0 PCI bridge: nVidia Corporation Unknown device 0563 (rev a2)
00:0e.0 PCI bridge: nVidia Corporation Unknown device 0563 (rev a2)
00:12.0 VGA compatible controller: nVidia Corporation Unknown device 0533 (rev a2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:09.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)
01:09.1 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)
01:09.2 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 12)
01:09.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)
01:09.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12)
07:00.0 Ethernet controller: Atheros Communications, Inc. AR5006EG 802.11 b/g Wireless PCI Express Adapter (rev 01)
So let's start:

1) The BIOS Setup configuration

- Get to the BIOS, make sure you're using the AHCI mode in "Sata Mode" and put the CDROM as primary boot device.

2) Booting the Live-CD

- After choosing the language, if needed, choose "Start Ubuntu in safe graphics mode". And wait until gnome is loaded.

3) Normal Installation

- Do a normal installation, the problems will start happening later. Make sure your swap size is as big as your RAM size, otherwise you won't be able to hibernate sometimes.

4) Rebooting


- Here comes the problem, the system won't boot, so here are the steps:

In GRUB menu select the appropriate line, press "e" to edit the options, select the second line, the one beginning with "kernel" and append the "break=top" to the end, after editing press "enter" and then "b" to boot. After few seconds you'll fall into a shell frame, with "initramfs" written and a blinking cursor. Then type the following:

Code:
 modprobe sata_nv
modprobe ata_generic
exit
You'll boot normally after this. Some people typed to load other modules, but with these combination I got 100% of success.

5) Fix the boot issue

First thing is fixing the issue, there were many workarounds about this problem, the plausible solution was found in this thread http://ubuntuforums.org/showpost.php...&postcount=131 (thanks to "afterstep13"):
Still in gnome, with a low resolution, don't worry we'll fix the vga problem soon, create a script:
Code:
$ sudo gedit /etc/initramfs-tools/scripts/init-premount/fix
Add the following lines to its content:
Code:
#!/bin/sh

PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
sleep 10
Then make it executable with:
Code:
$ sudo chmod +x /etc/initramfs-tools/scripts/init-premount/fix
Update the initramfs:
Code:
$ sudo update-initramfs -u
Reboot, now it's going to boot normally, this script make a ten seconds delay, so it'll take 10 seconds before starting the boot process, anyhow it works very well, better waiting 10 seconds, than typing every time the commands from last step. Some tweaks make the boot process real faster in dual core processors, write about this later.

6) Wired LAN

Works out of the box*.
Incrementing eth# problem, look at this tip in this same thread http://ubuntuforums.org/showpost.php...39&postcount=5

7) Updates

Active the repositories needed, and update all the software, before tweaking the system. Updates may break some tweaks. This is a very important step. After updating, reboot.

8 ) Sound - High Definition Audio

You might be asking yourselves, why installing sound before video. I don't know why, but installing sound after the video may break nvida installation. ???? . So let's do the sound before the video. The solution is simple, downloading latest alsa drivers and compiling them. "Question: I've seen an alternative solution with ubuntu's "linux-backport-modules", isn't easier?". Actually, that solution is pretty quicker than this one, but with that one, the microphone was not working with me, so I compiled it myself.
This tip I got partially from https://help.ubuntu.com/community/HdaIntelSoundHowto. And also from another thread here in forums http://ubuntuforums.org/showthread.php?t=577699
I am passing all the process here, but at the end I have made some modifications in the script from this post http://ubuntuforums.org/showpost.php...2&postcount=13, and you may want to download to automate the process. Then you should run these steps.
Code:
sudo sh alsa_1.sh
reboot
sudo sh alsa_2.sh
reboot
Sound should be working, I used this script and worked very well.
Otherwise you may want to do it manually. With the following steps.

Install dependencies:
Code:
 apt-get install build-essential libncurses5-dev gettext linux-headers-`uname -r`
Alsa Driver, Lib and Utils:
Code:
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.16.tar.bz2
wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.16.tar.bz2
wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.16.tar.bz2
Extracting them and removing tarballs:
Code:
tar -xjf alsa-driver*.tar.bz2
tar -xjf alsa-lib*.tar.bz2
tar -xjf alsa-utils*.tar.bz2
rm alsa*.tar.bz2
Making the directory for compiling the source:
Code:
sudo mkdir -p /usr/src/alsa
sudo mv alsa-* /usr/src/alsa
Compiling and installing alsa-driver
Code:
cd /usr/src/alsa/alsa-driver*
sudo ./configure --with-cards=hda-intel
sudo make
sudo make install
Compiling and installing alsa-libs
Code:
 cd /usr/src/alsa/alsa-lib*
sudo ./configure
sudo make
sudo make install
Compiling and installing alsa-utils
Code:
cd /usr/src/alsa/alsa-utils*
sudo ./configure
sudo make
sudo make install
Reboot the machine and run more these comands:
Code:
sudo cp -v /lib/modules/2.6.22-*/kernel/sound/pci/hda/snd-hda-intel.ko /lib/modules/2.6.22-*/ubuntu/media/snd-hda-intel/snd-hda-intel.ko
sudo cp -v /usr/src/alsa/alsa-driver*/modules/* /lib/modules/2.6.22-*/kernel/sound/
sudo depmod -a
Reboot once more. And the next time will have sound working, no extra tweaks needed, like adding some line to /etc/modprobe.d/alsa-base. The steps above must solve the problem with sound and mic. The mic will work after enabling all boxes in the Gnome mixer applet. Change the input source to "front mic" or "mic" depending on which microphone you are gonna use. That's it.

9) Wireless LAN - Atheros AR5007EG

Tried already the madwifi drivers, and ndiswrapper. After tested both of them, the one which best worked with me was the ndiswrapper compiled from source.
a) Download and compile ndiswrapper 1.52
Code:
wget http://superb-west.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.52.tar.gz
tar -zxvf ndiswrapper-1.5*
sudo mkdir -p /usr/src/ndiswrapper
sudo mv ndiswrapper-1.52/ /usr/src/ndiswrapper/
cd /usr/src/ndiswrapper/ndiswrapper-1.52/
sudo make uninstall
sudo make
sudo make install
b) Blacklist the native ath_pci module to prevent from loading it.
Code:
sudo gedit /etc/modprobe.d/blacklist
Add the line:
Code:
blacklist ath_pci
c) Download the xp driver from Atheros Site, look for the driver 6.0.3.85 for Windows XP 32 Bits, the file name will be xp32-6.0.3.85.zip. The file inside must be net5416.inf (not net5211.inf).

Extract and install it:
Code:
unzip xp32-6.0.3.85.zip
sudo ndiswrapper -i net5416.inf
sudo ndiswrapper -l
sudo ndiswrapper -m
sudo ndiswrapper -ma
sudo loadndisdriver
sudo modprobe ndiswrapper
It must be working now with the led, if it doesn't, make sure it isn't off, or try a reboot.

d) Fixing the LED Problem

Wireless in Linux, it's never perfect. After comparing some .inf files, and many hit and tries. I've found a solution for the LED that's always on. The solution is quite simple, but it is necessary some attention in which files we should edit. First
Find which device is listed in ndiswrapper:
Code:
$ndiswrapper -l
net5416 : driver installed
device (168C:001C) present (alternate driver: ath_pci)
Mine device is listed on "168C:001C". The you go to /etc/ndiswrapper/net5416/, look for the files that begin with the exactly name of your device. You should edit a file with the name "XXXX:XXXX.5.conf". In my case, was:
Code:
sudo nano /etc/ndiswrapper/net5416/168C\:001C.5.conf
The beggining of the file content should be like this:
Code:
sys_files|ar5416.sys
NdisVersion|0x50001
Environment|1
class_guid|4d36e972-e325-11ce-bfc1-08002be10318
driver_version|,06/05/2007,6.0.3.85
BusType|5
SlotNumber|01
NetCfgInstanceId|{28022A01-1234-5678-ABCDE-123813291A00}

abolt|191
capLinkSp|1
DriverDesc|NDIS Network Adapter
gpioPinFunc1|3
ignore11dBeacon|1
...
Right below the line "gpioPinFunc1|3", you add the line:
Code:
gpioLedCustom|4
Unload and load ndiswrapper:
Code:
sudo modprobe -r ndiswrapper
sudo modprobe ndiswrapper
Now your LED will act different, will blink each 5 seconds, and always on when connected, you can change de values, instead of 4, I tried 1,2,3 and I got different results in how the LED acts. You can test different values and see which one you will like the most. I'm in doubt in 3 or 4. hehehe

10) VGA - Nvidia

Finally installing the Graphics Card, I let it almost for last, because I don't know why but this driver is very sensitive to system changes, I tried to install at first, but installed the sound, messed nvidia, installed wireless, messed nvidia, so I let it for last. I found a better solution compiling the latest drivers from the Nvidia Website, just because the built-in driver "nvidia-glx-new" doesn't hibernate, no matter what you do. Some may want to install it using envy, your choice, but I read that it doesn't work very well. So I'm gonna do it myself:

a) Downloading the latest driver from Nvidia website. The latest IA32 version, not the legacy ones. Save all your job you're doing at the moment (we are going to stop Gdm). Go for a tty1 by pressing "Ctrl+Alt+F1". Login and type:
Code:
sudo /etc/init.d/gdm stop
Go to place you donwloaded the Nvidia drivers and run the executable:
Code:
sudo sh NVIDIA-Linux-x86-*
Say yes to all questions and restart the computer.

b) After restarting you'll still get the low resolution, so edit the xorg.conf and manually change the resolution.
Code:
 sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
sudo gedit /etc/X11/xorg.conf
Then change the resolution line in the "Section "Screen"":
It was:
Code:
        Modes      "800x600"
And change to
Code:
         Modes      "1280x800"
I also disabled the logo feature by adding to this same section the line:
Code:
Option "NoLogo" "true"
There has been some problem happening to users, that the title bars keep disappearing.
The fix is adding the following line to the Device Section also in xorg.conf
Code:
Option “AddARGBGLXVisuals” “True”
So, restart X (Ctrl+Alt+Backspace) and that's it. Your pretty gnome again. Troubles: NvidiaManual

11) Touchpad
It works out of the box, but you can tweak a little bit.

a) Backing up and editing xorg.conf:
Code:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup2
sudo gedit /etc/X11/xorg.conf
Adding the line (Option "SHMConfig" "true") to Synaptics InputDevice Section, the whole section should look like this:
Code:
 Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizEdgeScroll" "0"
Option "SHMConfig" "true"
EndSection
b) Installing the Gsynaptics to manage preferences for touchpad. Available in "System > Preferences > Touchpad"
Code:
sudo aptitude install gsynaptics
c) Disabling touchpad while typing:
Put the command below in the start session of gnome, under "System > Preferences > Sessions > Add"
Code:
syndaemon -i 1 -d
12) Webcam
Works out of the box. Program to manage
Code:
sudo aptitude install cheese
13) Card Reader
Not fully functional. I couldn't test all kind of cards. But Memory Stick doesn't work. I've read SD cards only work. You may want to check this project at BerliOS

14) Hibernate (Suspend to disk) and Standby (Suspend to RAM)
Should Work out of the box with latest Nvidia Drivers .Although hibernate fails sometimes. I tried with the VESA driver, it worked always. Nvidia driver problems.
So after googling a little bit, I found out about that option from xorg.conf, NvAgp, and it has many alternatives.
I added to xorg.conf in device section the following line, it's supposed to turn off agp support, nothing happened to my video anyway, but now hibernate works 90% of the times, the other 10% no reason.
The line:
Code:
Option "NvAgp" "0"
now, when I resume from hibernate, the sound stops working, "working on it" :P
Suspends works with no problems.

15) S-Video and VGA Out
Both work perfectly with the Nvidia X Server Settings under "Application > System Tools > Nvidia X Server Settings). It's very easy to set up different displays. Detection works fine as well.

16) Dial-up Modem, Express Card and mini-firewire
None of them tested, anyone?

13)ACPI, Battery, Laptop Health and others

a) Install Powertop, a program to monitore the consumption from your laptop, should be ran with sudo
Code:
sudo aptitude install powertop
b)Decrease disk acess, and as consequence usage of battery. Two ways of doing it, you can use both, one of them or none, since the are problems for some people using them, read where this information was taken, all the discussion here http://ubuntuforums.org/showthread.php?t=107856
Changin the journal type to data=writeback (only ext3). this change the type of your filesystem journal, read more about it before doing this tweak
- Edit GRUB menu:
Code:
sudo gedit /boot/grub/menu.lst
Find the entry from Ubuntu, and append "rootflags=data=writeback" at the end. Then the end of the line should look like this:
[code]kernel /boot/... ro quiet splash rootflags=data=writeback[code]
- Edit fstab
Code:
sudo gedit /etc/fstab
Append the data=writeback to the end of the line of your ext3 filesystem. Looking like this:
[code]... / ext3 defaults,errors=remount-ro,data=writeback
- Change the journal type:
Code:
sudo tune2fs -o journal_data_writeback /dev/sdaX
Where X is the number of your ext3 partition.
- Check if everything is ok.
Code:
sudo tune2fs -l /dev/sdaX
c) Change to noatime, it makes system stop updating the access time every time a file is accessed Warning: some programs may utilize this feature, it will improve the system speed but you may have side effects, read more about it before doing this tweak
- Edit fstab
Code:
sudo gedit /etc/fstab
Append notime to the ext3 partitions options:
Code:
... /  ext3    defaults,errors=remount-ro,noatime,data=writeback
d) Deacrese the interrupts from nvidia, see powertop before and after doing this, seek for nvidia, after doing this will disappear or will be at the bottom. (Experimental Power Saving Mode)
- Edit xorg.conf
Code:
sudo gedit /etc/X11/xorg.conf
- Add the line to the Device Section or the Screen Section, depending on your configuration:
Code:
Option "OnDemandVBlankInterrupts" "on"
e) Increase the Boot Speed by starting services in parallell mode. I haven't forgot what I promessed, after the 10 seconds delay you will have a faster boot after this tip, very noticeable with the dual core processors.
- Edit the file rc
Code:
sudo gedit /etc/init.d/rc
- Look for a line "CONCURRENCY=none" and change to "CONCURRENCY=shell"
By doing this we'll have problems in simultaneuosly services. The service HAL must be delayed:
Code:
sudo mv /etc/rc2.d/S12hal /etc/rc2.d/S13hal
f) CPU Frequency Scaling Monitor

The is very useful for reducing the frequency when running on battery to save power.
- Add to the panel the applet located "CPU Frequency Scaling Monitor" under "System & Hardware".
- Run: (read all the warning, and if you are sure about this, say yes)
Code:
sudo dpkg-reconfigure gnome-applets
- If you say yes, restart the Panel or only the applet. And then you'll have four frequencies available to control.
g) Sensor - Temperature Monitoring
- Install the sensors daemon and applet:
Code:
sudo aptitude install lm-sensors sensors-applet hddtemp
- Then detect the sensors, you must say yes to all questions, run:
Code:
sudo sensors-detect
After rebooting, you can add the applet "Hardware Sensors Monitor" and see what components you want to monitore.

Cheers...

Sunday, April 6, 2008

Ubuntu 7.10 on acer 4520 solution

acer 4520
prosesor AMD Turion 64×2 TL-58
VGA NVIDIA GeForce 7000M
Memori 2GB DDR2
HDD 80GB
WLAN atheros AR5006EG 802.11 b/g
Acer Crystal Eye webcam

First, u also must have dvd repository ubuntu 7.10

boot using livecd, choose save graph mode then install..


installing package :

-nvidia-glx-new (VGA)

-linux-restricted-modules (sound card)

-linux-backports-modules (sound card)

-ndiswrapper-common (Atheros wifi)

-ndisgtk (Atheros wifi visual)

-ndiswrapper-utils-1.9 (dependency
ndisgtk)

-cheese (webcam

driver need to be download :

for atheros wlan :

-net5211.inf ==> ask google

on the directory file u just download :

# ndiswrapper -i net5211.inf

# ndiswrapper -l // make sure status present

# ndiswrapper -m //make sure in the last line : alias wlan0

# ndiswrapper -ma

# loadndisdriver

//sound

nano /etc/modprobe.d/alsa-based //

in the final line just add :

options snd-hda-intel model=acer

(ctrl^x) yes…

on menu :

system>administrator>restricted driver manager

enable vga driver

restart.

EOF

if u get broadcomm instead atheros, then do :

#apt-get install bcm43xx-fwcutter

then download firmware for broadcomm ==> ask google again

activated firmware from :

system>administrator>restricted driver manager..

good luck..

Test..

Testing...
Hello World!!
This is my First Big Project..
Try to write in english!! "What?? U must be joking right?? everybody can do that."
Well cauze :
1. I am Indonesian
2. I never write my opinion, even in indonesian
3. I decided to start my writing in english.. thats a big leap, don't u think?

Ok... enjoy my funny english.. :)