From Fedora Project Wiki

Line 70: Line 70:
gedit /etc/acpi/actions/hotkeys.sh
gedit /etc/acpi/actions/hotkeys.sh
</pre>
</pre>
Paste this code (UPDATED SCRIPT WITH WORKING VOLUME KEYS)
Paste this code
(NOW HANDLES VOLUME AND WEBCAM SWITCH)
<pre>
<pre>
#!/bin/bash
#!/bin/bash
Line 86: Line 87:
         # Wlan Off
         # Wlan Off
         /etc/acpi/actions/wlan.sh poweroff
         /etc/acpi/actions/wlan.sh poweroff
        ;;
    #Fn+F6
    00000012)
        /etc/acpi/actions/camera.sh
         ;;
         ;;


Line 125: Line 131:


esac
esac
</pre>
</pre>


Line 182: Line 187:
esac
esac
</pre>
</pre>
Webcam Switch file (NEW!):
<pre>
gedit /etc/acpi/actions/camera.sh
</pre>
paste this code:
<pre>
#!/bin/bash
CAMERA=$(cat /sys/devices/platform/eeepc/camera)
        if [[ "$CAMERA" = "0" ]]; then
      echo 1 > /sys/devices/platform/eeepc/camera
        else
            echo 0 > /sys/devices/platform/eeepc/camera
        fi
</pre>
(please, do the following step after updating scripts, or new features like the webcam switch!!!)
Make scripts executable:
Make scripts executable:
<pre>
<pre>

Revision as of 14:43, 10 June 2008

EeePC

The EeePC has really taken the sub-compact pc market by storm. Although the bundled linux installation is interesting, Fedora is more our style. This page should contain all the needed quirks and notes needed to run Fedora perfectly on the eeePc.

News

  • 2008-06-10 Fixed resume from suspend backlight issue, look at the new fix
  • 2008-06-10 Fixed fn Volume keys. Update your script
  • 2008-06-09 Enriching this wiki page with all fixes found by Duli and members of eeeuser forum.
  • 2008-02-14 Red Hat Magazine: Fedora + Eee PC = Eeedora

ACPI State of play

  • Fedora 8: Need to compile the asus_acpi module and use the Asus scripts that handle various functions, Volume Up, Volume Down, Wifi On/Off etc. Asus also provides their OSD code to notify the user that they have pressed a button.
  • Fedora 9: ships with a module called eeepc.ko - read the ACPI support in Fedora 9 to get it work.


Fn Buttons

  • Zz/Fn+F1 - Works as expected computer suspends
  • Wifi/Fn+F2 - read ACPI support in Fedora 9 to get it work.
  • BrtUp/Fn+F3 - Works. No OSD
  • BrtDown/Fn+F4 - Works. No OSD
  • SwitchDisplay/Fn+F5 - read ACPI support in Fedora 9 to get it work.
  • AP/Fn+F6 - AccessPoint Mode? I don't think we need this. I was thinking about making this button use xrandr to switch on and off a scrolling Virtual Display. This should help if a large dialog box pops up off screen. (Originally this Fn Key was meant to open the task manager)
  • Mute/Fn+F7 - Works in Fedora 8 with Asus module. read ACPI support in Fedora 9 to get it work.
  • VolDown/Fn+F8 - Works in Fedora 8 with Asus module. read ACPI support in Fedora 9 to get it work.
  • VolUp/Fn+F9 - Works in Fedora 8 with Asus module. read ACPI support in Fedora 9 to get it work.

What does NOT work

  • Hibernation
  • Making sweet coffee

What Fedora 9 gives you

  • Full linux experience (it runs VERY well with stock gnome)
  • Acceptable boot time
  • Fedora is a lifestyle :) always bleeding edge software for you!


Installing Fedora

  • Using DVD, you need an external DVD/CD reader
  • Using USB pendrive (at least 1 GB) look at THIS PAGE
  • Using USB pendrive, from Windows liveusb-creator

ACPI support in Fedora 9

Let's load ACPI daemon into Fedora 9

su -
yum install -y acpid

Now we must start the ACPI daemon and modprobe the eeepc module.

chkconfig acpid on
service acpid start
modprobe eeepc
echo "modprobe eeepc" >> /etc/rc.local

