Linux‎ > ‎

Fedora 13 and ASUS Eee PC 1005PEB

I bought a new ASUS Eee PC 1005PEB in March of 2010.  Below are some notes I'm taking while install linux on it.  At this time only Fedora 13 Alpha is out but notes should apply mostly for final Fedora 13 as well.

I've also made some updates based on behaviour after upgrading to Fedora 14.

Overview

What works with default install:
  • Intel N450 Pineview CPU with speed control
  • 1024x600 Display
  • Intel Pineview Graphics with 3D Support
  • Atheros Wireless 802.11b/g (no additional drivers needed!)
  • Touchpad
  • USB
  • Keyboard
  • Audio Speakers and Headphone Jack
  • Webcam
  • SD Card Reader
  • Ethernet Connector
  • Suspend(Sleep)/Resume from Suspend
  • Hibernate/Resume from Hibernate
Not tested:
  • Mic Audio Jack
  • VGA Output

Resizing Windows 7 Partition

Windows seems to prefer to place some system files (page file, hibernate file, and system restore files) above the half way point on a drive and defrag can not move them around.  Since I want to give half or more to Linux and other OS's, I used the following steps to move the files.

  • Delete crapware, install any new apps, and upgrade the system.
  • Download UltraDefrag and install it.  Run it and click on "Settings..." button.  Click check mark by "Enable" for Windows boot time scan".  Finally, click on "Script" button to modify script ran at startup.  Change line that says "ultrascan c:" to "ultrascan -o c:'.  Upon next bootup, this will run an optimized scan and moves all files towards front of drive.  This is not enough though because it can not move page files, hibernate files, or system restore files.  The following steps will get of those files before rebooting.
  • Disable System Protection by selection Start->Control Panel->System and Security->System->System Protection.  On System Protection tab, click Configuration and then disable option.  After future reboot, re-enable on same menu.
  • Disable Hibernation by selecting start menu and in search box type "cmd" but don't hit enter.  Using right button press, select Run As Administrator.  Run "powercfg /hibernate off".  On future reboot, use same sets but use "on".
  • Disable the virtual memory pagefile by selecting Start->Control Panel->System and Security->System->Advanced System Settings.  On Advanced tab, click on Performance Setting.  On Advanced tab, click Virtual Memory Change button. Click No Page Setting.  After future reboot, re-enable on same menu.
  • Reboot. This will run UltraDefrag during boot. After reboot, run UltraDefrag and Analyze drive to verify all was moved towards front.
  • Reuse above instructions to re-enable System Restore protection, virtual memory page file, and hibernation.  You will also want to disable running UltraDefrag or at least take out the '-o" option so its not so slow.
Once the drive has all the free space towards end, its time to shrink the drive.  Under start menu's "Search programs and files" input box, enter "diskmgmt.msc" and hit enter.  On screen will be  bar with graphical picture of hard drive space. Click on the first partition and then right click and select "Shrink Volume...".  Adjust size to your desired size.

Installing Fedora

Its easiest to install Fedora using a Live CD saved to a USB flash drive.  Fedora Project provides very good details on how to do this.  To use the USB drive, you may need to change the boot priority in BIOS settings menu.  Also, I think you can hit Escape and then TAB key during boot sequence and the BIOS will request which device to boot from.

After installing, it doesn't include all the applications that the more standard DVD install would give.  You can get the default set of applications by running following command line once logged in.
yum groupupdate "GNOME Desktop Environment" \
"Development Tools" "Server Configuration Tools" \
"Hardware Support" "Sound and Video" \
"Graphical Internet" "Fonts" \
"Games and Entertainment" "Printing Software" \
"Administration Tools" "Office/Productivity" "System Tools"

ACPI and eeepc-laptop

