Thursday, February 1, 2007

FSC Amilo A1650g Ubuntu Edgy 32bit How-To

Specs:
AMD Turion 64 ML-32 / 1.8 GHz
512MB RAM
60GB HD
ATI Xpress 200M (Shared) - Crippled By Design
SD/MS CardReader
TV-OUT
CRT-OUT
PCMCIA Slot
Firewire
LAN
Modem
4 USB
DVDRW+
Atheros 802.11a/b/g
1200x800 Display
Fancy HotKeys

How-To
Installation did most of the magic. The following were automagically detected and operational:
AMD Turion 64 ML-32 / 1.8 GHz
512MB RAM
60GB HD

Firewire
LAN
4 USB
DVDRW+

SD/MS CardReader

The Rest is as follows

ATI Xpress 200M

Since ATI support the DRM's global warning, the opensource radeon driver for the ATI Xpress 200M can only support 2D stuff. Therefore I had to install the crippled ATI fglrx driver to properly use some features of the Video Card.
Installing was done by the Restricted Driver Manager


After the installation of the packages, I had to run:

sudo aticonfig --tvf PAL-B --ovf Xv

To ensure that the TVOUT output will be PAL-B (you may replace with your local tv format) and that video overlay will be Xv.


TV-OUT + CRT-OUT
The TV output plug on this laptop is SVIDEO while my TV's input is RCA. It took me a year to figure out the following method:
requirements - A cable equipped with an SVIDEO plug on one side and 2 RCA on the other side, an adapter plug with 2 RCA inputs and 1 RCA output.
1) Plug the SVIDEO to the laptop and only 1 of the 2 outputs to the adapter plug input. Plug the plug adapter output to the tv input.
2) Run the following command on the console (NOT AS ROOT!):

aticonfig --enable-monitor lvds, tv
aticonfig --ovon 1 #<----only if you wish to use Xv to watch movies, #else change the video player setting to X11

3) Now the picture will be shown on the tv in greyscale - if not return to step 1, connect the ouput which was not connected and disconnect the one that is connected (in other words, switch between them) and then retry step 2.
4) Connect the other output and now you shall have colors. If you still don't have color onscreen, try using a different tv format with:

aticonfig --tvf NTSC-M #<---just an example: you should use your local format

5) Now the you can see that only part of the desktop is visible on the TV. Thats because of the screen resolution, lower it to 1024x768.

Note: similar procedure should be done in Windows - as I said before - Crippled By Design!
Getting the CRT-out is simpler - just connect the cable and run the following command (not as root):

aticonfig --enable-monitor lvds,crt

Fancy HotKeys
Most of the HotKeys are recognized and are configurable. The following HotKeys were detected upon install:
HELP, SLEEP, BLANK_SCREEN, BRIGHTNESS UP/DOWN, SCROLL LOCK, NUM LOCK, HOME, END.
MUTE, VOL UP/DOWN - might needed some tuning which was done through gnome's System->Preferences->Keyboard Shortcuts.
WWW_BROWSER became operational after acerhk was loaded (read ahead).

Hotkeys at work!!!! This is how:
(PLEASE NOTE: the scripts work but are ugly because of the following reasons:
MADWIFI driver in the Ubuntu kernel doesn't yet support changes in /sys/class/net/ath0/device/power/state)

I've set up a place in google code for this - http://fscamiloa16xx.googlecode.com/svn/trunk/Edgy/
1) install hotkeys ("sudo apt-get install hotkeys")
2) download the file fsca16xx.def and put it in /usr/share/hotkeys (you'll need sudo for that)
3) download fsc-cpuspeed.sh and fsc-wireless.sh and put it in /etc/acpi and make them executables
(you'll need sudo for that):
sudo chmod 755 /etc/acpi/fsc-cpuspeed.sh
sudo chmod 755 /etc/acpi/fsc-wireless.sh

4) download the file hotkeys.desktop and put it in /usr/share/gnome/autostart/
5)
Please NOTE: this step will allow non-root users to change the frequency scaling algorithm and is crucial for the Fancy Fan button. You may skip this step if you're "security breach" register has been turned on.
download the file 70-fsc-special-settings.sh and put it in /etc/acpi/start.d (make it executable)
sudo chmod 755 /etc/acpi/start.d/70-fsc-special-settings.sh
6) last and trickiest: run uname -r at the console, if there exist a folder that matches the output and you are using the 32bit version of ubnutu. download the file and put it in:
/lib/modules//kernel/drivers/input/misc
you'll have to overwrite the existing file.
If such folder doesn't exist, you can use the patch I made against acerhk 0.5.34 recompile it and put the acerhk.ko file in the folder mentioned above ('make install' places it in the wrong folder).
(patch is available at http://code.google.com/p/fscamiloa16xx/downloads/)
7) restart and start using the buttons.
(or:
sudo rmmod acerhk
sudo modprobe acerhk
sudo hotkeys -Z -t fsca16xx

)

Atheros 802.11b/g
To make this baby running you should fix the hotkeys (as stated above) and then press the wireless button. the wireless card driver works out-of-the-box except for the fact that because of the wireless led (which why we use acerhk)
Alternative:
add acerhk to /etc/modules and then restart and
echo 1 > /proc/driver/acerhk/wirelessled
to turn on
or
echo 0 > /proc/driver/acerhk/wirelessled
to turn off

After each time the wireless button is pressed for activation, the following script should be run:
#!/bin/sh
echo 0 > /proc/driver/acerhk/wirelessled #acer wireless off
sudo rmmod ath_pci
sudo rmmod ath_rate_sample
sudo rmmod ath_hal
sudo rmmod wlan_scan_sta wlan
sudo killall NetworkManager
sleep 2s
sudo modprobe ath_pci
sudo NetworkManager
echo 1 > /proc/driver/acerhk/wirelessled #acer wireless on