Now let's handle some FN keys and events create these files

gedit /etc/acpi/events/hotkeys.conf

paste this code:

event=hotkey ATKD .*
action=/etc/acpi/actions/hotkeys.sh %e

Create this file:

gedit /etc/acpi/actions/hotkeys.sh

Paste this code (NOW HANDLES VOLUME AND WEBCAM SWITCH)

#!/bin/bash

export DISPLAY=:0

case $3 in

    #Fn+F2
    00000010)
        # Wlan On
        /etc/acpi/actions/wlan.sh poweron
        ;;
    00000011)
        # Wlan Off
        /etc/acpi/actions/wlan.sh poweroff
        ;;

    #Fn+F6
    00000012)
        /etc/acpi/actions/camera.sh
        ;;

    #Fn+F7
    00000013)
        # Volume mute
        /usr/bin/amixer -q -D hw:0 set Master toggle
        ;;

    #Fn+F8
    00000014)
        # Volume down
        /usr/bin/amixer -q -D hw:0 set Master 10%- unmute
        ;;

    #Fn+F9
    00000015)
        # Volume up
        /usr/bin/amixer -q -D hw:0 set Master 10%+ unmute
        ;;

    #Fn+F5
    00000030)
        /usr/bin/xrandr --output LVDS \
            --preferred --output VGA --off
        ;;
    00000031)
        /usr/bin/xrandr --output VGA \
            --mode 1024x768 --output LVDS --off
        ;;
    00000032)
        /usr/bin/xrandr --output VGA \
            --mode 800x600 --output LVDS --mode 800x480
        ;;

    *)
        logger "ACPI hotkey $3 action is not defined"
        ;;

esac

Other file:

gedit /etc/acpi/actions/wlan.sh

paste this code:

#!/bin/bash

PWR=$(cat /sys/devices/platform/eeepc/wlan)

UnloadModules() {
    rmmod ath_pci
    rmmod ath_rate_sample
    rmmod wlan_scan_sta
    rmmod wlan_tkip
    rmmod wlan_wep
    rmmod wlan
}

LoadModules() {
    modprobe ath_pci
}

case $1 in
    poweron)
        if [[ "$PWR" = "0" ]]; then
            modprobe pciehp pciehp_force=1

	    echo 1 > /sys/devices/platform/eeepc/wlan

	    rmmod pciehp

        fi
        ;;
           
    poweroff)
        if [[ "$PWR" = "1" ]]; then

            modprobe pciehp pciehp_force=1

            ifconfig ath0 down

            wlanconfig ath0 destroy

            UnloadModules

            echo 0 > /sys/devices/platform/eeepc/wlan

            rmmod pciehp

        fi
        ;;
esac

Webcam Switch file (NEW!):

gedit /etc/acpi/actions/camera.sh

paste this code:

#!/bin/bash

CAMERA=$(cat /sys/devices/platform/eeepc/camera)

        if [[ "$CAMERA" = "0" ]]; then
   	    echo 1 > /sys/devices/platform/eeepc/camera
         else
            echo 0 > /sys/devices/platform/eeepc/camera
        fi

(please, do the following step after updating scripts, or new features like the webcam switch!!!)

Make scripts executable:

chmod -v +x /etc/acpi/actions/*

To enable Fn+F5:

su -
echo "xhost +localhost" >> ~/.bash_profile
echo "xhost -localhost" >> ~/.bash_logout

Wireless Drivers

Easy and automatic way using the livna repository

Livna-testing has working madwifi drivers

su
rpm -ivh http://rpm.livna.org/livna-release-9.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-livna

This will compile a kernel module everytime is necessary... So feel free to update your kernel when fedora team releases updates.

yum --enablerepo livna-testing install akmod-madwifi kmod-madwifi

On first new kernel boot, it will compile the new kernel module..when finished, reboot and wifi will work! That's all!

Manual old school way

If you want to compile manually the madwifi driver, use the experimental one:

First install all necessary packages:

su
yum install make binutils gcc glibc-devel glibc-headers libgomp patch kernel-headers kernel-devel wget

Blacklist the ath5k module:

echo "blacklist ath5k" >> /etc/modprobe.d/blacklist

Look at your modprobe.conf:

gedit /etc/modprobe.conf

Your /etc/modprobe.conf should look like this:

<!-- Start Atheros Stuff
-->
alias wifi0 ath_pci
alias ath0 ath_pci
options ath_pci autocreate=sta
<!-- End Atheros Stuff
-->

Download madwifi-nr-r3366+ar5007 driver:

wget http://snapshots.madwifi.org/special/madwifi-nr-r3366+ar5007.tar.gz

Extract madwifi source code and compile it:

tar xvf madwifi-ng-r2756-20071018.tar.gz
cd madwifi-nr-r3366+ar5007
make && echo ok
su -c "make install && echo ok"


Fixes and solutions to common problems

Shut down fix

If your EeePC does not entirely shutdown, add the following line to /etc/init.d/halt (I put right after the "Saving mixer setting" stuff):

su -
gedit /etc/init.d/halt

add this line just before the # Save random seed block

#Shutdown eeepc fix
modprobe -r snd-hda-intel && echo "snd-hda-intel module removed!"

Bug has been reported: https://bugzilla.redhat.com/show_bug.cgi?id=444115


Wireless resume from suspend fix

With madwifi driver, wireless doesn't work when resuming from sleep...but we can fix this issue with this script

Create the file:

su -
gedit /etc/pm/sleep.d/S99wireless

and paste this code:

#!/bin/sh

case "$1" in
thaw|resume)
{ ip link set wifi0 up ; } 2>/dev/null
;;
*)
;;
esac
exit $?

( Please Note that the machine won't suspend if the radio is turned off and the Madwifi driver is still loaded. )

Make the script executable:

chmod +x /etc/pm/sleep.d/S99wireless

NetworkManager drop outs fix

Not necessary in Fedora 9

  • Works well with the Madwifi-NG drivers. To solve problems with frequents drop outs and communication problems try issuing this command.
iwpriv ath0 bgscan 0
  • Just a quick update on a better way to issue this command on every boot. Edit your /etc/modprobe.conf and change change your lines for ath0 to look like this.
alias ath0 ath_pci
install ath_pci /sbin/modprobe --first-time --ignore-install ath_pci && { /sbin/iwpriv  ath0 bgscan 0 > /dev/null 2>&1 || :; }

Internal Mic not working fix

Double leftclick the volume icon, open preferences and enable e-Mic and e-Mic Boost. In options select input source: e-Mic

(strange, i-mic and e-mic are inverted!)

TouchPad tap fix

To fix the lack of TouchPad tap in Fedora 9, just install the Synaptics package available HERE

Old solution (I think this is for Fedora 8, please specify) To enable the touchpad tapping, make your /etc/X11/xorg.conf look like this .

No backlight on resume from suspend FIX

As root do:

su -

echo 'lastbrn=`</sys/devices/platform/eeepc/brn`' >> /usr/lib/pm-utils/sleep.d/99video
echo 'echo $lastbrn  > /sys/devices/platform/eeepc/brn' >> /usr/lib/pm-utils/sleep.d/99video

Hints and alternative software

Openbox as window manager

Do yourself a favor and install Openbox .

yum install openbox obconf

After installation you will need to choose openbox as your new window manager. If you are running gdm click on the session button and choose Gnome/Openbox. If you have an .xinitrc that is run at log in you can add, openbox, openbox-session or openbox-gnome-session to it.

Why?

  • This Window Manager is FAST!!!
  • The decorations are very small and simple.
  • By default Openbox trys to shrink windows to fit the viewable screen
  • Did I say this how fast this WM is?

Firefox 3, really a cpu eater

Use Epiphany instead of Firefox 3... it's slim (written using the GTK libs) fast as firefox 3, same compatibility (uses gecko as rendering engine).


Source Code

If you want to take a look at the default source code which comes in the EeePC, you could check Asus ftp:

http://update.eeepc.asus.com/p701/pool/

Comments

It might be good to coordinate efforts and reach out to http://code.google.com/p/eeedora/. Some comments at http://www.bytebot.net/blog/archives/2008/01/31/eeedora-impressions and at http://wiki.eeeuser.com/howto:eeedora