Samsung N140

From ArchWiki
Revision as of 21:52, 27 October 2009 by Gog (Talk | contribs)

Jump to: navigation, search


This article provides information about installing and setting up Arch Linux on the Samsung N140. The hardware is similar but not identical to the Samsung NC10, so you may or may not find useful information on that page.


  • With kernel 2.6.31 ath9k wifi exhibits frequent disconnects and reconnects. This seems to be solved in 2.6.32.


From the ARCH CD iso with an external USB CDROM drive. Alternatively boot from USB flash drive.

Configure your installation


RTL8101e/8102e fast ethernet. Works out of the box.


Supplied wifi is Atheros AR9285 (PCI ID = 168c:002b) (RTL8192E is reported as being supplied in some markets)

Kernel module: ath9k (AR9285 is supported since 2.6.29).

Kernels 2.6.30 and 2.6.32-rcN work fine. However with kernel 2.6.31 the wireless connection exhibits frequent disconnects and reattachments, resulting in periods of bad througput and periods of good throughput. There is no sign of any patches for 2.6.31.y to fix this regression. Complain to

Graphics Adapter

The Video controller is a typical Intel chipset that works with the xf86-video-intel driver.

Kernel Mode Setting

KMS works (at native 1024x600 resolution) after the following: /etc/modprobe.d/modprobe.conf:

       options i915 modeset=1


       MODULES="intel_agp i915"

Put keymap early in mkinitcpio.conf HOOKS. Regenerate the init ramdisk

       mkinitcpio -p kernel26

Remove any vga= or video= from grub menu.lst kernel line, and reboot.

With KDE, on logout KDM returns to the F1 real console not KDM.

Just uncomment this entry in /usr/share/config/kdm/kdmrc:


Backlight Brightness

xbacklight does not work currently. However the brightness can be set with the following command

setpci -s 00:02.1 F4.B=hh

where hh is the level of brightness, in the range 00 to FF. Don't set it to zero because your backlight will turn off!

Use the following script to increase and decrease the brightness. Put it in /sbin/backlight for example. Use xbindkeys to bind commands to the backlight Fn keys. Obtain sudo permission for user to use those commands with visudo.

 # increase/decrease/set/get the backlight brightness (range 0-255) by 16
 #get current brightness in hex and convert to decimal
 var1=`setpci -s 00:02.1 F4.B`
 case "$1" in
               #calculate new brightness
               var2=`echo "ibase=10; obase=16; a=($var1d+16);if (a<255) print a else print 255" | bc`
               echo "$0: increasing brightness from 0x$var1 to 0x$var2"
               setpci -s 00:02.1 F4.B=$var2
               #calculate new brightness
               var2=`echo "ibase=10; obase=16; a=($var1d-16);if (a>15) print a else print 15" | bc`
               echo "$0: decreasing brightness from 0x$var1 to 0x$var2"
               setpci -s 00:02.1 F4.B=$var2
               #n.b. this does allow "set 0" i.e. backlight off
               echo "$0: setting brightness to 0x$2"
               setpci -s 00:02.1 F4.B=$2
               echo "$0: current brightness is 0x$var1"
               if [ $var1d -eq 0 ] ; then
                       echo "toggling up"
                       setpci -s 00:02.1 F4.B=FF
                       echo "toggling down"
                       setpci -s 00:02.1 F4.B=0
               echo "usage: $0 {up|down|set <val>|get|toggle}"
 exit 0

External VGA

External VGA should work out of the box with xrandr.


The audio device is an Intel HD.

Suspend and Hibernate

Suspend to RAM with pm-suspend works.

It is most useful to trigger suspends using acpid.

To catch the "sleep" function key, in use the button/sleep) event to call /usr/sbin/pm-suspend.

When catching the lid closure, the button/lid event will be seen twice -- once on suspend and again on resume. So use the lid state to distinguish between these so that pm-suspend is not triggered twice:

This is an excerpt from /etc/acpid/ file:

       if [ `/bin/awk '{print $2}' /proc/acpi/button/lid/LID0/state` = closed ]; then

Hibernate works correctly (see pm-utils article).

If you are a KDE4 user you can take advantage of powerdevil (included in kdemod-core/kdemod-kdebase-workspace since release 4.2) to manipulate the screen brightness, cpu scaling and hibernate. Suspend from KDE works too, but if you are using to suspend on the button/lid and button/sleep acpi events, then KDE only needs to lock the screen. Note that cpu scaling requires acpi-cpufreq module to be loaded in MODULES in /etc/rc.conf.

Fn Keys

Firstly edit /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi and insert N140 into the list where you see NC10 already.

Now in a real console


will show presses for the function keys, but no releases for some of them.

An issue found on the Samsung NC10 is also present on the N140. It causes most of the function keys to send a key press but not a key release. A workaround quirk was put in the kernel in atkbd.c for the NC10. Patching this routine to apply the same quirk (for 2.6.31 and earlier) also works for the N140.

For 2.6.32 and later this can be done from user space. Simply use the following in /etc/rc.local:

 echo 130,131,132,134,136,137,179,247,249 > /sys/devices/platform/i8042/serio0/force_release

To bind the Fn keys to action, read Extra_Keyboard_Keys#The_quick_way and also Extra Keyboard Keys in Xorg.

The suspend key (Fn+ESC) and disable touchpad (Fn+F10) keys, numlock, scroll lock, volume controls and mute work out of the box.

Note, that suspend key is handled in /etc/acpi/ (see "button/sleep" case entry) as shown above.

1) install xbindkeys

 pacman -S xbindkeys

2) check the key values with

 xbindkeys -mk

3) edit .xbindkeysrc

 "sudo /sbin/backlight up"
     m:0x0 + c:233
 "sudo /sbin/backlight down"
     m:0x0 + c:232
     m:0x0 + c:244
 "sudo /sbin/backlight toggle"
     m:0x0 + c:156
     m:0x0 + c:157
     m:0x0 + c:210
     m:0x0 + c:246

4) run xbindkeys, and try it out


For KDE4 put a link to /usr/bin/xbindkeys in ~/.kde4/Autostart

 ln -s /usr/bin/xbindkeys ~/.kde4/Autostart/

The Fn+F3 ("Euro") key: here Samsung implemented what has been called an entertaingly hilarious hack: ROFL! Does anyone know a practical use for this key? Fortunately some (eurozone) models have a real Euro key as well.

Saving Power

Read Laptop#Suggestions_for_saving_power

But, great caution is advised here with hdparm settings because the issue with SATA freezing is related to power management and spindowns.

Note also that (contrary to the advice in many places) hdparm -B 255 /dev/sda does NOT necessarily turn off advanced power management. What happens actually depends on the disk model. With the Samsung HM160HI disk 255 results in very frequent spindowns.