个人工具

UbuntuHelp:AA1/Using

来自Ubuntu中文

Wikibot讨论 | 贡献2009年5月18日 (一) 14:55的版本 (创建新页面为 '{{From|https://help.ubuntu.com/community/AA1/Using}} {{Languages|UbuntuHelp:AA1/Using}} <<Include(AA1/Header)>> This page lists tweaks and usability suggestions for the Aspire O...')

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

<<Include(AA1/Header)>> This page lists tweaks and usability suggestions for the Aspire One.

Optimizing SSD Performance

Note: Skip this step if you have the hard disk Acer Aspire One. The performance of the SSD drive can be significantly improved by a few tweaks described in an article by Jason Perlow (But ignore Tweak #1, which does not apply). The most important of these are described here.

Change the file system mount options on SSDs to "noatime"

Edit /etc/fstab (sudo gedit /etc/fstab) and change the the option "relatime" to “noatime”. The line for the root partition should then be something like:

UUID=f0ae2c59-83d2-42e7-81c4-2e870b6b255d / ext2 noatime,errors=remount-ro 0 1

Use the "noop" I/O scheduler

Edit /boot/grub/menu.lst using your favorite editor, and add "elevator=noop" as an option. The default kernel configuration, found in the last part of the file should be something like:

title		Ubuntu 8.04.1, kernel 2.6.24-19-generic
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.24-19-generic root=UUID=f0ae2c59-83d2-42e7-81c4-2e870b6b255d ro quiet splash elevator=noop
initrd		/boot/initrd.img-2.6.24-19-generic
quiet

In order for the changes to remain when updating the kernel, also in menu.lst, find the line

# defoptions=quiet splash

and add "elevator=noop" as an option:

# defoptions=elevator=noop quiet splash

Reduce SSD Wear

Note: Skip this step if you have the hard disk Acer Aspire One. Frequent writes to the SSD will cause failure eventually. We can reduce the number of writes to the SSD by moving our logs to a temporary filesystem in RAM that gets destroyed at ever reboot. Now this means your logs will not be persistent across reboots making debugging difficult in some cases. This step is optional of course, so if you need the logs for an extended period of time do not follow these steps. Open your fstab again, and add the following lines:

sudo gedit /etc/fstab
tmpfs      /var/log        tmpfs        defaults           0    0
tmpfs      /tmp            tmpfs        defaults           0    0
tmpfs      /var/tmp        tmpfs        defaults           0    0

There is currently a bug in sysklogd where it cannot handle booting with an empty /var/log directory (bug #290127). This can be fixed by modifying /etc/init.d/sysklogd: Find this function:

fix_log_ownership()
        for l in `syslogd-listfiles -a`
        do
                chown ${USER}:adm $l
        done
}

..and replace it with this:

fix_log_ownership()
{
        for l in `syslogd-listfiles -a --news`
        do
                # Create directory for logfile if required
                ldir=$(echo ${l} | sed  's/[^\/]*$//g')
                if [ ! -e $ldir ] ; then
                        mkdir -p $ldir
                fi
                # Touch logfile and chown
                touch $l && chown ${USER}:adm $l
        done
}

Warning: This will cause some packages to fail mysteriously when they cannot access the log directories that were installed with the packages and then disappeared at reboot. To rebuild the rest of the directory structure inside /var/log on each reboot, add these lines to /etc/rc.local above the 'exit 0' line:

for dir in apparmor apt cups dist-upgrade fsck gdm installer samba unattended-upgrades ; do
	if [ ! -e /var/log/$dir ] ; then
		mkdir /var/log/$dir
	fi
done

Note: Discovered ATA 40-wire cable misdetection after resume (currently 2.6.27), causing hdparm down from 40MB/s to 25MB/s: filed http://bugzilla.kernel.org/show_bug.cgi?id=11879 for this issue. -AndiM

Disable Scrollkeeper

Note: Skip this step if you have the hard disk Acer Aspire One. ScrollKeeper is a cataloging system for documentation on open systems. It creates a lot of writes every time you install a package. Disable it and your installs will fly! Finally, add a diversion to stop dpkg from overwriting your changes.

sudo mv /usr/bin/scrollkeeper-update /usr/bin/scrollkeeper-update.real
sudo ln -s /bin/true /usr/bin/scrollkeeper-update
sudo find /var/lib/scrollkeeper/ -name \*.xml -type f -exec rm -f '{}' \;
sudo dpkg-divert --local --divert /usr/bin/scrollkeeper-update.real --add /usr/bin/scrollkeeper-update

Video & 3D Performance

Out of the box, the graphics card (Intel GMA 950) is well detected. However, you can tweak /etc/X11/xorg.conf to achieve better graphic card performance:

Section "Device"
(...)
        Option "MonitorLayout" "LVDS,VGA"
        Option "Clone" "true"
        Option "AccelMethod" "EXA"
        Option "MigrationHeuristic" "greedy"
        VideoRam       229376
        Option "CacheLines" "1980"
EndSection

The "Clone" option is especially useful if you want to capture video or photos. Without it, you will get a black screen in applications like cheese. Also, add this to your /etc/profile:

export INTEL_BATCH=1

Note: 'export INTEL_BATCH=1' appears to causes graphics faults (artifacts) within 'ume-launcher' (even with Compiz fully disabled). Reboot and you will have a more responsive system, with better 3D FPS, and improved video performance.

Screen

There are various methods that will help you make better use of the Aspire One's small screen. One of the most important is being able to move windows that are too large to fit on the screen at once. To move a hidden part of the window into view, click and drag with the left mouse button on any part of the window while holding down the ALT key. However, you won't be able to drag windows so the top of the window is above the top of the screen. To fix that, enter the following in a terminal window: gconftool-2 --set /apps/compiz/plugins/move/allscreens/options/constrain_y --type bool 0 Since the Aspire One's screen has almost twice as much resolution horizontally as vertically, having panels on both the top and bottom is not ideal. You may want to remove the top or bottom panels, make them smaller, or move them so that they are vertical, on the left and right side, instead of horizontal on top and bottom.

Touchpad

The AAO touchpad is quite easy to bump whilst typing. The best fix is to disable all scroll and tap commands for 1 second after each keystroke. Go to Preferences and select "Sessions". Click the add button and add an entry:

Name: Syndaemon
Command: syndaemon -d -t -i 1
Comment: Disable trackpad while typing

The '1' can be changed to any decimal number, and defines the amount of time to lock the trackpad after each keystroke. See the Syndaemon man page for full details.

Speed Up Boot Process

To decrease boot time, activate concurrency bootup: sudo gedit /etc/init.d/rc and replace the line: CONCURRENCY=none with CONCURRENCY=shell

Increase Battery Life

Add the following to the /etc/rc.local file:

# Economize the SSD
sysctl -w vm.swappiness=1               # Strongly discourage swapping
sysctl -w vm.vfs_cache_pressure=50      # Don't shrink the inode cache aggressively

# As in the rc.last.ctrl of Linpus
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate_max > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate

echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
echo 20 > /proc/sys/vm/dirty_ratio
echo 10 > /proc/sys/vm/dirty_background_ratio

echo 1 > /sys/devices/system/cpu/sched_smt_power_savings
echo 10 > /sys/module/snd_hda_intel/parameters/power_save
echo 5 > /proc/sys/vm/laptop_mode

#Decrease power usage of USB while idle
[ -w /sys/bus/usb/devices/1-5/power/level ] && echo auto > /sys/bus/usb/devices/1-5/power/level
[ -w /sys/bus/usb/devices/5-5/power/level ] && echo auto > /sys/bus/usb/devices/5-5/power/level