Differences between revisions 20 and 21
Revision 20 as of 2008-02-22 20:04:04
Size: 8528
Editor: ?DamyanIvanov
Comment: add a tip about localepurge for removing unused localization data
Revision 21 as of 2008-03-02 01:38:50
Size: 12076
Editor: ?NateMoseman
Comment:
Deletions are marked like this. Additions are marked like this.
Line 148: Line 148:
=== Remove unsed locales === === Remove unused locales ===
Line 151: Line 151:

=== Alsa configuration ===

This can improve performance for your sound system when playing multiple sounds, recording to multiple programs, playing games, or watching videos on your EEEPC.

For more details on what this file is and what to do with it see http://alsa.opensrc.org/.asoundrc

{{{
pcm.my_card {
  type hw
  card 0
  # mmap_emulation true
}

pcm.dmixed {
  ## This provides software mixing for audio out
  type dmix
  ipc_key 1024
  slave {
  pcm "my_card"
  ## period_size and buffer_size
  ## can be modified to reduce
  ## latency or add more 'cusion'
  ## through the buffer
  period_size 1024
  buffer_size 4096
  rate 44100
  }
}

pcm.dsnooped {
  ## this provides software mixing for audio in
  type dsnoop
  ipc_key 2048
  slave {
  pcm "my_card"
  period_size 1024
  buffer_size 4096
  rate 44100
  }
}

pcm.asymed {
  ## this plugin allows you to bind both
  ## the dmix and dsnoop plugins together
  type asym
  playback.pcm "dmixed"
  capture.pcm "dsnooped"
}

pcm.pasymed {
  ## if you do not want to use use
  ## mixing by default, you can delete
  ## !default entry below and direct
  ## apps to use this 'device' as a
  ## extra option
  type plug
  slave.pcm "asymed"
}

pcm.dsp0 {
  ## this allows most OSS-only apps
  ## to use this mixing stuff
  ## through the use of the aoss wrapper
  type plug
  slave.pcm "asymed"
}

pcm.!default {
  ## this makes alsa apps default
  ## to use this config
  type plug
  slave.pcm "asymed"
}
}}}


If your setting up your system to use a application like Ekiga to do VoIP/video conferencing then you will probably want to know how to use alsamixer utility to access the low-level mixer channels on your audio card. There are gui versions of alsamixer, but the alsamixer program is almost always installed by default. It is provided by the alsa-utils package.

To use it open up a terminal and use the 'alsamixer' program. It has three 'views' (Playback settings, Capture settings, all settings) and you can switch between the with the tab button. You press left arrow and right arrow to move from mixer to mixer and up arrow and down arrow to change volumes. The 'm' button will toggle mute for the devices that support it and space button will toggle 'capture' status for settings that support that. The ? button will show the help dialog for more controls.

For the EEEPC's microphone you'll probably want to adjust these settings:
use the tab button to select the 'all' view.

arrow over to the 'capture' setting and toggle it on using the space bar. Make sure the volume is around 70%

Make sure that 'i-mic' (internal mic) is selected as the input source. Press up and down arrow to select input device.

Arrow over to the 'i-mic' mixer settings. Set the volume at 70% and then set the 'i-mic boost' to 33%.

That should give a good basis for playing around with your own settings till you get it perfect. The I-Mic boost should be set to zero or 33%. Anything above that and I get horrible sound distortion through Ekiga.

For testing audio performance Audacity is a good choice. Make sure that you go through the preferences and it is setup to use 'alsa'.

Gnome recorder application is 'ok' for doing recording. You just have to make sure that the 'codec' it uses is either 'wav', 'mp3', or 'speex' when doing the recording. The default is to use 'Ogg/Vorbis' and the EEEPC isn't quite fast enough to do that encoding real-time leading to very bad sound quality.

?TableOfContents

Extending flash memory life

