This article provides information about installing and setting up Arch Linux on the Samsung N140. It is also relevant for the Samsung N130 which is identical except for the omission of Bluetooth and stereo speakers (and possibly a different battery capacity). There are versions of the N130 which include a 3G cellular modem, available from Vodafone and China Mobile. The [[Samsung NC10]] is similar but not identical to the N140, so you may or may not find useful information on that page.

This article provides information about installing and setting up Arch Linux on the Samsung N140. It is also relevant for the Samsung N130 which is identical except for the omission of Bluetooth and stereo speakers (and possibly a different battery capacity). There are versions of the N130 which include a 3G cellular modem, available from Vodafone and China Mobile. The [[Samsung NC10]] is similar but not identical to the N140, so you may or may not find useful information on that page.

−

=Issues=

+

=== BIOS issues ===

−

==BIOS Issues==

+

==== No backlight setting via ACPI ====

−

===No backlight setting via ACPI===

−

A workaround is to use "setpci" as shown below.

+

A workaround is to use {{ic|setpci}} as shown below.

Alternatively there is a kernel patch (unrelated to the SATA freeze problem) available which changes the backlight brightness using SMI instead of poking PCI config space. It provides a kernel module called "samsung-laptop". Interestingly we see from a version of this patch which is included in OpenSUSE 11.1 that a special (as yet unreleased?) BIOS for the N130 can be informed that the OS is Linux. The effect of this hasn't been published. Suggestion: run the samsung-laptop module with its debug parameter set to 1 to check whether it does anything at all.

Alternatively there is a kernel patch (unrelated to the SATA freeze problem) available which changes the backlight brightness using SMI instead of poking PCI config space. It provides a kernel module called "samsung-laptop". Interestingly we see from a version of this patch which is included in OpenSUSE 11.1 that a special (as yet unreleased?) BIOS for the N130 can be informed that the OS is Linux. The effect of this hasn't been published. Suggestion: run the samsung-laptop module with its debug parameter set to 1 to check whether it does anything at all.

−

===No key releases for some Fn keys===

+

==== No key releases for some Fn keys ====

Some of the Fn keys give key press events but no key releases. This problem was also seen on the NC10 and NC20. A workaround is given below. For kernels 2.6.32 and later this can be done from userspace.

Some of the Fn keys give key press events but no key releases. This problem was also seen on the NC10 and NC20. A workaround is given below. For kernels 2.6.32 and later this can be done from userspace.

−

==Software issues==

+

== Installation ==

−

−

===Frequent wireless disconnects===

−

With kernel 2.6.31 ath9k wifi exhibits frequent disconnects and reconnects. See http://bugzilla.kernel.org/show_bug.cgi?id=14267. Earlier and later kernels are better.

−

−

===Screen flickering and blackouts===

−

