https://wiki.archlinux.org/api.php?action=feedcontributions&user=Sylis&feedformat=atomArchWiki - User contributions [en]2024-03-29T07:59:34ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_701&diff=104449ASUS Eee PC 7012010-04-22T22:12:20Z<p>Sylis: /* Using Wine with toofishes' kernel */ Wine available out of the box since 2.6.32eee</p>
<hr />
<div>[[Category:ASUS (English)]]<br />
Most of this information is from the [http://bbs.archlinux.org/viewtopic.php?pid=297632 Arch Forum]. You can also find a lot of helpful information from the [http://forum.eeeuser.com/ EEEUser Forum]. <br />
<br />
==Before You Begin==<br />
<br />
===Avoiding Pitfalls===<br />
<br />
The install is pretty normal, except that you'll need to [http://forum.eeeuser.com/viewtopic.php?id=890 avoid the pitfalls] of our alternative Linux install:<br />
<br />
# Never choose to use a journaling file system on the SSD partitions<br />
# Never use a swap partition on the SSD<br />
# Edit your new installation fstab to mount the SSD partitions "noatime"<br />
# Never log messages or error log to the SSD<br />
<br />
The rules ensure that we won't reach the maximum limit of writes on our SSD faster than we should, although this is being contested (see [http://wiki.eeeuser.com/ssd_write_limit this link] and [http://www.storagesearch.com/ssdmyths-endurance.html this other link]).<br />
<br />
Some other minor modifications can be made to decrease number of non-mandatory writes by applications: deactivate {{Filename|~/.viminfo}} in vi, deactivate less history file ({{Filename|~/.lesshst}}), and so on.<br />
<br />
===Choosing Your Installation Media===<br />
<br />
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:<br />
<br />
# [[Beginners_Guide#USB_stick|USB stick]] '''(Recommended)'''<br />
# External USB CD-ROM drive<br />
# [[PXE|Network (PXE)]]<br />
<br />
==Installing Arch Linux==<br />
<br />
With the release of the 2009.08 installation media, installing Arch Linux on Asus Eee PC model 701 is pretty easy and straightforward since the stock kernel on Arch installation media support all of the 701 hardwares out of the box. <br />
<br />
Therefore, aside from the following pointers specific to the 701 described below, there shouldn't be any other major differences between installing Arch Linux on the 701 and any other computer. You should be able to successfully install Arch on the 701 by following instructions on [[Beginners_Guide|Beginners' Guide]] without any problem.<br />
<br />
===Prepare Hard Drive===<br />
<br />
The most important different between the 701 and other machines is that the 701 use SSD drive instead of normal hard drive. This section advise on how to set up a partition scheme that is best suited to the 701. <br />
<br />
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): <br />
<br />
* 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 '/'.<br />
* Choose "NONE" for swap in case your eee has a SSD (see #2 in [[Installing_Arch_Linux_on_the_Asus_EEE_PC#Avoiding_Pitfalls|Avoiding Pitfalls]])<br />
* Select "ext2" as your filesystem in case your eee has a SSD (see #1 in [[Installing_Arch_Linux_on_the_Asus_EEE_PC#Avoiding_Pitfalls|Avoiding Pitfalls]]). If your model has a standard HD choose "ext3".<br />
<br />
===Install X===<br />
<br />
Install X by follow instructions on the [[Beginners_Guide#Step_2:_Install_X|Beginners' Guide]], then install the Intel graphics driver:<br />
# pacman -S xf86-video-intel<br />
<br />
You must also install the Synaptics driver to have touchpad working properly (not needed for Eee PC 900):<br />
# pacman -S xf86-input-synaptics<br />
<br />
With the latest version of X from extra repository, X should work on the 701 '''without any need for xorg.conf'''. However, if for some reason you wish to use an xorg.conf file, you can use an old [[Example_Xorg_configuration_file_for_Asus_Eee_PC_701|example Xorg configuration file for Asus Eee PC model 701]] as a template or automatically generate a new one by running the following command:<br />
<br />
# Xorg -configure<br />
<br />
Consult [[Xorg_input_hotplugging|Xorg Input Hotplugging]] for more information on how to config input devices using HAL.<br />
<br />
The synaptics stuff can be removed if you have a EEE PC 900. The {{Codeline|Option "AutoAddDevices"}} line is important if you need a non-default XkbLayout, because if you don't have it, xorg will find 3 keyboards (at least with the 900 model).<br />
The Modeline has obviously to be removed or modified if you dont have a model with this resolution.<br />
<br />
===Getting Hot Keys, Graphic Indicators and Shutdown with the Power Button Working===<br />
<br />
If you want to have working hot keys (wifi, brightness, volume etc), an OSD, and be able to assign actions to things like the powerbutton and closing the lid, then you should install '''ighea's acpi-eee''' package.<br />
<br />
==== ighea's acpi-eee ====<br />
<br />
Get the latest package from [http://kapsi.fi/ighea/eee/acpi-eee/ here].<br />
<br />
The package can be easily installed with:<br />
# pacman -U acpi-eee-10.0-1-i686.pkg.tar.gz<br />
<br />
See messages during installation for more details and don't forget to edit {{Filename|/etc/acpi/eee.conf}} to suit your tastes.<br />
<br />
*For those who use the wireless on/off acpi command; the {{Codeline|NETWORK_UP_COMMAND&#61;""}} setting in {{Filename|/etc/acpi/eee.conf}}, when applicable, should at least release the network. For example, using netcfg2, {{Codeline|NETWORK_UP_COMMAND&#61;"netcfg2 -a"}} will release the connections from before disabling wireless, allowing new ones to be made without netcfg thinking that it's already connected. It is also possible to reconnect to your previous network, however, the network tool you use needs to have a somewhat lengthy timeout as it takes 15-20 seconds for your wireless device to reappear. <br />
<br />
{{Note | Make sure '''asusosd''' is enabled on startup if you want to have the Graphic Indicators from Xandros. To run asusosd simply type {{Codeline|asusosd &}} at a command prompt.}}<br />
<br />
==Asus Eee PC model 701 repository from toofishes==<br />
<br />
Toofishes created a repository for the 701. The repository contained customized kernel built specifically for the 701 and some additional packages. <br />
<br />
While the stock Arch kernel works very well with the 701, toofishes kernel have the following advantages:<br />
<br />
* Faster boot time &ndash; because most of the modules have been compile into the kernel, no time is wasted waiting for the modules to load<br />
* No need to generate initial ramdisk every time a kernel is upgrade <br />
* Small size (around 4MB)<br />
<br />
To use the repository, add:<br />
[eee]<br />
Server = http://code.toofishes.net/packages/eee<br />
to your {{Filename|/etc/pacman.conf}} and then issue:<br />
pacman -Syu<br />
<br />
===Package List===<br />
Currently, toofishes' repository contains the following packages:<br />
<br />
*'''kernel-eee''' &ndash; customized kernel for Asus Eee PC model 701<br />
*'''luvcview''' &ndash; webcam program for testing webcam driver<br />
<br />
===Kernel-eee Installation Instruction===<br />
Simply use pacman to install the package you need. Install the packages with this command:<br />
# pacman -S kernel-eee<br />
<br />
then, add the following to {{Filename|/boot/grub/menu.lst}}; note that no initrd is needed:<br />
# (2) Arch Linux<br />
title Arch Linux Eee kernel<br />
root (hd0,0)<br />
kernel /boot/vmlinuzeee root=/dev/sda1 ro<br />
<br />
Restart and select Arch Linux Eee kernel from the grub boot menu.<br />
<br />
==Additional Tips & Tweaks==<br />
<br />
===Tweaking kernel-eee===<br />
<br />
Toofishes' kernel, also known as kernel-eee, can be recompiled to include custom features. You can download toofishes' kernel PKGBUILD and all the nesseary files from his gitweb by installing the git package and using the following command:<br />
<br />
$ git clone git://code.toofishes.net/dan/eee.git<br />
<br />
or if you are behind a proxy and can't use the git protocol:<br />
<br />
$ git clone http://code.toofishes.net/git/dan/eee.git<br />
<br />
There are two ways to tweak the kernel. The first is simply to edit the {{Filename|kernelconfig}} file with your favorite editor and the second is to insert a {{Codeline|make menuconfig}} line into the PKGBUILD before the kernel's compilation.<br />
<br />
===Using Wine with toofishes' kernel===<br />
<br />
{{Note | Since ''kernel-eee 2.6.32eee'', wine is working fine without the need of customizing toofishes' kernel as explained below}}<br />
<br />
Normally, Wine won't work with toofishes' kernel because it is compiled with VMSPLIT_2G_OPT option. In order to use Wine with toofishes' kernel, you have to recompile his kernel with VMSPLIT_3G option.<br />
<br />
Download the kernel PKGBUILD and all the necessary files from toofishes' gitweb using the above instructions, then change the following lines in the {{Filename|kernelconfig}} file from this:<br />
<pre><br />
...<br />
230 CONFIG_NOHIGHMEM=y<br />
231 # CONFIG_HIGHMEM4G is not set<br />
232 # CONFIG_HIGHMEM64G is not set<br />
233 # CONFIG_VMSPLIT_3G is not set<br />
234 # CONFIG_VMSPLIT_3G_OPT is not set<br />
235 # CONFIG_VMSPLIT_2G is not set<br />
236 CONFIG_VMSPLIT_2G_OPT=y<br />
237 # CONFIG_VMSPLIT_1G is not set<br />
...<br />
</pre><br />
to this:<br />
<pre><br />
...<br />
230 CONFIG_NOHIGHMEM=y<br />
231 # CONFIG_HIGHMEM4G is not set<br />
232 # CONFIG_HIGHMEM64G is not set<br />
233 CONFIG_VMSPLIT_3G=y<br />
234 # CONFIG_VMSPLIT_3G_OPT is not set<br />
235 # CONFIG_VMSPLIT_2G is not set<br />
236 # CONFIG_VMSPLIT_2G_OPT is not set<br />
237 # CONFIG_VMSPLIT_1G is not set<br />
...<br />
</pre><br />
<br />
Compile and install the kernel and Wine should now work.<br />
<br />
===Power down with the power button===<br />
<br />
{{Note | If you are using ighea's acpi-eee or 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.}}<br />
<br />
The two alternatives here are described in [[Allow users to shutdown]].<br />
<br />
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.<br />
<br />
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.<br />
<br />
# pacman -S sudo<br />
<br />
As root, do the following:<br />
# visudo<br />
<br />
Add the following line to the file:<br />
USER HOST = NOPASSWD: /sbin/poweroff<br />
<br />
Where {{Codeline|USER}} is the user you want to be able to power down with and {{Codeline|HOST}} is your hostname (from {{Filename|/etc/rc.conf}}).<br />
<br />
Now, create a file called {{Filename|/etc/acpi/events/power}}, containing:<br />
# /etc/acpi/events/power<br />
# This is called when the user presses the power button<br />
<br />
event=button/power (PWR.||PBTN)<br />
action=sudo /sbin/poweroff<br />
<br />
Make sure that you execute:<br />
# /etc/rc.d/acpid start<br />
<br />
And/or add acpid to the daemons list in {{Filename|/etc/rc.conf}}:<br />
DAEMONS=(hal, acpid ...)<br />
<br />
===Use cpufreq for power saving===<br />
<br />
{{Note | toofishes dropped CPU scaling from his latest kernel builds, due to the fact, confirmed by other users, that there were no effective power savings with p4-clockmod's module, and it introduced "unacceptable latency", even with relatively low percentage up thresholds.}}<br />
<br />
Install cpufrequtitls:<br />
# pacman -S cpufrequtils<br />
<br />
For scaling down the processor you have to load the p4_clockmod module. Insert it into your {{Filename|/etc/rc.conf}} MODULES array for loading it at startup. <br />
MODULES=(... p4_clockmod ...)<br />
<br />
{{Note | The merits of p4-clockmod are debatable. Particularly on the EEEPC 701, battery time isn't extended due to its usage, and some users have even reported less battery duration. More hints to the reasons why can be read in [http://www.codemonkey.org.uk/2009/01/18/forthcoming-p4clockmod/ this] fine blog entry.}}<br />
<br />
Add 'cpufreq' to the DAEMONS array in {{Filename|/etc/rc.conf}} to have it start on startup.<br />
DAEMONS=(... cpufreq ...)<br />
<br />
Add the following into {{Filename|/etc/conf.d/cpufreq}}:<br />
governor="ondemand"<br />
min_freq="113MHz"<br />
max_freq="900MHz"<br />
<br />
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.<br />
<br />
===More responsive system with ondemand governor===<br />
The default up_threshold (where it will bump to a faster speed) for the CPU governor is 80, which means it will increase the CPU speed when utilization is above 80%. This can make X applications have a bit of lag. <br />
<br />
Try changing this value:<br />
$ sudo bash -c "echo 40 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold"<br />
<br />
With 40 it still leaves the majority of CPU cycles at the lowest available clock speed but increases responsiveness. You can add this line to one of your startup scripts (such as {{Filename|/etc/rc.local}}) if you wish to keep it, for example:<br />
<br />
#!/bin/bash<br />
#<br />
# /etc/rc.local: Local multi-user startup script.<br />
#<br />
<br />
echo 40 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold<br />
<br />
Also, following line is also reported to help makes system more responsive. You can use it by adding it to your {{Filename|/etc/rc.local}}:<br />
echo 2000000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate<br />
<br />
===Speeding up udev for faster boot===<br />
*[[Speedup udev]]<br />
*http://dev.laptop.org/ticket/4349<br />
*[http://www.eeesale.com/Asus-Eee-PC-overclock-Benchmarks.htm Speed up the Eee PC]<br />
<br />
You can also disable the autoload by editing your {{Filename|[[rc.conf]]}}:<br />
...<br />
MOD_AUTOLOAD="no"<br />
...<br />
MODULES=(pciehp ath5k)<br />
<br />
===Update your BIOS without Xandros===<br />
{{Warning | You can break your system, do not update if you are not sure of what you are doing!}}<br />
<br />
First, you need to download the ''.rom'' file.<br />
*[http://update.eeepc.asus.com/bios/ Asus' official BIOS]<br />
*[http://forum.eeeuser.com/viewtopic.php?id=3485 EeeUser's topic]<br />
<br />
You also need an USB stick formatted in FAT32. To format the USBStick, use the cfdisk tool:<br />
# cfdisk /dev/sdc # could be something else than "c"<br />
<br />
Choose [delete], [type]: "fat32" (code 0B), [write] and then exit with [quit].<br />
<br />
NOTE to EEE PC 900 owners and possibly others: Using this method will require a flash drive formatted with a '''FAT16''' file-system. If the BIOS update process hangs up at "Reading file 900.ROM" for more than a few minutes then it should be safe to power down your EEE PC and reformat your flashdrive's file-system to the correct one. You can force FAT16 creation with the following command:<br />
# mkdosfs -F 16 /dev/device-path<br />
<br />
Now just copy the ''.rom'' on the USBStick :<br />
$ cp /somewhere/blabla/.../thecurrentnameofthefile.ROM /path/to/mounted/usb_stick/701.rom<br />
The name of the copy '''must''' be xxxx.rom where xxxx is the model of your eee PC. (i.e. 900 users it's 900.rom)<br />
<br />
Next step, reboot the eeepc with the USB stick pluged-in, and press Alt+F2. It will launch the built-in tool. Everything should be Ok, you can make a coffee during the update. When it asks you to push the power-button it has finished.<br />
<br />
At the next boot, you'll be invited to configure the BIOS. Check if the everything is enabled (my webcam and wireless were disabled after the update) and if it displays the good version in the main screen. It's done!<br />
<br />
=== More usable font sizes ===<br />
<br />
====The_glu's method====<br />
<br />
I found an easy solution that works on a 901:<br />
<br />
Edit {{Filename|/etc/X11/xinit/xserverrc}} and add "-dpi 134":<br />
exec /usr/bin/X -nolisten tcp -dpi 134<br />
<br />
Restart X and fonts should have the correct size. Notice it's won't works if you have Xft*dpi: in your {{Filename|.XDefaults}}.<br />
<br />
You don't need to edit your config file to set a smaller font size, I you did you should set font-size to 10 or you will have to small fonts...<br />
<br />
==== Old method ====<br />
<br />
On a default installation with Xfce 4 my font sizes were too big, here is what I did to sort them out.<br />
<br />
First, I set the DPI by adding the following to {{Filename|~/.Xdefaults}}:<br />
Xft*dpi: 134<br />
<br />
This then caused the fonts to be even bigger, so I set them all to be font-size 6 by adding the following into {{Filename|~/.gtkrc-2.0}} (note that this will be overwritten if you use any tools to change GTK settings):<br />
style "user-font"<br />
{<br />
font_name="Bitstream Vera Sans 6"<br />
}<br />
widget_class "*" style "user-font"<br />
<br />
To do the same with KDE fonts (without KDE installed) you have to add the following to {{Filename|~/.kde/share/config/kdeglobals}}:<br />
[General]<br />
StandardFont=Bitstream Vera Sans,6,-1,5,50,0,0,0,0,0<br />
activeFont=Bitstream Vera Sans,6,-1,5,75,0,0,0,0,0<br />
fixed=Bitstream Vera Sans Mono,6,-1,5,50,0,0,0,0,0<br />
font=Bitstream Vera Sans,6,-1,5,50,0,0,0,0,0<br />
menuFont=Bitstream Vera Sans,6,-1,5,50,0,0,0,0,0<br />
taskbarFont=Bitstream Vera Sans,6,-1,5,50,1,0,0,0,0<br />
toolBarFont=Bitstream Vera Sans,6,-1,5,50,0,0,0,0,0<br />
<br />
To make your fonts even prettier enable the [[Fonts#Fonts_with_LCD_filter_enabled|LCD Fonts]].<br />
<br />
==== Alternative Method ====<br />
<br />
For me it worked far better to open the gnome appearance control panel, go to the fonts tab, click defaults, and change the resolution to be 96 dpi. Changing .Xdefaults doesnt work when running gnome, as gnome-settings-daemon overrides it. You can then leave all font sizes at their default, and things should look good. Simply changing the font sizes and leaving the DPI at its technically correct value (~134) gave me weird layout problems in some apps, and oddly large fonts in others.<br />
<br />
==Known problems and their solutions==<br />
<br />
===Sound===<br />
<br />
For most people, sound should work right out of the box with no troubles. However, others might need to add the following line to {{Filename|/etc/modprobe.conf}}<br />
options snd-hda-intel model=3stack-dig<br />
or the following one for the Eee PC 900 model<br />
options snd-hda-intel model=auto<br />
<br />
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.<br />
<br />
===Webcam===<br />
<br />
If for some reason webcam has been disabled on your 701, you can enable it by issuing the following command as root: <br />
<br />
echo 1 > /sys/devices/platform/eeepc/camera<br />
<br />
If you want the webcam application that the default Xandros installation uses, install [http://aur.archlinux.org/packages.php?do_Details=1&ID=14469 ucview from the AUR].<br />
<br />
The webcam also works fine with the latest version of Skype.<br />
<br />
If you already have mplayer installed you can launch:<br />
$ mplayer -fps 15 tv://<br />
<br />
I have yet to get it working with vlc or any other software such as xawtv. If you know how, please update this.<br />
<br />
*'''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:<br />
<br />
Install [http://aur.archlinux.org/packages.php?do_Details=1&ID=14468 libwebcam from the AUR].<br />
<br />
Issue the following command:<br />
$ uvcdynctrl --set "Exposure, Auto" 4<br />
<br />
{{Note | Be sure the "OS Installation" option is set to "finished" in the BIOS' "Advanced" tab or your camera may not work in some applications (like Skype).}}<br />
<br />
{{Note | Make sure you are a member of the video group edit /etc/group and add your username to video}}<br />
<br />
===Microphone===<br />
<br />
Solution for problems with the internal microphone.<br />
<br />
1. First of all set in alsamixer "Input Source" to "i-Mic"<br />
<br />
2. Increase "Capture" and "i-Mic Boost" to your needs<br />
<br />
3. Edit {{Filename|/etc/asound.state}} the following, change the 2 "false" to "true" like showing:<br />
....snap.....<br />
control.11 {<br />
comment.access 'read write'<br />
comment.type BOOLEAN<br />
comment.count 2<br />
iface MIXER<br />
name 'Capture Switch'<br />
value.0 true<br />
value.1 true<br />
}<br />
....snap....<br />
<br />
4. After editing run following as root<br />
# alsactl restore<br />
<br />
5. Now your internal microphone should be working.<br />
<br />
===Wireless doesn't work, even after installing custom Madwifi module===<br />
<br />
I found that Arch tried to use the ath5k module for wireless, and that meant it took control of the card rather than ath_pci (the module I had compiled and installed). I got a Madwifi status 3 message in dmesg when this happened.<br />
<br />
The solution is to blacklist the ath5k module in {{Filename|/etc/rc.conf}}:<br />
<br />
MODULES = ( ... !ath5k ... )<br />
<br />
===Laggy or Unresponsive ACPI Events===<br />
<br />
The latest kernel (2.6.26) introduces new problems with Eee's ACPI events handling. Basically, ACPI events become very laggy and after some time ACPI get disabled after a heavy usage (e.g. changing volume, brightness). This problem affects both stock kernel and toofishes' kernel.<br />
<br />
It appears that the solution is to apply this [http://bugzilla.kernel.org/attachment.cgi?id=16862 patch] ([http://bugzilla.kernel.org/show_bug.cgi?id=10724 original bug report]) to the kernel. <br />
<br />
{{Note | The latest toofishes' kernel, version 2.6.26-1, now includes the patch, but you can still use ighea's one for the extras features listed below.}}<br />
<br />
Until toofishes update his kernel to include the patch, you can use ighea's slightly modified toofishes' kernel that included the above patch, as well as other modifications:<br />
<br />
*Support for Wine <br />
*uvesafb is built as module <br />
*Use [http://bbs.archlinux.org/viewtopic.php?pid=393860#p393860 new eeepc-laptop driver] (which also handles fan-control) instead of older acus_acpi or asus-laptop -drivers.<br />
<br />
You can get the modified kernel, as well as the associative packages, from [http://koti.kapsi.fi/~ighea/eee/kernel-eee/ here].<br />
<br />
After you have downloaded the packages, Install them using this command:<br />
# pacman -U kernel-eee-2.6.26-1-i686.pkg.tar.gz madwifi-eee-svn-3752-1-i686.pkg.tar.gz <br />
<br />
You might also want to use IgnorePkg-line in {{Filename|/etc/pacman.conf}} to hold packages from being accidentally updated.<br />
IgnorePkg = kernel-eee madwifi-eee-svn<br />
<br />
Also don't forget to upgrade ighea's acpi-eee package to version 9.6.<br />
<br />
===Unclean unmount during shutdown when having home directory mounted on SD card===<br />
<br />
If you experienced unclean unmount during shutdown when having your home directory on SD card, then add the following 3 lines to "Write to wtmp file before unmounting" section of your {{Filename|/etc/rc.shutdown}} file:<br />
<pre><br />
...<br />
<br />
stat_busy "Unmounting Filesystems"<br />
/bin/umount -a -t noramfs,notmpfs,nosysfs,noproc<br />
<br />
# Add these 3 lines<br />
sync;sync;sync;<br />
eject /dev/sdb # Or whichever is your SD-card's device name. /dev/disk/by-uuid/ followed by the UUID identifier is preferable though.<br />
sleep 3<br />
# End of hack<br />
<br />
stat_done<br />
<br />
...<br />
</pre><br />
<br />
===Booting from card without initrd===<br />
<br />
Let's say you decided to install Arch Linux on a card and compiled your own kernel (or used the kernel26eee kernel) without initrd. Card reader on EeePC is connected as an USB device. Unfortunately, USB storage devices are detected with a delay, so we must tell the kernel to wait until this device becomes available. You do this with "rootwait" option passed to kernel at boot time.<br />
<br />
===Sleeping and waking system on a card===<br />
<br />
If you have Arch Linux on a card, waking up from sleeping state will most likely fail. The only solution is to enable the CONFIG_USB_PERSIST option in kernel. The kernel26eee package should have this option enabled.<br />
<br />
The command to do this is:<br />
echo 1 >/sys/bus/usb/devices/.../power/persist<br />
<br />
Replace the {{Codeline|"..."}} with the device like 1-3 or 1-5 where the first number is the bus and the second is the device <br />
<br />
Each device that is connected to your computer gets an entry in the sysfs "system file system" it is a virtual file system like proc<br />
<br />
More info:<br />
*http://www.mjmwired.net/kernel/Documentation/usb/persist.txt<br />
*http://forum.eeeuser.com/viewtopic.php?id=22712<br />
<br />
===Display doesn't wake up properly===<br />
<br />
If you encounter black display (but apparently working system) after suspend/resume, consider using the "uswsusp" package (available in the official repositories) and correcting suspend2ram script in /etc/acpi, where you use this line to make the machine go to sleep:<br />
<br />
/usr/sbin/s2ram --force --vbe_post --vbe_mode<br />
<br />
==Battery Tests==<br />
<br />
The following are reported battery runtimes:<br />
<br />
{| class="wikitable" style="text-align:left"<br />
|+Battery runtimes<br />
|-<br />
! Task !! Series !! Wireless !! Screen Brightness !! FSB Speed !! Fan Speed !! Runtime !! Comments<br />
|-<br />
! DVD Playback<br />
| 701 || On || Max || 85mhz || 100% || 134min || Reading DVD ISO from 16gig SDHC Card<br />
|-<br />
! DVD Playback<br />
| 701 || Off || Max || 85mhz || 100% || ??? || Reading DVD ISO from 16gig SDHC Card<br />
|-<br />
! AVI Playback<br />
| 701 || Off || Max || 85mhz || 100% || ??? || Reading AVI from SSD<br />
|-<br />
! IM and Surf<br />
| 701 || On || ~30% || ??? || low || 173min || Normal web-browsing, Flash should reduce runtime a lot !<br />
|-<br />
! Programming and PDF reading<br />
| 1000HA || Off || ~40% || ??? || low || +6hs || Using Evince and SPE under XFCE with camera and USB disabled<br />
|-<br />
! Surf and OOo<br />
| 1000HA || On || ~40% || ??? || low || +4hs || Stock kernel without laptop-mode<br />
|-<br />
! Surf and OOo<br />
| 1000HA || On || ~40% || ??? || low || 5hs || Stock kernel with laptop-mode and other tweaks<br />
|}<br />
<br />
N.B. - Will add battery runtimes as I am able to test them, please contribute.<br />
<br />
-- Grecko.1<br />
<br />
Still tweaking, but disabling everything from BIOS got me about 6 hours and a half. With eee-kernel, I *could* get a little more.<br />
<br />
-- ekuber</div>Sylishttps://wiki.archlinux.org/index.php?title=VirtualBox&diff=56708VirtualBox2009-01-02T10:36:16Z<p>Sylis: /* Installing Guest Additions */ only on rc.d script</p>
<hr />
<div>[[Category:Emulators (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|:VirtualBox}}<br />
{{i18n_entry|Italiano|:VirtualBox (Italiano)}}<br />
{{i18n_entry|简体中文|:VirtualBox (简体中文)}}<br />
{{i18n_entry|Русский|VirtualBox (Русский)}}<br />
{{i18n_entry|Español|VirtualBox (Español)}}<br />
{{i18n_links_end}}<br />
<br />
<br />
<br />
== What is VirtualBox ==<br />
[http://www.virtualbox.org VirtualBox] is a virtual pc emulator like vmware. It has many of the features vmware has, as well as some of its own.<br />
<br />
=== Editions ===<br />
VirtualBox is available in two editions: VirtualBox (OSE) and VirtualBox (Personal Use and Evaluation License (PUEL))<br />
<br />
==== VirtualBox (OSE) ====<br />
VirtualBox (OSE) is the open source version of VirtualBox, which can be found in the community repository. It lacks some features such as USB device support and the built-in RDP server.<br />
<br />
==== VirtualBox (PUEL) ====<br />
VirtualBox PUEL is a binary-only version (free for personal use) which is available from the [http://aur.archlinux.org/packages.php?ID=9753 AUR] or directly from the <br />
[http://www.virtualbox.org/wiki/Downloads VirtualBox] website. The PUEL edition offers the following advantages:<br />
<br />
*'''Remote Display Protocol (RDP) Server''' - a complete RDP server on top of the virtual hardware, allowing users to connect to a virtual machine remotely using any RDP compatible client<br />
<br />
*'''USB support''' - a virtual USB controller which allows USB 1.1 and USB 2.0 devices to be passed through to virtual machines<br />
<br />
*'''USB over RDP''' - a combination of the RDP server and USB support, allowing users to make USB devices available to virtual machines running remotely<br />
<br />
*'''iSCSI initiator''' - a builtin iSCSI initiator making it possible to use iSCSI targets as virtual disks without the guest requiring support for iSCSI<br />
<br />
== Installation ==<br />
<br />
=== Install VirtualBox (OSE) ===<br />
<br />
VirtualBox (OSE) is available from the standard repositories:<br />
<br />
# pacman -S virtualbox-ose<br />
<br />
'''Note:''' This package seems not to be in x84_64 Repositories.<br />
<br />
This will select by default <tt>virtualbox-ose</tt> and <tt>virtualbox-modules</tt> packages. Once installed, a desktop entry can be located in ''Applications > System Tools > VirtualBox OSE''<br />
<br />
Now, add the desired username to the '''vboxusers''' group:<br />
<br />
# gpasswd -a USERNAME vboxusers<br />
<br />
''('''Note:''' You must logout/login in order for this change to take effect)''<br />
<br />
Lastly, edit <tt>/etc/rc.conf</tt> as root and add '''vboxdrv''' to the MODULES array in order to load the VirtualBox drivers at startup. For example:<br />
<br />
MODULES=(loop '''vboxdrv''' fuse ...)<br />
<br />
To load the module manually, run the following in a terminal as root: <br />
<br />
# modprobe vboxdrv<br />
<br />
'''HowTo:'''<br><br />
[[VirtualBox-HowTo]]<br />
<br />
=== Install VirtualBox PUEL (virtualbox_bin) ===<br />
VirtualBox PUEL is available from the [http://aur.archlinux.org/packages.php?ID=9753 AUR: virtualbox_bin].<br />
<br />
Download the tarball from the [http://aur.archlinux.org/packages.php?ID=9753 AUR: virtualbox_bin] page, unpack, run <tt>makepkg</tt>, and then as root:<br />
<br />
# pacman -U PACKAGE-NAME.pkg.tar.gz<br />
<br />
'''However, there's an alternative way to install the virtualbox_bin package:'''<br />
<br />
Firstly, add as root the followings into /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = <nowiki>http://repo.archlinux.fr/i686</nowiki><br />
or<br />
[archlinuxfr]<br />
Server = <nowiki>http://repo.archlinux.fr/x86_64</nowiki><br />
depending on your CPU's architecture.<br />
<br />
Then you can install it successfully via:<br />
# pacman -Sy virtualbox_bin<br />
<br />
After installation, a desktop entry can be located in ''Applications > System Tools > Innotek VirtualBox''<br />
<br />
Now, add the desired username to the '''vboxusers''' group:<br />
# gpasswd -a USERNAME vboxusers<br />
<br />
''('''Note:''' You must logout/login in order for this change to take effect)''<br />
<br />
Lastly, edit <tt>/etc/rc.conf</tt> as root and add '''vboxdrv''' to the MODULES array in order to load the VirtualBox drivers at startup. For example:<br />
MODULES=(loop '''vboxdrv''' fuse ...)<br />
<br />
To load the module manually, run the following in a terminal as root: <br />
# modprobe vboxdrv<br />
<br />
==== Module Rebuilds ====<br />
Note that any time your kernel version changes (due to upgrade, recompile, etc.) you must also rebuild the VirtualBox kernel module by running '''vbox_build_module''' as root. This binary will be located in one of the following locations: <tt>/sbin</tt>, <tt>/bin</tt>, or <tt>/usr/bin</tt>. After rebuilding the module, don't forget to load it with: '''<code>modprobe vboxdrv</code>'''<br />
<br />
=== Install required QT libraries ===<br />
Currently, VirtualBox relies on qt4 for its graphical interface. If you require a GUI, ensure you have qt4 installed:<br />
# pacman -S qt<br />
<br />
=== Start VirtualBox ===<br />
To start Virtualbox, run the following command in a terminal:<br />
$ VirtualBox<br />
<br />
== Configuration ==<br />
After we have installed VirtualBox on our system and added ourselves in the vboxusers group we can start configuring our system in order to make all the features of VirtualBox available to us.Create a new virtual machine using the wizard provided by the GUI and then click settings in order to edit the virtual machine settings.<br />
<br />
=== Keyboard and mouse between the host and the guest ===<br />
To capture the keyboard and mouse, click the mouse inside the Virtual Machine display.<br><br />
To uncapture, "Ctrl-Alt Delete".<br />
<br />
=== Getting network in the guest machine to work ===<br />
First let's get network working in the guest machine. Click the network tab. The not attached option means you'll have "Network cable unplugged" or similar error in the guest computer.<br />
<br />
==== Using NAT network ====<br />
This is the simplest way to get network. Select NAT network and it should be ready to use. Then, the guest operating system can be automatically configured by using DHCP.<br />
<br />
The NAT IP address on the first card is 10.0.2.0, 10.0.3.0 on the second and so on.<br />
<br />
==== Using host interface networking (the VirtualBox way) ====<br />
Since VirtuaBox 2.1.0 it has a native support for host interface networking. Just add '''vboxnetflt''' to your MODULES section in [[rc.conf]] and choose ''Host Interface Networking'' in the virtual machine configuration.<br />
<br />
==== Using host interface networking (the Arch way) ====<br />
You are going to just edit these files and reboot:<br />
<br />
* /etc/conf.d/bridges<br />
* /etc/rc.conf<br />
* /etc/vbox/interfaces<br />
<br />
Ready? Let's go!<br />
<br />
'''/etc/conf.d/bridges:'''<br />
bridge_br0="eth0" # Put any interfaces you need.<br />
BRIDGE_INTERFACES=(br0)<br />
<br />
'''/etc/rc.conf:'''<br />
<br />
First add the bridge module to your MODULES line<br />
MODULES=( <your other modules> '''bridge''')<br />
<br />
'''Note:''' Make sure that you have the vboxnet daemon loaded to your DAEMONS line<br />
DAEMONS=( <your other daemons> '''vboxnet''')<br />
<br />
Then, in your NETWORKING section, make the following changes:<br />
lo="lo 127.0.0.1"<br />
eth0="eth0 up" # If you have more interfaces in the previous file, more lines like "if_number="if_number up" here.<br />
br0="dhcp" # Maybe you have some static configuration... I use DHCP.<br />
INTERFACES=(lo eth0 br0)<br />
<br />
'''Note''' by gpan:<br />
<br />
'''/etc/rc.conf:'''<br />
<br />
First add the vboxdrv (and [[vboxnetflt]] in case of 2.1.0 version) module to your MODULES line<br />
<br />
MODULES=( <your other modules> vboxdrv vboxnetflt )<br />
<br />
<br />
The following command order in the # NETWORKING section did the job for me:<br />
<br />
lo="lo 127.0.0.1"<br />
BRIDGE_INTERFACES=(br0)<br />
bridge_br0=(eth0)<br />
br0="br0 192.168.178.2 netmask 255.255.255.0 broadcast 192.168.178.255" # The network part (192.168.178) of the ip address may differ in your PC<br />
eth0="eth0 0.0.0.0 promisc"<br />
INTERFACES=(lo br0 eth0)<br />
gateway="default gw 192.168.178.1"<br />
ROUTES=(gateway)<br />
<br />
Personally, I didn't make any changes to this conf '''/etc/conf.d/bridges''', as mentioned earlier. <br />
<br />
<br />
Next, you should edit your '''/etc/udev/rules.d/60-vboxdrv.rules''' and type:<br />
<br />
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"<br />
KERNEL=="tun", OWNER="root", GROUP="vboxusers", MODE="0660"<br />
<br />
Save it and exit.<br />
<br />
Then open terminal and type:<br />
<br />
# pacman -S bridge-utils uml_utilities<br />
<br />
Create a new bridge with this command:<br />
<br />
# brctl addbr br0<br />
<br />
<br />
'''/etc/vbox/interfaces'''<br />
<br />
(You can set up more interfaces if you want. Sky is the limit!):<br />
vbox0 your_user br0 # Be sure that your user is in the vboxusers group.<br />
<br />
Reboot and enjoy!<br />
<br />
'''''Note:''' Remember to set up your virtual machine with proper network configuration.''<br />
<br />
'''''Note:''' If you have any issue, make sure that you have the bridge-utils package installed and vboxnet daemon loaded''<br />
<br />
==== Using host interface networking (generic) ====<br />
This way is a bit harder, but it allows you to see the VirtualMachine as a "real" computer on your local network. You need to get bridge-utils <br />
<br />
# pacman -S bridge-utils uml_utilities<br />
<br />
'''Note''' by Sp1d3rmxn:<br />
:You also need to have the TUN module loaded...in [[rc.conf]] add "tun" (without the :quotes) to your MODULES section. For testing this out right now without rebooting :you can load the module from the command line by "modprobe tun".<br />
:<br />
:Then you MUST set these permissions otherwise you'll never get VBox to init the :interface. The command is "<code>chmod 666 /dev/net/tun</code>" (without the quotes).<br />
<br />
:Now proceed with the rest as it's written below.<br />
<br />
'''Note''' by Dharivs<br />
:As said by Sp1d3rmxn, we must set these permissions, but, instead of using the <br />
:command, we can set them in /etc/udev/rules.d/60-vboxdrv.rules, which will set them <br />
:on boot:<br />
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"<br />
KERNEL=="tun", OWNER="root", GROUP="vboxusers", MODE="0660"<br />
<br />
<br />
<b>1.</b> Create a new bridge with this command:<br />
# brctl addbr br0<br />
<br />
<b>2.</b> If you are not using DHCP, run ifconfig and note down the network configuration of your existing network interface (e.g. eth0), which we will need to copy to the bridge in a minute.<br />
<br />
''('''Note: You will need this settings so make sure you don't lose them!!!''')''<br />
<br />
<b>3.</b> Switch your physical network adapter to "promiscuous" mode so that it will accept Ethernet frames for MAC addresses other than its own (replace eth0 with your network interface):<br />
# ifconfig eth0 0.0.0.0 promisc <br />
<br />
''('''Note:''' You will lose network connectivity on eth0 at this point.)''<br />
<br />
<b>4.</b> Add your network adapter to the bridge:<br />
# brctl addif br0 eth0<br />
<br />
<b>5.</b> Transfer the network configuration previously used with your physical ethernet adapter to the new bridge. If you are using DHCP, this should work:<br />
# dhclient br0<br />
<br />
'''Note''' by Sp1d3rmxn:<br />
:Use "dhcpcd -t 30 -h yourhostname br0 &" instead of the above<br />
<br />
Otherwise, run <code>ifconfig br0 x.x.x.x netmask x.x.x.x</code> and use the values that you noted down previously.<br />
<br />
<b>6.</b> To create a permanent host interface called vbox0 (all host interfaces created in this way must be called vbox followed by a number) and add it to the network bridge created above, use the following command:<br />
VBoxAddIF vbox0 vboxuser br0<br />
<br />
Replace vboxuser with the name of the user who is supposed to be able to use the new interface.<br />
<br />
('''Note:''' VboxAddIF is located in /opt/VirtualBox-VERSION OF VIRTUALBOX/VBoxAddIF)<br />
<br />
Alternatively, you can [http://mychael.gotdns.com/blog/2007/05/31/virtualbox-bridging/ setup VirtualBox networking] through your /etc/rc.conf to enable a bridged connection.<br />
<br />
==== Using host interface networking with a wireless device ====<br />
Bridging as described above won't work with a wireless device. Using [http://aur.archlinux.org/packages.php?ID=16356 parprouted] however it can be accomplished.<br />
<br />
# Install parprouted and iproute<br />
# <code># ln -s /usr/sbin/ip /sbin/ip</code><br />
# Make sure IP fowarding is enabled: <code># sysctl net.ipv4.ip_forward=1</code>, and/or edit /etc/sysctl.conf<br />
# <code># VBoxTunctl -b -u <user></code>, to create the tap device<br />
# <code># ip link set tap0 up; ip addr add 192.168.0.X/24 dev tap0</code>, needs to be a manually set IP on the same network your wireless device is.<br />
# <code># parprouted wlan0 tap0</code><br />
<br />
=== Getting USB to work in the guest machine ===<br />
(Only available in the PUEL edition)<br />
<br />
First in order to make usb available for use to the virtual machine you must add this line to your /etc/fstab<br />
none /proc/bus/usb usbfs devgid=108,devmode=0664 0 0<br />
<br />
108 is is the id of the group which should be allowed to access USB-devices. Change it to the id of your vboxusers group. You can get the id by running:<br />
$ grep vboxusers /etc/group<br />
<br />
If you don't mind a security hole change devmode from 664 to 666.<br />
<br />
Remount /proc/bus/usb:<br />
# mount -o remount /proc/bus/usb/<br />
<br />
'''Note''' by slipper:<br />
:I had to do ''mount -a'' after the above command to get this to work for me.<br />
<br />
Restart Virtualbox and click the USB tab in the settings of the virtual machine and select which devices are available to your pc on boot. If you wish your virtual machine to use device that you have just plugged in (assuming the virtual machine has booted already), go to the VirtualMachine screen go to devices -> USB Devices -> and select the device you wish to plug in the virtual pc.<br />
<br />
=== Installing Guest Additions ===<br />
For VirtualBox (OSE) version 1.6.2 =>, read:<br><br />
[[VirtualBox-HowTo]]<br />
<br />
The Guest Additions make the shared folders feature available, as well as better video (not 3D) and mouse drivers. You will have mouse integration, thus no need to release the mouse after using it in the guest and one can also enable a bidirectional clipboard.<br />
<br />
After you booted the virtual machine, go to menu Devices->Install Guest Additions... Once you've clicked it, VirtualBox loads an ISO into the current CD-ROM, so you won't see anything happen yet ;)<br />
<br />
Then do the following as root:<br />
# mount /media/cdrom<br />
# sh /media/cdrom/VBoxLinuxAdditions.run<br />
<br />
It will build and install the kernel modules, install the Xorg drivers and create init scripts. It will most probably print out errors about init scripts and run levels and what not. Ignore them. You will find rc.vboxadd in /etc/rc.d which will load them on demand. To have the Guest Additions loaded at boot time, just add those to the DAEMONS array in /etc/rc.conf eg.<br />
<br />
DAEMONS=(syslog-ng network netfs crond alsa '''rc.vboxadd ''')<br />
<br />
=== Sharing folders between the host and the guest ===<br />
For VirtualBox (OSE) version 1.6.2 =>, read:<br><br />
[[VirtualBox-HowTo]]<br />
<br />
In the settings of the virtual machine go to shared folders tab and add the folders you want to share.<br />
<br />
*NOTE: You need to install Guest Additions in order to use this feature.<br />
In a Linux host, "Devices" --> "Install Guest Additions"<br />
Yes (when asked to download the CD image)<br />
Mount (when asked to register and mount)<br />
<br />
In a Linux host, create one folder for sharing files.<br />
<br />
In a Windows guest, starting with VirtualBox 1.5.0, shared folders are browseable and are therefore visible in Windows Explorer. Open Windows Explorer and look for it under:<br />
<br />
My Networking Places --> Entire Network --> VirtualBox Shared Folders<br />
<br />
Alternatively, on the Windows command line, you can also use the following:<br />
<br />
net use x: \\vboxsvr\sharename<br />
<br />
While vboxsvr is a fixed name, replace "x:" with the drive letter that you want to use for the share, and sharename with the share name specified with VBoxManage.<br />
<br />
In a Linux guest, use the following command:<br />
# mount -t vboxsf [-o OPTIONS] sharename mountpoint<br />
<br />
Replace sharename with the share name specified with VBoxManage, and mountpoint with the path where you want the share to be mounted (e.g. /mnt/share). The usual mount rules apply, that is, create this directory first if it does not exist yet.<br />
<br />
Beyond the standard options supplied by the mount command, the following are available:<br />
iocharset=CHARSET<br />
to set the character set used for I/O operations (utf8 by default) and<br />
convertcp=CHARSET<br />
to specify the character set used for the shared folder name (utf8 by default).<br />
<br />
=== Getting audio to work in the guest machine ===<br />
<br />
In the machine settings, go to the audio tab and select the correct driver according to your sound system (ALSA, OSS or PulseAudio).<br />
<br />
=== Setting up the RAM and Video Memory for the virtual PC ===<br />
<br />
You can change the default values by going to settings -> general.<br />
<br />
=== Setting up CDROM for the Virtual PC ===<br />
<br />
You can change the default values by going to settings -> CD/DVD-ROM.<br />
<br />
Check mount cd/dvd drive and select one of the following options.<br />
<br />
'''Note:''' If no CDROM drive is detected, make sure the HAL daemon is running. To start it, run the following command as root:<br />
<br />
# /etc/rc.d/hal start<br />
<br />
=== Rebuilding vboxdrv module ===<br />
For Virtualbox >= 1.6.0 use [[ABS]] for rebuild vboxdrv module or you can wait the maintainer update it :)<br />
<br />
=== Converting from VMware images ===<br />
Do <br />
# pacman -S qemu<br />
$ qemu-img convert image.vmdk image.bin<br />
$ VBoxManage convertdd image.bin image.vdi<br />
<br />
This may not be needed anymore with recent virtualbox versions (to be confirmed)<br />
<br />
== External Resources ==<br />
* [http://download.virtualbox.org/virtualbox/2.0.6/UserManual.pdf VirtualBox 2.0.6 User Manual]</div>Sylis