About Init 0
Burning CD/DVD with Linux
Linux on the Acer Aspire 5920
Linux on the Fujitsu Siemens Amilo L7300
Iriver IFP Linux driver
IceWM patches
Simple X11 toolkit
Command line tips
"Hey, I know this! This is Unix!"
Jurassic Park
New: added practical information on how to use bluetooth!
The Acer Aspire 5920G is a well-equipped consumer laptop. Too bad for you it comes pre-packaged with Windows Vista (Premium or Ultimate). Not only might you not want to run Vista or any other Windows version, Acer decided to equip this laptop with a terrible amount of Acer's own crap/software. Fortunately this laptop has a fast dual core processor and enough memory so it will still run pretty fast.
However, any experienced computer user will probably remove a lot of Acers' software, reinstall Vista, use XP, or even better: install Linux!
Installing Linux is not extremely difficult but this laptop has some strange quirks, so keep on reading!
All these steps are tested on LFS, kernel 2.6.24/2.6.23.1, SMP enabled, glib 2.7, gcc 4.2.3/4.2.2. Gcc 4.3 will probably include native core 2 duo optimizations but for now use CFLAGS="-O3 -march=nocona" for optimization. See here for more information on optimizing.
The dual core processor supports Vanderpool virtualization so you can even run Windows Vista as a process in Linux using KVM. You paid for a Windows license so why shouldn't you use it?
These are the most common configurations. Acer has many 5920 laptops with slightly different processor speeds, memory size, etc.
Please note that everything is working on this laptop with linux (I haven't tested infrared or firewire)!
| Processor | Core 2 Duo T7300/T7500 @ 2,0/2.2 Ghz |
| Memory | 2 GB DDR 667 Mhz (PC2-5300) |
| Video chipset | Nvidia 8600M GS/GT |
| Video memory | 256MB/512MB |
| LCD | 15.4" Glare TFT (1280x800) |
| Hard disk | 250 GB 5400 RPM SATA (WDC WD2500BEVS-22UST0) |
| Optical | Built-in DVD rewriter (HL-DT-ST DVDRAM GSA-T20N) |
| Sound | Intel HDA, S/PDIF |
| Ethernet | Broadcom Tigon3 Gigabit |
| Wifi | Intel Wireless WiFi Link 4965AGN |
| USB | Standard EHCI USB 2.0 |
| Bluetooth | Built-in HCI USB adapter |
| Webcam | CrystalEye webcam |
| Card reader | 5-in-1 card reader |
Setting up Xorg, or XFree if you like, has some peculiarities. First of all, I've configured four input devices: standard keyboard, standard touchpad, multimedia keys and an optional USB mouse. Setting up the keyboard is straight forward:
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbOptions" "compose:ralt"
EndSection
The touchpads are a litte bit more complicated. These can be configured using the synaptics driver and event protocol from xorg. By the way, /proc/bus/input/devices lists all input devices. The problem is input5 and input6 are both named "SynPS/2 Synaptics TouchPad".
Although the evdev maintainers discourage you to use a literal device instead of a device name, in this case there isn't an easy other way because both input devices have the exact same name.
Unless you do some udev/sysfs magic to create unique names, the easiest thing to do is to configure the two touchpads as follows:
Section "InputDevice"
Identifier "Touchpad"
Driver "synaptics"
Option "Protocol" "event"
Option "Device" "/dev/input/event6"
Option "SHMConfig" "on"
Option "MaxTapTime" "0"
Option "MinSpeed" "0.1"
Option "MaxSpeed" "0.6"
Option "HorizScrollDelta" "0"
EndSection
Section "InputDevice"
Identifier "AcerMultimedia"
Driver "synaptics"
Option "Protocol" "event"
Option "Device" "/dev/input/event5"
Option "SendCoreEvents" "false"
EndSection
Note that if you want to use the multimedia keys you should set SendCoreEvents to true. Using the above setup the touchpad works using synaptics driver, with the touchpad clicking disabled. I've disabled the Acer multimedia buttons because those are very easily accidentally pressed.
Last but not least, if you frequently use an USB mouse, this setup helps you using /dev/input/mice. Plugging/unplugging a mouse is no more a problem:
Section "InputDevice"
Identifier "USBMouse"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "SendCoreEvents"
Option "Device" "/dev/input/mice"
EndSection
Nvidia video card
Setting up the Nvidia card is easy using either vesa, xorg nv driver (both untested) or the proprietary Nvidia drivers. Notice I use "Coolbits" to over-/underclock the GPU/memory clock and "OnDemandVBlankInterrupts" to save some watts. Use powertop to see how much Watt you are using and can possibly save. It seems to work fine using the latest beta drivers (169.09) and with 100.14.19 as well.
Section "Device"
Identifier "Card0"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "GeForce 8600M GT"
BusID "PCI:1:0:0"
Option "OnDemandVBlankInterrupts" "True"
Option "Coolbits" "1"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
Option "NoLogo" "True"
SubSection "Display"
Depth 24
Modes "1280x800" "800x600" "640x480"
EndSubSection
EndSection
The keyboard works out of the box on probably every linux distro. However, several keys are undefined and besides that, the keys at the right side of the keyboard aren't keys, but really a touchpad (see Xorg section).
X can handle most keys if they are defined as XF86-keys. See /usr/share/X11/XKeysymDB for a list of keysyms and put them in .xmodmaprc. Load it with xmodmap .xmodmaprc
keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 178 = XF86HomePage
keycode 236 = XF86Mail
A lot of keys are undefined. For example, if you press the Dollar sign (above the right arrow) the kernel reports an unknown key pressed. To get these keys to produce keycodes for userland apps you need to map them to something using setkeycodes. A list is in /usr/include/linux/input.h
setkeycodes e074 148 # "Acer E key" mapped to KEY_PROG1
For these kind of keys the kernel reports something like:
atkbd.c: Unknown key pressed (translated set 2, code 0xd9 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e059 <keycode>' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0xd9 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e059 <keycode>' to make it known.
When mapped with setkeycodes, use something like xev to obtain the actual keycode.
I haven't configured all the keys; most of the keys are accidentally pressed when typing. Pressing the Wifi on/off switch happens often by accident and also the euro and dollar key (why would you need a separate dollar key anyway) are very irritating. I've mapped them with setkeycodes to reduce dmesg spamming and that way they don't actually do anything.
Volume keys
The scroll wheel at the front of the laptop controls the volume. Scrolling to the right generates a key, and scrolling to the left generates another key. You can configure them in your window manager/desktop environment. There is a small problem with this approach: when running a fullscreen program, such as a game, the window manager does not receive these events. So it is better to use something at a lower level. This is the way to go with evrouter. Create a $HOME/.evrouterrc file containing these mappings:
# Volume Up and volume Down
"Keyboard" "" any key/114 "Shell/amixer set PCM 5%- >/dev/null"
"Keyboard" "" any key/115 "Shell/amixer set PCM 5%+ >/dev/null"
# Toggle mute
"Keyboard" "" any key/113 "Shell/amixer set Surround toggle >/dev/null"
Now you can start evrouter listening to the keyboard, which is always at /dev/input/event4: evrouter /dev/input/event4
This laptop has an HDA intel chipset for audio. By default it lacks a PCM mixer device (maybe later kernel versions fix this?). For now edit /etc/asound.state and add the following lines:
control.31 {
comment.access 'read write user'
comment.type INTEGER
comment.count 2
comment.range '0 - 255'
comment.tlv '0000000100000008ffffec1400000014'
iface MIXER
name 'PCM Playback Volume'
value.0 125
value.1 125
}
Unfortunately this card does not support hardware mixing, so alsa uses dmix by default. With dmix you can still play multiple sound streams on a singel hardware channel. OSS emulation does not seem to work very well with dmix and this card (not tested thoroughly) so best stick with alsa.
The harddisk uses the AHCI SATA driver. This is suported straight from the kernel:
Device Drivers -> Serial ATA (prod) and Parallel ATA (experimental) drivers -> AHCI SATA support
This drive seems to have some bogus NCQ implementation. Check if your drive is also a WD2500BEVS-22UST0 before continuing. See bug report here. Add this to a startup scrip (such as /etc/rc.d/rc.local):
echo 1 > /sys/block/sda/device/queue_depth
The chipset for the DVD drive is the Intel PIIXn chipset:
Device Drivers -> ATA/ATAPI/MFM/RLL support -> Intel PIIXn chipsets support
You still need to enable 32 bit IO and unmaskirq manually for the DVD drive. The DVD drive is called hda and the harddisk sda.
hdparm -c1 /dev/hda
hdparm -u1 /dev/hda
Update: kernel 2.6.24 and up support this driver straigth from the kernel. Still enable the IEEE 802.11 stack.
Device Drivers -> Network device support -> Wireless LAN -> Intel Wireless WiFi Link Drivers -> Intel Wireless WiFi 4965AGN
If kernel<2.6.24 wifi works fine using the official Intel drivers from the intellinuxwireless project. Enable in the kernel:
Networking -> Wireless -> Improved wireless configuration API
Networking -> Wireless -> Generic IEEE 802.11 Networking Stack (as a module)
Use wpa_supplicant if you like WPA/WPA2 support. Here is an example on how to use WPA2 personal encryption:
ctrl_interface=/var/run/wpa_supplicant # for wpa_cli support
network={
ssid="your_ssid"
psk="your_secret_ssid"
proto=WPA2
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
}
Now set up the card as follows. Obtaining an IP address can of course also be done by dchp. Remember, you need to set the SSID before starting wpa_supplicant if your SSID is hidden:
modprobe iwl4965
iwconfig wlan0 essid "your_ssid"
wpa_supplicant -c/etc/wifi.conf -iwlan0 -B
/sbin/ifconfig wlan0 192.168.1.111 broadcast 192.168.1.255 netmask 255.255.255.0
/sbin/route add -net default gw 192.168.1.1 netmask 0.0.0.0
The Intel Core 2 Duo works out of the box. If you want to scale the speed/voltage, enable CPU Frequency Scaling and the ACPI Processor P-States driver. Furthermore Hardware Monitoring support has support for Intel Core (2) Duo temperature sensors (only in recent kernels). None of this is required, however the screenshot shows some cool features of these options running conky
Power management options (ACPI, APM) ->
ACPI Support (Advanced Configuration and Power Interface) Support->
*
Power management options (ACPI, APM) ->
CPU Frequency scaling ->
ACPI Processor P-States driver
This laptop has a built-in USB bluetooth adapter using the hci_usb kernel module. The bluetooth key is not mapped to a kernel keycode (it reports two keycodes). However, it still works, even without setkeycodes.
Networking -> Bluetooth subsystem support ->
Bluetooth device drivers -> HCI USB driver
setkeycodes e054 237 # "Bluetooth" mapped to KEY_BLUETOOTH
setkeycodes e059 237 # 2nd "Bluetooth" mapped to KEY_BLUETOOTH
Here is some practical and general information on how to use bluetooth. Receiving files works without passkeys, passwords or pairing. Besides the modules listed above (bluetooth and hci_usb) you need to enable rccomm and l2cap. These are in the "Bluetooth subsystem support" submenu.
All these commands can be started even if bluetooth is off (of course sending/receiving won't work). FYI, I use the default /etc/bluetooth/hcid.conf. If you're in trouble, check /var/log/daemon.log.
Ok, first start the bluetooth listening process with internal SDP server (-s):
hcid -s
Now start listening for incoming bluetooth connections (-b) and put received files in /mnt/data/bluetooth. The order of these options is important!
obexftpd -c /mnt/data/bluetooth -b
Finally, add a handler listening for incoming files. You won't be able to receive antyhing without this handler.
sdptool add --channel=10 OPUSH
Now you can send files from a bluetooth capable device (such as a mobile phone) to the laptop!
To send files from the laptop to something else you need a passkey agent. I use the one from bluez-utils, which you need to install manually.
passkey-agent --default 1234
Now you can send files using obexftp with the password we set with passkey-agent (1234)
obexftp -b -p FILE
That's all!
There is a built-in webcam on top of the monitor, where the lid closes. It is supported through the uvcvideo module. You need to include video4linux support in the kernel.
Device Drivers -> Multimedia devices -> Video For Linux
After loading the uvcvideo module the kernel reports the webcam. Note: the green light next to the webcam should light up now!
uvcvideo: Found UVC 1.00 device Acer CrystalEye webcam (064e:a101)
In the front of the laptop is a built-in card reader. It supports these formats: SD, MMC, MS, MS PRO, xD.
The kernel recognizes this device as mmcblk0p1. You need to include the kernel MMC/SD device driver.
Device Drivers -> MMC/SD card support
You can mount it like any other filesystem
mkdir -p /mnt/card
mount /dev/mmcblk0p1 /mnt/card
Ethernet and USB only requires the relevant kernel drivers. These are the respective modules:
Device Drivers -> Network device support -> Ethernet (1000 Mbit) -> Broadcom Tigon3 support
Device Drivers -> USB support -> EHCI HCD (USB 2.0) support
ACPI is supported in the kernel and by the Acer ACPI project
Power management options (ACPI, APM) -> ACPI Support (Advanced Configuration and Power Interface) Support
The Acer ACPI module provides extra files in /proc/acpi/acer. These files are both readable and writable so it is possible to change these values in scripts, etc.
/proc/acpi/acer/:
bluetooth brightness interface threeg version wireless
Kernel <= 2.6.23.x takes longer to boot than 2.6.24. This is probably due to some ACPI issues.