Difference between revisions of "ASUS Eee PC 701"

From ArchWiki
Jump to: navigation, search
(Xorg: update to use intel driver)
m (small stuff)
Line 62: Line 62:
 
===Prepare Hard Drive===
 
===Prepare Hard Drive===
  
The default Eee PC drive is split up into four partitions (here iss [http://forum.eeeuser.com/viewtopic.php?id=1805 some information] about the partitioning):  
+
The default Eee PC drive is split up into four partitions (here is [http://forum.eeeuser.com/viewtopic.php?id=1805 some information] about the partitioning):  
  
 
* It is easiest to wipe the existing partitions and use one or two partitions for your install. One partition would be just '/', and two partitions would be '/boot' and '/'.
 
* It is easiest to wipe the existing partitions and use one or two partitions for your install. One partition would be just '/', and two partitions would be '/boot' and '/'.
Line 160: Line 160:
 
'''dkite''' have created a package that contains all the necessary modules for wifi, ethernet connection, acpi and video camera hardware that comes with the Eee PC. His package is to be use with the stock kernel.  
 
'''dkite''' have created a package that contains all the necessary modules for wifi, ethernet connection, acpi and video camera hardware that comes with the Eee PC. His package is to be use with the stock kernel.  
  
The following is the list of hardwares/funtions that are known to work with dkite's eeemodules Package:
+
The following is the list of hardware/functions that are known to work with dkite's eeemodules Package:
  
 
*Wireless  
 
*Wireless  
Line 202: Line 202:
 
====Package List====
 
====Package List====
  
Currently, toofishes repository contains the following packages:
+
Currently, toofishes' repository contains the following packages:
  
 
*'''kernel-eee'''  
 
*'''kernel-eee'''  

Revision as of 17:43, 1 March 2008


WARNING: THIS ARTICLE IS INCOMPLETE! Visit the Arch forum thread link below to get information on installing Arch Linux on the Asus EEE PC.

Most of this information is from the Arch Forum. You can also find a lot of helpful information from the EEEUser Forum. There is also a nice Arch Linux installation guide on the EeeUser Wiki.

Before You Begin

Avoiding Pitfalls

The install is pretty normal, except that you'll need to avoid the pitfalls of our alternative Linux install:

  1. Never choose to use a journaling file system on the SSD partitions
  2. Never use a swap partition on the SSD
  3. Edit your new installation fstab to mount the SSD partitions "noatime"
  4. Never log messages or error log to the SSD

The rules ensure that we won't reach the maximum limit of writes on our SSD faster than we should.

Choosing Your Installation Media

The EEE PC does not have an optical drive installed on the machine. This means you will need to install Arch Linux through one of the alternative methods:

  1. External USB CD-ROM drive
  2. USB pen drive (Recommended)

Unfortunately, the kernel does not include drivers for a LAN or Wireless install.

Installing Arch Linux

Note: if you're using the USB pen drive as your media, then follow these instructions to create the installation USB stick.

Download the necessary drivers/modules

Since the stock kernel doesn't supports either the Eee ethernet or wireless network cards, you might want to download the ethernet or wireless drivers/modules that you need and copy them to the installation USB stick.

  • You can download ethernet driver source from here.
  • Wireless driver can be downloaded from here.
    • The wireless driver requires a patch to make it work with the Eee PC. The patch can be download from here
  • If you want to use dkite's eeemodules package, you should download the package from his website and put it on USB for ease of installing. Especially important is the eeemodules-2.6.22.9-1-i686.pkg.tar.gz, because we will need to install this package after installation for wireless and ethernet to work.

Booting Arch the installation CD/USB

Please refers to Beginners_Guide for detail instruction. Ideally, your CD/USB should boot up just fine on Eee PC without any need for additional options.

Start the Installation

If you are installing from the USB, then issue

mount /dev/sd[x] /src

To mount the usb.

Then just run

/arch/setup

To start the installation just like normal.

Prepare Hard Drive

The default Eee PC drive is split up into four partitions (here is some information about the partitioning):

  • It is easiest to wipe the existing partitions and use one or two partitions for your install. One partition would be just '/', and two partitions would be '/boot' and '/'.
  • Choose "NONE" for swap (see #2 in Avoiding Pitfalls).
  • Select "ext2" as your filesystem (see #1 in Avoiding Pitfalls).

Select Packages

If you are installing from USB, then choose SRC as your source.

In addition to the BASE category, we also need all the packages in the DEVEL category for compiling our ethernet/wireless drivers.

If you intended to use wireless, then you'll also need the wireless_tools package from SUPPORT category.

Configure System

Edit /etc/rc.conf and add asus_acpi to the MODULES array:

MODULES = (... asus_acpi ...) 

Arch will complains about this, pay no attention to the error message because once we install the patched version of asus_acpi module using dkite's package the error message will disappear.

Make these edits to "/etc/fstab":

  • Add "noatime" to the options of your mounts (see #3 in Avoiding Pitfalls)
  • (OPTIONAL) Add a new line: "tmpfs /var/log tmpfs size=1M 0 0" (WARNING: this will delete all your logs! See #4 in Avoiding Pitfalls)
    • To save your startup/shutdown logs, look at the pitfalls link above.

Install Network Adapter Driver

After the installation, The first thing you will noticed after booting into your newly installed Arch Linux is that the network adapters (both ethernet and wireless) are not working. To install the drivers, mount the USB stick that contains the drivers by issues the following commands:

 mkdir /mnt/usb
 mount /dev/sd[x] /mnt/usb

Then follow the following instructions to install your network driver.

Atl2 ethernet driver

You can download ethernet driver source from here.

Extract the sources. You may need to modify the kernel version listed in the Makefile.

make clean
make
cp atl2.ko /lib/modules/2.6.24-ARCH/kernel/drivers/net # Change 2.6.24 as needed
depmod

Atheros wireless ethernet driver

Instructions from http://wiki.eeeuser.com/ubuntu#wireless_internet_using_native_madwifi_drivers to patch madwifi. This replaces the Arch madwifi packages.

wget 'http://madwifi.org/attachment/ticket/1679/madwifi-ng-0933.ar2425.20071130.i386.patch?format=raw'
wget http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2756-20071018.tar.gz
tar zxvf madwifi-ng-r2756-20071018.tar.gz
cd madwifi-ng-r2756-20071018
patch -p0 < ../madwifi-ng-0933.ar2425.20071130.i386.patch
make clean
make
sudo make install

If you have already downloaded both the driver source & the patch and have moved them into the USB, then both move the driver source & the patch into the same directory and issues the following command:

tar zxvf madwifi-ng-r2756-20071018.tar.gz
cd madwifi-ng-r2756-20071018
patch -p0 < ../madwifi-ng-0933.ar2425.20071130.i386.patch
make clean
make
sudo make install

Working against stock kernel.

Install wireless and ethernet drivers using dkite's eeemodules Package

Another way to install both wireless and ethernet drivers/modules, instate of having to build and install the drivers/modules yourself, is to use dkite's eeemodules Package, which included both wireless and ethernet drivers/modules, among other things.

Since Don't Panic installation CD comes with kernel version 2.6.22.9, we will need to use eeemodules-2.6.22.9-1-i686.pkg.tar.gz package, which you can get from his website, if you haven't got it already.

Mount the USB that contains the package and install it with this command:

pacman -Uf eeemodules-2.6.22.9-1-i686.pkg.tar.gz

Then load the modules with

depmod

Restart and now you should have a working wireless/ethernet connection.

Install All the Necessary Modules

After you have installed and configured the driver, proceed to upgrade the system with pacman -Syu command. After the upgrade is complete, it is the time to decide which methods you would like to use to install the modules:

ATTENTION: Do NOT restart after upgrade the system and before you install the modules using one of the following methods, or your hardware (wifi, ethernet, etc.) WILL stop functioning.

Install modules using dkite's eeemodules package

dkite have created a package that contains all the necessary modules for wifi, ethernet connection, acpi and video camera hardware that comes with the Eee PC. His package is to be use with the stock kernel.

The following is the list of hardware/functions that are known to work with dkite's eeemodules Package:

  • Wireless
  • Ethernet
  • Webcam
  • Suspend/Resume

You can get the package from his website.

Currently there are three pre-complied package:

  1. eeemodules-2.6.22.9-1-i686.pkg.tar.gz for use with Don't Panic kernel.
  2. eeemodules-0.0.3-2.6.24.1.2-i686.pkg.tar.gz for the 2.6.24.14-2 kernel.

If you have newer or other version of kernel26, then you will need to download eeemodules.tar.gz, which contains PKGBUILD and all the necessary files, and build the package yourself.

  • ATTENTION: You will also need to rebuild the package, using eeemodules.tar.gz, every time you upgrade your kernel, or else your hardware (wifi, ethernet, etc.) will stop functioning.
Installation Instructions

Install the package with the following command:

pacman -Uf eeemodules-<pkgver>.tar.gz

Then run a depmod command:

depmod

Attention: Do not forget to run the depmod command after installing the package, otherwise the various hardware won't function!

If you want to use the webcam then you might also need to load the asus_acpi module. Edit the /etc/rc.conf file and insert asus_acpi into MODULES array:

MODULES = (... asus_acpi ...)

Eee repository from toofishes

toofishes created a repository for the eee. You can find some basic packages like Pentium-M-optimized kernel and needed modules. Add

[eee]
Server = http://code.toofishes.net/packages/eee

to your /etc/pacman.conf to use the repository.

Package List

Currently, toofishes' repository contains the following packages:

  • kernel-eee

customized kernel for Eee

  • linux-uvc-eee-svn

webcam driver for Eee

  • luvcview

webcam program for testing webcam driver

  • madwifi-ng-eee

wifi driver for Eee

Installation Instruction

Simply use pacman to install the package that you need. For a working system, you'll need at least 3 packages: kernel-eee (the kernel), linux-uvc-eee-svn (webcam driver) and madwifi-ng-eee (the wifi driver).

Install the packages with this command:

pacman -Sy kernel-eee linux-uvc-eee-svn madwifi-ng-eee

ATTENTION: dkite's eeemodules package conflicts with the madwifi-ng-eee package. You need to remove dkite's eeemodules package before you can install toofishes madfwifi-ng-eee package.

Then, add the following to /boot/grub/menu.lst; note that no initrd is needed:

# (2) Arch Linux
title  Arch Linux EEE kernel
root   (hd0,0)
kernel /boot/vmlinuzeee root=/dev/sda1 ro

Restart and select Arch Linux EEE kernel from the grub boot menu.

Getting Everything Working

By now, you should have Arch installed. The following is the guide on how to get the rest of your system working.

Xorg

You have two choices for video on the Eee- the newer xf86-video-intel driver, or the older xf86-video-i810 driver paired with 915resolution. Unless there is a compelling reason to use the i810 driver, the intel driver is the focus upstream and is being actively developed so it is your best choice.

You need these packages in addition to the Xorg's packages:

 pacman -Sy synaptics xf86-video-intel

If you choose to use the older i180 video, you will have to install xf86-video-i810 and 915resolution as well. Note that the i180 driver and the intel driver cannot both be installed at the same time.

Then, just drop in the following xorg.conf into your /etc/X11/ directory:

Section "ServerLayout"
    Identifier     "ArchLinux"
    Screen      0  "Screen0"
    InputDevice    "keyboard"
    InputDevice    "mouse"
    InputDevice    "synaptics"
EndSection

Section "Files"
    RgbPath      "/usr/share/X11/rgb"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/misc"
    FontPath     "/usr/share/fonts/100dpi:unscaled"
    FontPath     "/usr/share/fonts/75dpi:unscaled"
    FontPath     "/usr/share/fonts/TTF"
    FontPath     "/usr/share/fonts/Type1"
EndSection

Section "Module"
    Load  "glx"
    Load  "dri"
    Load  "extmod"
    Load  "synaptics"
EndSection

Section "ServerFlags"
    Option        "AllowMouseOpenFail"
    Option        "BlankTime" "5"
    Option        "AIGLX"   "false"
EndSection

Section "InputDevice"
    Identifier  "keyboard"
    Driver      "kbd"
    Option        "CoreKeyboard"
    Option        "XkbRules" "xorg"
    Option      "XkbLayout" "us"
    Option      "XkbVariant" ""
EndSection

Section "InputDevice"
    Identifier  "mouse"
    Driver      "mouse"
    Option        "Device" "/dev/input/mice"
    Option        "Protocol" "IMPS/2"
    Option        "Emulate3Buttons" "yes"
    Option        "ZAxisMapping" "4 5"
    Option        "CorePointer"
EndSection

Section "InputDevice"
    Identifier  "synaptics"
    Driver      "synaptics"
    Option      "Device"           "/dev/psaux"
    Option      "Protocol"         "auto-dev"
    Option      "LeftEdge"         "1000"
    Option      "RightEdge"        "5400"
    Option      "TopEdge"          "1000"
    Option      "BottomEdge"       "4900"
    Option      "PalmDetect"       "0"
    Option      "SHMConfig"        "true"
    Option      "SendCoreEvents"   "yes"    
    Option      "HorizScrollDelta" "0"    
    Option      "RBCornerButton"   "0"
    Option      "RTCornerButtom"   "0"
    Option      "MaxSpeed"         "0.1"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "ASUS"
    ModelName    "eeePC P701"
    Modeline     "800x480"  29.58  800 816 896 992  480 481 484 497  -HSync +Vsync # 60 Hz
EndSection

Section "Device"
    Identifier  "Card0"
    Driver      "intel"
    VendorName  "Intel Corporation"
    BoardName   "Mobile 915GM/GMS/910GML Express Graphics Controller"
    BusID       "PCI:0:2:0"
    Option      "AccelMethod" "XAA"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

Section "DRI"
    Mode         0666
EndSection

If you want to set up the i810 driver instead, you will also have to configure 915resolution and add it to your daemons line. This is not needed for the intel driver. Edit the /etc/conf.d/915resolution to look like this:

# Enter the VBIOS mode to patch
MODE="41"
 
# Enter the desired resolution
RESOLUTION="800 480"

Now put the 915resolution daemon into your /etc/rc.conf file:

DAEMONS=(... 915resolution ...)

Sound & Webcam

Sound

Some people have reported sound working right out of the box with no troubles. However, others might need to add the following line to /etc/modprobe.conf.

options snd-hda-intel model=3stack-dig

If your internal microphone doesn't work, you probably have to turn the capture feature on. Simply fire up alsamixer, find your Capture control, and press spacebar to enable it.

Webcam

If you installed dkite eeemodules package or filoktetes's kernel, then you should already have webcam driver installed and don't need to install Linux UVC device driver. Just add:

echo 1 > /proc/acpi/asus/camera

to your /etc/rc.local file should be suffice to get your webcam working.

If you don't use dkite eeemodules package or filoktetes's kernel or prefers to install the driver yourself, then follows the following instructions.

First, install the Linux UVC device driver. Make sure you have the community repositories enabled, and run:

pacman -S linux-uvc-svn

Then just turn on the webcam (This requires the asus_acpi module):

echo 1 > /proc/acpi/asus/camera

If you want a simple application application to test it out with, install luvcview from the AUR, and run it with:

luvcview -f yuv

Alternatively, if you want the webcam application that the default Xandos installation uses, install ucview from the AUR.

The webcam also works fine with the latest version of Skype.

I have yet to get it working with vlc or any other software such as xawtv. If you know how, please update this.

  • NOTE: For anyone who has accidentally disabled Auto Exposure for their webcam in luvcview (making the image dark), and can't enable it again, do the following:

Install libwebcam from the AUR.

Issue the following command:

uvcdynctrl --set "Exposure, Auto" 4

Getting Hot Keys, Graphic Indicators and Shutdown with the Power Button Working

If you want to have working hot keys for changing brightness and volumes, graphic indicators working as well as shutdown when press the power button (just like in the stock Eee PC), then you should install dkite's acpid_eee package, which can also be download form his website

The package itself can be install with

pacman -Uf acpid_eee-0.0.1-1-i686.pkg.tar.gz.tar

Shutdown problem

If your Eee won't shutdown properly (i.e. the power indicator led is on but the LCD screen is off), then by adding the following line

rmmod snd_hda_intel

To your /etc/rc.local.shutdown should fix the problem.

If this does not work, the module may not be able to be unloaded until after all services have finished. Do the above, then in /etc/rc.shutdown move

if [ -x /etc/rc.local.shutdown ]; then
  /etc/rc.local.shutdown
fi

from where it was to directly above the line

# Terminate all processes

this will cause the rc.local.shutdown script to run after services have been exited. This fixed all issues for the person editing this note.

Additional Tips & Tweaks

Power down with the power button

  • If you use dkite's acpid_eee package then you should already be able to shutdown by pressing the power button and should not need to do this.

The two alternatives here are described in Allow_users_to_shutdown.

If you don't already or don't plan to use sudo, it may be simpler to use the setuid /sbin/halt method, otherwise using sudo is preferred.

Below are all the steps required for the sudo method. If you want to use the setuid method, read the article linked above and perform the 'power' file step here, while omitting the 'sudo' in it.

pacman -S sudo

As root, do the following:

visudo

Add the following line to the file:

USER HOST = NOPASSWD: /sbin/poweroff

Where USER = the user you want to be able to power down with and HOST = your hostname (from /etc/rc.conf).

Now, create a file called /etc/acpi/events/power, containing:

# /etc/acpi/events/power
# This is called when the user presses the power button

event=button/power (PWR.||PBTN)
action=sudo /sbin/poweroff

Make sure that you execute

/etc/rc.d/acpid start

And/or add acpid to the daemons list in /etc/rc.conf:

DAEMONS=(hal, acpid ...

Compile the 'everything' Kernel

The 'everything' kernel has ath5k, which supports the Atheros chipset found on the EEE PC. Here are the instructions on compiling the 'everthing' kernel (thanks raymano!).

Use cpufreq for power saving

For scaling down the processor you have to load the p4_clockmod. Insert it into your /etc/rc.conf MODULES array for loading it at startup.

MODULES=(... p4_clockmod ...)

Then proceed like here. Add the following into /etc/conf.d/cpufreq

governor="ondemand"
min_freq="113MHz"
max_freq="900MHz"

With enabled cpufreq it scales the processor between 113MHz up to max. frequency. That should save a lot on battery power. The stated 900MHz will be never reached by the eeePC, the p4_clockmod reports a wrong frequency here. But scaling works, you can feel it in the performance of eeePC that he slow down the processor.

Speeding up udev for faster boot

Default Eee xorg.conf file

The following file is the default xorg.conf file that comes with Eee PC, include here for archival purpose.

Section "ServerLayout"
       Identifier     "archeee"
       Screen      0  "Screen1"
       InputDevice    "keyboard"
       InputDevice    "mouse"
       InputDevice    "synaptics"
EndSection

Section "Files"
       ModulePath   "/usr/lib/xorg/modules"
       FontPath     "/usr/share/fonts/X11/misc"
       FontPath     "/usr/share/fonts/X11/Type1"
       FontPath     "/usr/share/fonts/X11/75dpi"
       FontPath     "/usr/X11R6/lib/X11/fonts/Type1"
EndSection

Section "Module"
       Load  "glx"
       Load  "dri"
       Load  "extmod"
       Load  "synaptics"
EndSection

Section "ServerFlags"
       Option          "AllowMouseOpenFail"
       Option          "BlankTime" "5"
       Option          "DontVTSwitch"  "true"
       Option          "AIGLX"   "false"
EndSection

Section "InputDevice"
       Identifier  "keyboard"
       Driver      "kbd"
       Option      "CoreKeyboard"
       Option      "XkbRules" "xorg"
       Option      "XkbLayout" "us"
       Option      "XkbVariant" ""
EndSection

Section "InputDevice"
       Identifier  "mouse"
       Driver      "mouse"
       Option      "Device" "/dev/input/mice"
       Option      "Protocol" "IMPS/2"
       Option      "Emulate3Buttons" "yes"
       Option      "ZAxisMapping" "4 5"
       Option      "CorePointer"
EndSection

Section "InputDevice"
       Identifier  "synaptics"
       Driver      "synaptics"
       Option      "Device"           "/dev/psaux"
       Option      "Protocol"         "auto-dev"
       Option      "LeftEdge"         "1000"
       Option      "RightEdge"        "5400"
       Option      "TopEdge"          "1000"
       Option      "BottomEdge"       "4900"
       Option      "PalmDetect"       "0"
       Option      "SHMConfig"        "true"
       Option      "SendCoreEvents"   "yes"
       Option      "HorizScrollDelta" "0"
       Option      "RBCornerButton"   "0"
       Option      "RTCornerButtom"   "0"
       Option      "MaxSpeed"         "0.1"
EndSection

Section "Monitor"
       Identifier   "Monitor1"
       VendorName   "ASUS"
       ModelName    "eeePC P701"
       Modeline     "800x480"  29.58  800 816 896 992  480 481 484 497
-HSync +Vsync # 60 Hz
EndSection

Section "Device"
       Identifier  "Device1"
       Driver      "i810"
       VendorName  "Intel Corporation"
       BoardName   "Mobile 915GM/GMS/910GML Express Graphics Controller"
       BusID       "PCI:0:2:0"
EndSection

Section "Screen"
       Identifier "Screen1"
       Device     "Device1"
       Monitor    "Monitor1"
       DefaultDepth     24
       SubSection "Display"
               Depth     8
               Virtual  1680 1680
       EndSubSection
       SubSection "Display"
               Depth     15
               Virtual  1680 1680
       EndSubSection
       SubSection "Display"
               Depth     16
               Virtual  1680 1680
       EndSubSection
       SubSection "Display"
               Depth     24
               Virtual  1680 1680
       EndSubSection
EndSection

Section "DRI"
       Mode         0666
EndSection

#Section "Extensions"
#       Option      "Composite" "Disable"
#EndSection