There is a kernel driver that supports a bunch of eeepc specific hardware features (hotkeys, SHE underclocking/overclockingt, etc).  This will not load with stock Fedora 13 because it reports itself as Windows 7 and this disables eeepc_laptop interface but enables eepc_wmi interface (which isn't in Fedora 13).  It seems you need to add acpi_osi="!Windows 2009" to your kernel line in /boot/grub/grub.conf.  Upon next bootup, the eeepc-laptop module will be loaded.  There will still be one remaining issue because backlight dimming will not work correctly (as of firmware 4/13/2010).  Add acpi_backlight=vendor and this will let eeepc_laptop control dimming as well.

UPDATE: 2010/10/15 - When ACPI detects Windows 2009 query, it disables older ACPI interfaces and switches to WMI which is a standard defined by Microsoft.  There is a eeepc-wmi driver in Fedora 14 that works with default acpi_osi values for most hotkeys and backlight.  But this driver doesn't let you control SHE as described below.  I have submitted patches upstream to eeepc-wmi to re-enable cpufv/SHE interface and some missing hotkeys and will be in kernel 2.6.37.

Keyboard

The Fn keys that work with eeepc-laptop:
  • Fn-F1 (Sleep)
  • Fn-F2 (Wireless disable) - Disables but doesn't notify NetworkManager and confuses things.
  • Fn-F5 and Fn-F6 (Dimmer)*
  • Fn-F8 (Switch Video Mode)
  • Fn-F10/Fn-F11/Fn-F12 (Mute/Volume Down/Volume Up)*
The Fn keys that do not do anything by default but can be mapped to something using Shortcuts:
  • Fn-F3 (Disable Mouse) - Reports as KEY_F13 key
  • Fn-F4 (Screen Resolution) - Reports as KEY_F14 key
  • Fn-F7 (Display Off) - Reports as KEY_DISPLAY_OFF
  • Fn-F9 (System Task Manager) - Reports as KEY_PROG1
For example, I mapped Fn-F9 to to run gnome-system-monitor by running System->Preferences->Keyboard Shortcuts.  Next, I click the Add button and add an item called "System Monitor" that runs "gnome-system-monitor".  Once created, I click on it and hit Fn-F9 to bind key to shortcut command.

*Volume keys only work after adding acpi_osi="!Windows 2009" to boot options.  Dimming requires that option as acpi_backlight=vendor as well.

For Fn-F4 (resolution), I do not have any need for smaller resolutions but I would like to use a higher resolution for apps that just don't work well with 1024x600.  xrandr supports an --scale option that will allow going higher; although rather ugly.  I make use of Keyboard Shortcuts and run the following script to toggle between 1024x600 and 1024x768 resolutions.  Save the following to a file and "chmod 755 restoggle.sh".

#!/bin/bash

find_res=`/usr/bin/xrandr | grep "1024x768"`

if [ $? == "0" ]; then
  xrandr --output LVDS1 --mode 1024x600 --scale 1.00x1.00
else
  xrandr --output LVDS1 --mode 1024x600 --scale 1.00x1.28
fi

UPDATE: 2010/10/15 - On Fedora 14, Fn-F2, F5, F6, F10, F11, and F12 all work as you would expect now.  Fn-F3, F4, F7, and F9 have a regression but I have submitted patches upstream to re-enable these in new eeepc-wmi module.

UPDATE: 2010/11/05 - There is some hope in getting Fn-F3 working.  It seems that F22 is currently being used as indication in Gnome (gnome-settings-daemon) to toggle touchpad.  To get this working, you would need to recompile your linux kernel and edit eeepc-laptop/eeepc-wmi and change reference of KEY_F13 to KEY_F22.  I'm attempting to work with upstream to get this working out of the box.

UPDATE: 2011/01/02 - FIgured out how to fix Fn-F3 without patching the kernel by using udev to remap them.  Recent updates to Fedora have changed F22 for touchpad toggle to F21 instead.  If you have old software, change below text to f22.  Add following two lines to your /lib/udev/rules.d/95-keymap.rules towards area were a "ASUS*" already exists and reboot.   I've submit it as patch to udev team so hopefully it will show up in a future udev update.

ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Eee PC WMI hotkeys", RUN+="keymap $name 0x6B f21"
ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Eee PC Hotkey Driver", RUN+="keymap $name 0x37 f21"

Touchpad

The touchpad works pretty good with the synaptics X driver by default.  Select System->Preferences->Mouse to enable tap-to-click feature.

I noticed using that Mouse preferences that the 2 finger options were greyed out.  Using the gpointing-device-settings application, I also noticed that 2 and 3 finger support was not working.  Digging deeper, I noticed in dmesg output that it lists its capabilities as 0xd04731.  Digging in the kernel and in Synaptics documents I see that means the hardware says it can report finger widths but not multi-touch.  The windows drivers seems to be using the width of fingers to determine when 1, 2, or 3 finger gestures are being done.

The xf86-input-synaptics driver does have an xorg.conf value that can be used to emulate 2 finger multi-touch.  It is EmulateTwoFingerMinW since it needs to be based on W value.  I've not tried it yet.

Another major issue with the netbook is related to its size.  When you put your finger on the button to click, its very easy for that to also register as touching the lowest row of touchpad (they can sense things even when your not touching the pad).  If your other hand is moving the mouse cursor at same time, you can get unwanted mouse jumps once that other hand is lifted off the mouse pad.

Googling the issue turns up a few common complaints on this but no clean solutions yet.

UPDATE: 09/07/2010 - Good progress made with touchpad.  As of this commit to linux kernel, the syaptics driver will now correctly inform userspace when hardware supports finger width reporting.  As of this commit, xf86-input-synaptics defaults to enabling 2-finger emulation on hardware that supports finger width reporting.  This reduces enabling 2-finger scrolling mode to single xinput.  I've also submitted this patch that stops most cursor jumps related to multi-touch. 

xf86-input-synaptics-1.3.0 and Fedora 14 contains all mentioned updates. 

I've submitted this patch to config GUI gnome-mouse-properties to un-grey option for enabling 2-finger scrolling on hardware that supports 2-finger emulation but I've heard no response.  In mean time, you'll need to use X config files or xinput to enable 2-finger scrolling mode or I've read you can bypass the Gnome GUI by executing:  gconftool-2 --set /desktop/gnome/peripherals/touchpad/scroll_method --type int "2"

Super Hybrid Engine

I have written a utility that is similar to the utility that Asus distributes with Eee PC's under Windows.  It adjust the Super Hybrid Engine (SHE) to optimal settings.  It will change to Power Savings while on battery and Super Performance while on AC.

See my projects page to download and install the system service.

Audio

Audio through built in speakers works out of the box.  I was able to get audio to play out the head phone connectors as well but you have to finding a non-obvious Pulse Audio mixer GUI (already forgotten how to get there) and select head phones as output device.  Once your done, you have to remember to switch it back to built in speakers.  This is enough of a pain that I consider headphone jack as not working until a better solution can be found.

Windows 7 automatically detects when you plug in head phones and gives you a pop-up window asking if you want to switch audio to head phones.  When you unplug them, Windows automatically restores to built in speakers (no pop-up).  I would hope this is possible under Linux as well.

TODO: I noticed browsing /usr/include/linux/input.h that a switch event exists called SW_HEADPHONE_INSERT.  I've no idea if its ALSA or ACPI or what that would generate it.  It would be nice if that event could be sent upon insertion and we monitor for it and then can do similar to Windows 7.   Who knows; maybe Gnome already does the right thing if just we sent that event.

Mounting Windows Partition

Since I am duel booting with Windows 7, I wanted to be able to share data between the two OS's.  Linux can read NTFS partitions but there is not really any support for reading EXT4 partitions.  So when data needs to be shared, it should always be stored on the NTFS partition.

To always have NTFS parition mounted on bootup, add the following line to your /etc/fstab file:

/dev/sda1       /media/Windows\0407     ntfs    defaults        1 2

Also, create this directory:

mkdir "/media/Windows 7"

To make sure file permissions are correctly translated to something Windows understands, run the following command while NTFS partition is not mounted.  Follow the prompts and inform it of linux users and groups for your main users under Windows.

ntfs-3g.usermap

Once thats done, you need to move the files created over to Windows partition.

mount "/media/Windows 7"
mkdir "/media/Windows 7/.NTFS-3G"
mv UserMapping "/media/Windows 7/.NTFS-3G"
umount "/media/Windows 7"
mount "/media/Windows 7"

My hopes are I can do things like share a single Dropbox directory on Windows partition and have it sync correctly regardless of which OS I'm running.

Comments