Some problems have been reported with [[KMS]] enabled for some 2.6.32 kernels. This problem is not specific to the Samsung N130/N140 -- it also affects others using Intel graphics drivers. Until the software is fixed a workaround is to[[Samsung_N140#Kernel_Mode_Setting| disable powersave mode]]. It expected that this issue will be resolved in kernel 2.6.33.

−

−

=Installation=

Do the standard Arch installation procedure from the ARCH CD ISO using an external USB CDROM drive. Alternatively boot the Arch installer from a USB flash drive.

Do the standard Arch installation procedure from the ARCH CD ISO using an external USB CDROM drive. Alternatively boot the Arch installer from a USB flash drive.

−

+

The standard Arch kernel is recommended.

−

The standard Arch kernel is recommended (2.6.34 or later).

A number of users have used a custom kernel for the following reasons:

A number of users have used a custom kernel for the following reasons:

−

* to boot with a minimal kernel containing just the required modules and without an initial ramdisk.

+

* to boot with a minimal kernel containing just the required modules and without an initial ramdisk

−

==Custom kernel: without initrd (AUR)==

+

=== Custom kernel without initrd ===

−

An AUR package [https://aur.archlinux.org/packages.php?ID=52790 linux-n130] is available. In this kernel most drivers are compiled in and there is no initial ramdisk. The drivers for cpu frequency scaling (acpi-cpufreq), wifi (ath9k, rtl8192e) and webcam (uvcvideo) are compiled as modules (i.e. '''not''' compiled in) so they can be inserted or removed from the kernel to enable or disable those features. MODULES in /etc/rc.conf can be used to enable or disable loading at boot.

+

An AUR package {{AUR|linux-n130}} is available. In this kernel most drivers are compiled in and there is no initial ramdisk. The drivers for cpu frequency scaling (acpi-cpufreq), wifi (ath9k, rtl8192e) and webcam (uvcvideo) are compiled as modules (i.e. '''not''' compiled in) so they can be inserted or removed from the kernel to enable or disable those features. Modules files in {{ic|/etc/modules.d}} can be used to enable or disable loading at boot.

Prepare the directory

Prepare the directory

Line 47:

Line 36:

$ cd linux-n130

$ cd linux-n130

−

At this point you can edit the PKGBUILD file if you need to (i) change the name or version number,

+

At this point you can edit the PKGBUILD file if you need to change the name or version number, change options or add additional patches.

−

(ii) change options or (iii) add additional patches.

Check the PKGBUILD. Don't experiment with the CK patchset at this point:

Check the PKGBUILD. Don't experiment with the CK patchset at this point:

Line 54:

Line 42:

Compile it (this will take some time...):

Compile it (this will take some time...):

$ makepkg -s

$ makepkg -s

−

Install the kernel from the new .pkg.tar.gz file

+

[[pacman|Install]] the kernel from the new .pkg.tar.xz file.

−

$ sudo pacman -U linux-n130-2.6.<xx.yy>-<rr>.pkg.tar.gz

−

Then, assuming you are using [[GRUB]], insert a new item in your {{Filename|/boot/grub/menu.lst}} to boot the new kernel "linux-N130". Note that no initrd line is necessary for this kernel.

+

Then insert a new item in your boot loader configuration file to boot the new kernel "linux-N130". Note that no initrd line is necessary for this kernel.

The kernel module for this device is "ath9k" (AR9285 is supported since 2.6.29).

+

The kernel module for this device is "ath9k". Kernels 2.6.32 release candidates and later seem to work fine.

−

−

Kernels 2.6.30 and 2.6.32-rcN release candidates seem to 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 linux-wireless@vger.kernel.org. To get it working either

−

downgrade to 2.6.30 or preferably upgrade to 2.6.32.

−

−

The following patch was included in 2.6.32 just before the final release: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=54ab040d24904d1fa2c0a6a27936b7c56a4efb24 . It disables PS (power saving) mode by default, since this mode was found to have problems. See here http://bugzilla.kernel.org/show_bug.cgi?id=14267 . PS mode can also be disabled with the following command, which can be placed in {{Filename|/etc/rc.local}}:

−

iwconfig wlan0 power off

−

===Realtek RTL8192E===

+

==== Realtek RTL8192E ====

−

====Open source driver====

−

The native Linux driver for this wireless device is still in preparation, but it is available as a kernel module "rtl8192e" in "staging" -- i.e. in preparation for inclusion in the kernel and available to try out, but likely to still have some problems. It has been reported as working [https://bbs.archlinux.org/viewtopic.php?id=86454&p=6]. Firmware is required. See

The native Linux driver for this wireless device is still in preparation, but it is available as a kernel module "rtl8192e" in "staging" -- i.e. in preparation for inclusion in the kernel and available to try out, but likely to still have some problems. It has been reported as working [https://bbs.archlinux.org/viewtopic.php?id=86454&p=6]. {{Pkg|linux-firmware}} package is required. See

−

$ md5sum /lib/firmware/RTL8192E/*

+

http://lkml.org/lkml/2009/12/15/410.

−

should return

−

bb9f64de23939ec247d15dfbeb0ed91e /lib/firmware/RTL8192E/boot.img

−

db83def0338769de1d4658a00b6f738d /lib/firmware/RTL8192E/data.img

−

0034020e5a32571f486849aa90a389a7 /lib/firmware/RTL8192E/main.img

On rebooting, the kernel messages (visible with "dmesg") should now indicate that rtl819xE finds the firmware for loading into the device.

On rebooting, the kernel messages (visible with "dmesg") should now indicate that rtl819xE finds the firmware for loading into the device.

Line 125:

Line 90:

Note: [[wicd]] may cause excessive dropped connections with this driver, while [[NetworkManager]] appears to work better.

Note: [[wicd]] may cause excessive dropped connections with this driver, while [[NetworkManager]] appears to work better.

−

====Ndiswrapper====

+

===== Ndiswrapper =====

−

It has been reported as working with [[Wireless_Setup#ndiswrapper|ndiswrapper]] which makes use of the closed source Windows driver under Linux.

+

+

It has been reported as working with [[Wireless network configuration#ndiswrapper|ndiswrapper]] which makes use of the closed source Windows driver under Linux.

−

==Cellular 3G Modem==

+

=== Cellular 3G Modem ===

''Specifications required''

''Specifications required''

−

==Graphics Adapter==

+

=== Graphics Adapter ===

The video controller is an Intel chipset that works with the xf86-video-intel driver.

The video controller is an Intel chipset that works with the xf86-video-intel driver.

To catch the "sleep" function key, edit {{Filename|/etc/acpi/handler.sh}} so that the button/sleep) event calls /usr/sbin/pm-suspend (instead of "echo mem > /sys/power/state" which may leave wifi down after resume):

+

To catch the "sleep" function key, edit {{ic|/etc/acpi/handler.sh}} so that the button/sleep) event calls /usr/sbin/pm-suspend (instead of "echo mem > /sys/power/state" which may leave wifi down after resume):

−

<pre>

+

−

button/sleep)

+

button/sleep)

−

case "$2" in

+

case "$2" in

−

SLPB) logger "Sleep button pressed, suspending to RAM"

+

SLPB) logger "Sleep button pressed, suspending to RAM"

−

/usr/sbin/pm-suspend

+

/usr/sbin/pm-suspend

−

;;

+

;;

−

*) logger "ACPI action undefined: $2"

+

*) logger "ACPI action undefined: $2"

−

;;

+

;;

−

esac

+

esac

−

;;

+

;;

−

</pre>

+

When catching the lid closure, the button/lid event will be seen twice -- once on 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

and again on resume. So use the lid state to distinguish between these so that pm-suspend

This is a BIOS issue which was also found on the Samsung NC10. A workaround quirk was put in the

This is a BIOS issue which was also found on the Samsung NC10. A workaround quirk was put in the

kernel in atkbd.c for the NC10. Patching this routine to apply the same

kernel in atkbd.c for the NC10. Patching this routine to apply the same

−

quirk also works for the N140, and is recommended for 2.6.31 and earlier.

+

quirk also works for the N140.

−

However for 2.6.32 and later (i.e. any current Arch installation) there is a much simpler solution because this quirk can now be applied from user space. Simply edit {{Filename|/etc/rc.local}} and add the following line:

+

There is a much simpler solution because this quirk can now be applied from user space. Simply create a systemd tmpfile with the following line:

{{Note|Contrary to the advice in many places "hdparm -B 255 /dev/sda" does NOT necessarily turn off advanced power management. What happens depends on the disk model. With the Samsung HM160HI disk 255 results in very frequent spindowns}}

+

{{Note|Contrary to the advice in many places {{ic|hdparm -B 255 /dev/sda}} does NOT necessarily turn off advanced power management. What happens depends on the disk model. With the Samsung HM160HI disk 255 results in very frequent spindowns}}

Revision as of 15:28, 15 February 2014

This article or section is out of date.

Reason:please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Samsung N140#)

This article provides information about installing and setting up Arch Linux on the Samsung N140. It is also relevant for the Samsung N130 which is identical except for the omission of Bluetooth and stereo speakers (and possibly a different battery capacity). There are versions of the N130 which include a 3G cellular modem, available from Vodafone and China Mobile. The Samsung NC10 is similar but not identical to the N140, so you may or may not find useful information on that page.

BIOS issues

No backlight setting via ACPI

A workaround is to use setpci as shown below.

Alternatively there is a kernel patch (unrelated to the SATA freeze problem) available which changes the backlight brightness using SMI instead of poking PCI config space. It provides a kernel module called "samsung-laptop". Interestingly we see from a version of this patch which is included in OpenSUSE 11.1 that a special (as yet unreleased?) BIOS for the N130 can be informed that the OS is Linux. The effect of this hasn't been published. Suggestion: run the samsung-laptop module with its debug parameter set to 1 to check whether it does anything at all.

No key releases for some Fn keys

Some of the Fn keys give key press events but no key releases. This problem was also seen on the NC10 and NC20. A workaround is given below. For kernels 2.6.32 and later this can be done from userspace.

Installation

Do the standard Arch installation procedure from the ARCH CD ISO using an external USB CDROM drive. Alternatively boot the Arch installer from a USB flash drive.
The standard Arch kernel is recommended.

A number of users have used a custom kernel for the following reasons:

to boot with a minimal kernel containing just the required modules and without an initial ramdisk

Custom kernel without initrd

An AUR package linux-n130AUR is available. In this kernel most drivers are compiled in and there is no initial ramdisk. The drivers for cpu frequency scaling (acpi-cpufreq), wifi (ath9k, rtl8192e) and webcam (uvcvideo) are compiled as modules (i.e. not compiled in) so they can be inserted or removed from the kernel to enable or disable those features. Modules files in /etc/modules.d can be used to enable or disable loading at boot.

Atheros AR9285

The kernel module for this device is "ath9k". Kernels 2.6.32 release candidates and later seem to work fine.

Realtek RTL8192E

Open source driver

The native Linux driver for this wireless device is still in preparation, but it is available as a kernel module "rtl8192e" in "staging" -- i.e. in preparation for inclusion in the kernel and available to try out, but likely to still have some problems. It has been reported as working [1]. linux-firmware package is required. See
http://lkml.org/lkml/2009/12/15/410.

On rebooting, the kernel messages (visible with "dmesg") should now indicate that rtl819xE finds the firmware for loading into the device.

Note: wicd may cause excessive dropped connections with this driver, while NetworkManager appears to work better.

Ndiswrapper

It has been reported as working with ndiswrapper which makes use of the closed source Windows driver under Linux.

Cellular 3G Modem

Specifications required

Graphics Adapter

The video controller is an Intel chipset that works with the xf86-video-intel driver.

Kernel Mode Setting

KMS works providing real consoles at the native LCD resolution, 1024x600.
There is a known problem with 2.6.32 kernels (later release candidates up to at least release 2.6.32.8),
which results in screen flickering and blackouts about 5 minutes after resuming
from suspend-to-RAM or suspend-to-disk.

Note:

If you encounter screen flickering or blackouts with KMS enabled, try setting i915.powersave=0 as a kernel boot option

Since version 2.10.0 of xf86-video-intel, support for UMS has been removed from the intel driver. This means that KMS is a requirement now

Method A

If you are using a kernel with no inital ramdisk and you can simply add the required options to the GRUB kernel line:

Method B

If you are using an initial ramdisk (either the standard kernel or the custom kernel method B above) then do the following:

Edit /etc/modprobe.d/modprobe.conf:

options i915 powersave=0
options i915 modeset=1

Edit /etc/mkinitcpio.conf:

MODULES="intel_agp i915"
FILES="/etc/modprobe.d/modprobe.conf"

Put keymap early in /etc/mkinitcpio.conf HOOKS.
Regenerate the init ramdisk for the kernel(s) you are running:

$ mkinitcpio -p linux

or

$ mkinitcpio -p linux-n140

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

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!

Note this does not require the samsung-laptop patch mentioned above.

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.

Suspend and hibernate

To catch the "sleep" function key, edit /etc/acpi/handler.sh so that the button/sleep) event calls /usr/sbin/pm-suspend (instead of "echo mem > /sys/power/state" which may leave wifi down after resume):

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.

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 handler.sh 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 at boot.

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

showkey

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

This is a BIOS issue which was also found on the Samsung NC10. A workaround quirk was put in the
kernel in atkbd.c for the NC10. Patching this routine to apply the same
quirk also works for the N140.
There is a much simpler solution because this quirk can now be applied from user space. Simply create a systemd tmpfile with the following line:

Saving Power

Note: Caution is advised here with hdparm settings because the issue with SATA freezing is
related to power management and spindowns. Before you tune the Samsung N130/N140 to minimize power consumption it is strongly recommended that you resolve the SATA freezing issue as discussed above.

The Samsung N130/N140 contains a 1.6 GHz Intel Atom ULV (ultra low voltage) N270 processor, designed for low power consumption. The power consumption of the netbook (not just the processor) can be as low as 6W on idle with HDD spun down, although a typical figure under normal usage would be considerably higher.

Obviously the battery life depends on battery capacity as well as power consumption.
The supplied battery varies in different markets. This list is a guideline only. Do not rely on this information before purchase -- check with YOUR vendor and update this wiki if it is incorrect:

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