Skip to content →

Getting Arch Linux fully working with a Samsung N130 Netbook

Recently, I purchased an Asus EEE 1101HA netbook. My experience getting the video to work on it was horrible and unsuccessful (Poulsbo chipset, ugh,) and other features were really difficult to get working. Last night I returned it to the store, and picked up a Samsung N130 (in black) for $50 less than the EEE.

There are two versions of the N130 laptop. One version of the laptop includes an Atheros wireless device, supported by the ath9k kernel module. The other version of the laptop (which I received from Best Buy in the US,) includes a Realtek 8192 wireless device which does not have a native Linux driver at this time. I hear there’s one scheduled for the 2.6.32 kernel, but the release date on that version is still unknown. To work around this problem we’ll use ndiswrapper to wrap the Windows XP version of the Realtek 8192E driver, which is a great workaround for now until 2.6.32 comes out.

This post details how to setup Arch Linux on an N130, along with wireless support, xmonad, and a bunch of apps. This setup is specific to what I use, but it works very well for me. I especially recommend this setup (read: xmonad) because of the N130’s small screen; xmonad is a great tiling window manager to use on a small laptop screen that helps you to avoid having to use the touchpad. Additionally, this post gives my specific config files and scripts that I use every day in my desktop environment (modified here for laptop use.) These have been requested of me before by users on Reddit, so I thought it’d be appropriate to publish them here.

The first thing I did after getting home with the N130 was make an Arch flash drive and install Arch from it. At first, I installed Arch with the root and swap partitions encrypted. Let me mention that if you want to be at all productive on the N130, you cannot encrypt the root or swap partitions (this was also true for the 1101HA.) If you do encrypt the root and swap partitions, you’ll notice your disk wait jump through the roof to more than 40% when doing simple operations like pacman -Ss xorg and kcryptd will be the top process on your system, for sure. When I realized I couldn’t do anything productive with this lag, I reinstalled with unencrypted root and swap partitions, and just encrypted the /home partition. This turned out to be much faster, obviously, and I recommend this route, despite the unencrypted swap and root being a potential vulnerability.

So, run through the Arch installer as you normally would, nothing fancy here. You’ll need a wired connection to download packages until we get the wireless working. Remember that when using the 2009.08 Arch installer to setup encrypted partitions, you must create your /etc/crypttab file yourself before booting into your new system.

Boot into your new system, login as root, and install relevant packages and configurations.

:::bash
pacman -Syu

# First we'll install the packages we need
pacman -S hal xorg-server xf86-video-intel xf86-input-synaptics \
    xf86-input-mouse xf86-input-keyboard xorg-xinit \
    xorg-fonts-misc xorg-fonts-type1 xorg-fonts-100dpi \
    xorg-fonts-75dpi ttf-ms-fonts ttf-dejavu \
    ttf-linux-libertine ttf-freefont xmonad ndiswrapper \
    hwdetect xmobar slim archlinux-themes-slim \
    slim-themes terminal pidgin firefox flashplugin vim \
    gvim ctags unzip dbus alsa-utils networkmanager \
    network-manager-applet gnome-power-manager xscreensaver \
    dmenu thunar thunar-volman banshee cheese wireless_tools

# Next add a normal user for yourself
useradd -m -G "wheel,games,network,video,audio,optical,floppy,\
storage,scanner,power,users,hal,dbus" youruser

# Make your user a sudoer
vim /etc/sudoers # Uncomment line 27 to make it easier to sudo

# Choose a theme for the slim graphical login manager
ls /usr/share/slim/themes
vim /etc/slim.conf # Add a line saying:
                   # "current_theme archlinux-simplyblack"

# Now we'll download and install the Realtek 8192e wireless driver
wget -O realtek_8192e_driver.zip http://tinyurl.com/ygtam4a
unzip -d realtek realtek_8192e_driver.zip
ndiswrapper -i realtek/RTL819xP_Driver/WinXP2K/net819xp.inf
ndiswrapper -l
ndiswrapper -m # It's ok if this says module config already contains alias directive
depmod -a
modprobe ndiswrapper
iwconfig  # This should output some info about wlan0

# Next, make a few changes to /etc/rc.conf.

vim /etc/rc.conf
# Ensure the ndiswrapper module is loaded on boot
# Make the MODULES line read:
MODULES=(ndiswrapper)
# Ensure dhcp is the default for your wireless device
# Add a line reading:
wlan0="dhcp"
# Ensure eth0 and wlan0 can be managed by
# networkmanager.  Make the INTERFACES line read:
INTERFACES=(!eth0 !wlan0)
# Ensure hal, dbus, alsa, slim come up on boot
# Make the DAEMONS line read:
DAEMONS=(syslog-ng network hal dbus alsa netfs \
    crond slim)

You must now configure networkmanager. This is very well documented, so just follow the steps listed here.

Logout as root, and login as your normal user. I’ve a few configuration files and scripts to make your life with X, Xmonad, vim, the system tray, and dmenu easier. First, setup the appropriate directories.

:::bash
mkdir -p ~/.xmonad ~/bin
# Launch some useful applications upon login
wget http://shellsage.com/files/.xinitrc
# Setup vim with syntax highlighting, NERDTree, ctags, etc.
wget http://shellsage.com/files/vim-2009-11-26.tar.bz2
tar -xjvf vim-2009-11-26.tar.bz2
# Download my xmonad and xmobar configurations
cd ~/.xmonad
wget http://shellsage.com/files/xmonad.hs
wget http://shellsage.com/files/xmobar
# Download my scripts to display the sytem tray
# and to make dmenu show up nicely
cd ~/bin
wget http://shellsage.com/files/tray
wget http://shellsage.com/files/dmenu
chmod +x tray dmenu

Finally, reboot your system (this will make slim and wireless come up on boot,) and you should be all set to login and start using xmonad. Once logged in, you should see a working battery monitor, network manager applet (with wireless and wired connections working,) xmobar on top, and a bunch of applications ready to go.

Here are some useful key combinations to get you going if you’re unfamiliar with either xmonad or my specific configuration:

  • Alt+1: Takes you to the “code” workspace where gvim goes by default
  • Alt+2: Takes you to the “term” workspace where terminal goes by default
  • Alt+3: Takes you to the “web” workspace where Firefox goes by default
  • Alt+4: Takes you to the “msg” workspace where Pidgin goes by default
  • Alt+5: Takes you to the “media” workspace where Banshee goes by default
  • Alt+Ctrl+l: Locks the screen with Xscreensaver
  • Alt+Shift+Enter: Opens a terminal
  • Alt+Shift+c: Close the current window
  • Alt+k: Focus the next window in the workspace
  • Alt+p: Run dmenu, from which you can launch applications
  • F2 while in vim/gvim: Open NERDTree
  • Alt+p cheese: Run cheese, allowing you to take photos/videos using the webcam

The only things I haven’t gotten working yet are the Fn (function) keys that control brightness, volume, etc. If I figure this out I’ll add it here.

If you find any errors in this post or have any questions please let me know. Good luck with your Samsung N130.

Published in Uncategorized