It is a commonly accepted view that SSD devices can only be written a limited number of times before they die, and while that may have been a concern for earlier generations of devices where that limit was relatively low, modern SSDs, such as the one in the Eee increase that number sufficiently so that they will last many years before they die, outlasting any HDD. Before you spend herculean efforts to extend your Eee's flash lifespan, consider this article: http://wiki.eeeuser.com/ssd_write_limit. Nevertheless, many tips are easy to do and at the very least are harmless, or have other benefits (such as less time spent doing IO making your system more responsive,) so here are a few.

  • Open /etc/sysctl.conf and set vm.dirty_writeback_centisecs = 1500. This will prolong the life of your SSD by writing to the disk every 15 seconds instead of 5.
  • Probably many of the tips useful for [http://www.cyrius.com/debian/nslu2/linux-on-flash.html Linksys on NSLU2] can be applied to the EeePC

  • Mount a tmpfs over /tmp to never write its contents to SSD: echo "tmpfs /tmp tmpfs defaults 0 0" >>/etc/fstab. You can probably do that for other directories like /var/tmp, /var/lock, etc.

Text mode

  • You may want to add vga=785 to your kernel boot line to get more space for your screen in text mode. This is 600x480 (16 bit), there is no vga code for 800x480.

Desktop environment

If you use a Gnome desktop on your Eee, here are some ways to make better use of the limited screen height:

  • Enable the autohide property on the Gnome panels at the top and bottom of the desktop, so they get out of the way unless you mouse over them. To do this, right click on a blank part of the panel, then choose Properties, and go to the General tab.
  • In many applications, like gnome-terminal and firefox (iceweasel), you can use the F11 key to toggle a fullscreen mode that provides even more area than simply maximizing the window.
  • In metacity you can set up the F11 key to toggle fullscreen mode for all applications by selecting System > Preferences > Keyboard Shortcuts. Find the "Window Management" section, select the "Toggle fullscreen mode" item (which is disabled by default), and type F11 to set it.

  • You can change workspaces without exiting fullscreen mode by using Control-Alt-Left_arrow and Control-Alt-Right_arrow.
  • You can move your application under Xfce (but Gnome too I think) with alt+left_mouse ( press alt before left_mouse ) and move your mouse. Very useful for applications bigger than the screen, like Gnome Evolution (Mail).

Firefox:

  • Use the F11 key to toggle a fullscreen mode that provides even more area than simply maximizing the window.
  • Install the [https://addons.mozilla.org/fr/firefox/addon/4550 ?CompactMenu2] extension to gain few pixels taken by the menu

  • You can also stop using tabs and use Alt+Tab to switch from a window to an other. Use the [http://extensionroom.mozdev.org/more-info/keyconfig ?KeyConfig] extension to bind Ctrl+T to "New window".

  • Activate the “Use Small Icons” checkbox in the “Customize Toolbar” panel

Opera:

  • Use F11 to get into full-screen (this is the presentation mode, you'll not have any bars unlike as in FF).
  • Use the "Fit to width" feature on huge pages.

KDE/Kwin:

  • Each window can be made fullscreen with a right click on the window decoration. You can also use keyboard shortcuts to make a window fullscreen in the control center > “Regional & Accessibility” > “Keyboard Shortcuts” > “Make Window Fullscreen” or “Hide Window Border”.

  • Put the panel on the left or right side instead of bottom/top, as you have more room in width than in height. Also choose “Tiny” for the panel size, and take a look at the auto/manual Hiding functionalities.

[http://packages.debian.org/openbox ?OpenBox]:

  • Use:

    {{{<keybind key="F11">

    • <action name="?ToggleFullscreen"/>

</keybind>}}} in ~/.config/openbox/rc.xml to get the application to real full-screen (no panels etc.) via F11.

Accessing the Asus Restore Image

Here is a way to access the files that were on the original Xandros system before you installed Debian on your Eee PC. You need the Asus Support DVD that came with the machine, and a Linux machine with a DVD reader and about 2.5G of free disk space (so you probably don't want to do this on your Eee).

Insert the Support DVD and extract the disk image of the Xandros system:

sudo mount /dev/dvd /media/dvd
zcat /media/dvd/P701L.gz > ~/restore.img
sudo eject /media/dvd

Now you can mount the Xandros image on your desktop whenever you want by doing:

sudo mount -t ext2 ~/restore.img /mnt/img -o ro,loop,offset=32256

(The offset of 63*512 = 32256 skips over the partition table in the disk image.) The original filesystem is now mounted, read-only, under /mnt/img/. When you're finished accessing it, don't forget to do

sudo umount /mnt/img

Make a complete disk image

The Debian Installer provided in the DebianEeePC/Howto/Install can be used to make a disk image and to send it over the network. This trick can sometimes provide a way to restore the (nearly) original Asus EeePC system before playing with new Debian installation as in some countries, you do not have the Asus Restore Image shipped with the laptop.

Backup

This method uses dd and nc provided by the Debian Installer and another computer located on your local network:

  • First, boot the debian installer on your USB disk
  • Then be sure to activate network and configure it, same thing for the disk (Do not partition it)
  • Open a console shell (Alt+F2 or from the Debian Installer menu)
  • On the backup computer:
    • get its IP adress (ifconfig)
    • start a listening nc session on port 9000:

 nc -l -p 9000 | gzip -1 -c > ./eeepc.img.gz
  • On the EeePC shell:

dd if=/dev/sda | nc -w 5 computer_ip_adress 9000
  • Wait some minutes (about 35)... and you get a eeepc.img.gz with about 900Mb

Extract some files from the image

  • extract the compressed disk image:

    gunzip eeepc.img.gz => got & 4Gb eeepc.img
  • As root (or sudo), setup a loopback device:

    losetup -f eeepc.img 
  • view of the partitions:

     fdisk -ul /dev/loop0 
  • Disque /dev/loop0: 4001 Mo, 4001292288 octets
    255 heads, 63 sectors/track, 486 cylinders, total 7815024 secteurs
    Units = secteurs of 1 * 512 = 512 bytes
    Disk identifier: 0x3c173c16
    
    Périphérique Amorce    Début         Fin      Blocs    Id  Système
    /dev/loop0p1              63     4819499     2409718+  83  Linux
    /dev/loop0p2         4819500     7775459     1477980   83  Linux
    /dev/loop0p3         7775460     7791524        8032+   c  W95 FAT32 (LBA)
    /dev/loop0p4         7791525     7807589        8032+  ef  EFI (FAT-12/16/32)
  • 1 sector = 512 bytes, you want to mount partition 1 which starts at sector 63 => 63 sectors * 512 bytes = 32,256 bytes

  • Partition 1 starts at 32256 bytes.
  • Use the same command from the last tips:

    sudo mount eeepc.img /mnt/img -o ro,loop,offset=32256
  • if you want partition 2 use 4819500*512 = 2467584000 bytes offset:

    sudo mount eeepc.img /mnt/img -o ro,loop,offset=2467584000

Note: The first partition is the restoration partition and is ext2 filesystem, the second partition is your "active" partition and is ext3 filesystem. So if you want to find some of your files, try to search them under the second partition...

Restoration

Here is a restoration procedure with the debian installer:

  • On the Asus EeePC, launch the debian installer, config network (get the IP adress) and detect disks then get a shell.
  • launch the restoration command:

    nc -l -p 9000 | dd of=/dev/sda
  • Then on the computer with the image file:

    zcat ./eeepc.img.gz | nc <eeepc_ip_adress> 9000
  • Wait some minutes...
  • Reboot your computer !

Remove unused locales

This would save several tenths of megabytes. Install the localepurge package and select the locales you use. Then run localepurge as root. localepurge will also run automatically after each apt run, cleaning unused localization data.

Alsa configuration

This can improve performance for your sound system when playing multiple sounds, recording to multiple programs, playing games, or watching videos on your EEEPC.

For more details on what this file is and what to do with it see http://alsa.opensrc.org/.asoundrc

pcm.my_card {
  type hw
  card 0
  # mmap_emulation true
}

pcm.dmixed {
  ## This provides software mixing for audio out
  type dmix
  ipc_key 1024
  slave {
  pcm "my_card"
  ## period_size and buffer_size
  ## can be modified to reduce
  ## latency or add more 'cusion'
  ## through the buffer
  period_size 1024
  buffer_size 4096
  rate 44100
  }
}

pcm.dsnooped {
  ## this provides software mixing for audio in
  type dsnoop
  ipc_key 2048
  slave {
  pcm "my_card"
  period_size 1024
  buffer_size 4096
  rate 44100
  }
}

pcm.asymed {
  ## this plugin allows you to bind both
  ## the dmix and dsnoop plugins together
  type asym
  playback.pcm "dmixed"
  capture.pcm "dsnooped"
}

pcm.pasymed {
  ## if you do not want to use use 
  ## mixing by default, you can delete 
  ## !default entry below and direct 
  ## apps to use this 'device' as a 
  ## extra option
  type plug
  slave.pcm "asymed"
}

pcm.dsp0 {
  ## this allows most OSS-only apps
  ## to use this mixing stuff
  ## through the use of the aoss wrapper
  type plug
  slave.pcm "asymed"
}

pcm.!default {
  ## this makes alsa apps default 
  ## to use this config
  type plug
  slave.pcm "asymed"
}

If your setting up your system to use a application like Ekiga to do VoIP/video conferencing then you will probably want to know how to use alsamixer utility to access the low-level mixer channels on your audio card. There are gui versions of alsamixer, but the alsamixer program is almost always installed by default. It is provided by the alsa-utils package.

To use it open up a terminal and use the 'alsamixer' program. It has three 'views' (Playback settings, Capture settings, all settings) and you can switch between the with the tab button. You press left arrow and right arrow to move from mixer to mixer and up arrow and down arrow to change volumes. The 'm' button will toggle mute for the devices that support it and space button will toggle 'capture' status for settings that support that. The ? button will show the help dialog for more controls.

For the EEEPC's microphone you'll probably want to adjust these settings: use the tab button to select the 'all' view.

arrow over to the 'capture' setting and toggle it on using the space bar. Make sure the volume is around 70%

Make sure that 'i-mic' (internal mic) is selected as the input source. Press up and down arrow to select input device.

Arrow over to the 'i-mic' mixer settings. Set the volume at 70% and then set the 'i-mic boost' to 33%.

That should give a good basis for playing around with your own settings till you get it perfect. The I-Mic boost should be set to zero or 33%. Anything above that and I get horrible sound distortion through Ekiga.

For testing audio performance Audacity is a good choice. Make sure that you go through the preferences and it is setup to use 'alsa'.

Gnome recorder application is 'ok' for doing recording. You just have to make sure that the 'codec' it uses is either 'wav', 'mp3', or 'speex' when doing the recording. The default is to use 'Ogg/Vorbis' and the EEEPC isn't quite fast enough to do that encoding real-time leading to very bad sound quality.