Difference between revisions of "Samsung N140"

From ArchWiki
Jump to navigation Jump to search
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
#redirect [[ArchWiki:Archive]]
{{out of date}}
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 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.
== Configure your installation ==
=== Ethernet ===
RTL8101e/8102e fast ethernet. Works out of the box.
=== Wifi ===
The supplied wifi device is either an Atheros AR9285 (PCI ID = 168c:002b) (European markets) or a Realtek RTL8192E (US and UK markets).
==== Atheros AR9285 ====
02:00.0 Network controller [0280]: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) [168c:002b] (rev 01)
The kernel module for this device is "ath9k". Kernels 2.6.32 release candidates and later seem to work fine.
==== Realtek RTL8192E ====
Confirmed working out of the box on the current release (2014.07.03), with 3.15.3 Kernel.
===== Ndiswrapper =====
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 ===
''Specifications required''
=== Graphics Adapter ===
The video controller is an Intel chipset that works with the xf86-video-intel driver.
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GME Express Integrated Graphics Controller [8086:27ae] (rev 03)
00:02.1 Display controller [0380]: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller [8086:27a6] (rev 03)
==== Kernel Mode Setting ====
See also [[Intel#KMS_.28Kernel_Mode_Setting.29]].
[[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,
which results in screen flickering and blackouts about 5 minutes after resuming
from suspend-to-RAM or suspend-to-disk.
* 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 {{ic|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:
# (3) Arch Linux N130
title  Arch Linux Custom N130 Kernel
root  (hd0,YOURROOT-1)
kernel /boot/vmlinuz26-N130 root=/dev/sdaYOURROOT resume=/dev/sdaYOURSWAP ro quiet '''i915.powersave=0 i915.modeset=1'''
===== 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 {{ic|/etc/modprobe.d/modprobe.conf}}:
options i915 powersave=0
options i915 modeset=1
Edit {{ic|/etc/mkinitcpio.conf}}:
MODULES="intel_agp i915"
Put keymap early in {{ic|/etc/mkinitcpio.conf}} HOOKS.
Regenerate the init ramdisk for the kernel(s) you are running:
$ mkinitcpio -p linux
$ mkinitcpio -p linux-n140
Remove any vga= or video= from grub {{ic|/boot/grub/menu.lst}} kernel line, and reboot.
==== Backlight Brightness ====
Brightness function keys confirmed working out of the box on current release (2014.07.03) with 3.15.3 kernel.
==== External VGA ====
External VGA works out of the box with xrandr / krandrtray. Tested at 1920x1080 resolution.
=== Audio ===
The audio device is an Intel HD.
00:1b.0 Audio device [0403]: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller [8086:27d8] (rev 02)
=== Suspend and hibernate ===
Suspend to RAM with {{ic|pm-suspend}} works.
It is most useful to trigger suspends using [[acpid]].
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):
  case "$2" in
  SLPB) logger "Sleep button pressed, suspending to RAM"
  *)    logger "ACPI action undefined: $2"
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.
Enter the following lines in {{ic|/etc/acpi/handler.sh}}:
  if [ $(/bin/awk '{print $2}' /proc/acpi/button/lid/LID0/state) = closed ]; then
Hibernate works correctly. See [[pm-utils]].
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 {{ic|/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.
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:
w /sys/devices/platform/i8042/serio0/force_release - - - - 130,131,132,134,136,137,179,247,249
After this is run, doing {{ic|showkey}} in a real console will show key presses and releases.
==== Binding Fn keys with xbindkeys ====
The following has been tested with KDE, but should also work for other DEs.
To bind the Fn keys to action, read [[Extra Keyboard Keys]].
The suspend key {{ic|Fn+ESC}} and disable touchpad {{ic|Fn+F10}} keys, numlock, scroll lock,
volume controls and mute work out of the box.
Note, that suspend key is handled in {{ic|/etc/acpi/handler.sh}} (see "button/sleep" case entry) as
shown above.
# Install {{Pkg|xbindkeys}}
# Check the key values with {{ic|xbindkeys -mk}}
# Edit .xbindkeysrc {{bc|<nowiki>
"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
# Run {{ic|xbindkeys}}, and try it out
For KDE4 put a link to {{ic|/usr/bin/xbindkeys}} in {{ic|~/.kde4/Autostart}}:
  ln -s /usr/bin/xbindkeys ~/.kde4/Autostart/xbindkeys.link
The {{ic|Fn+F3}} ("Euro") key: here Samsung implemented what has been called
an [http://lists.freedesktop.org/archives/hal/2009-August/013536.html entertaingly hilarious hack].
Fortunately some eurozone models have a real Euro key as well.
==== Binding Fn keys in Openbox ====
In [[Openbox]] one can use the internal keybind setup instead of xbindkeys.
Here is an excerpt from rc.xml:
    <keybind key="XF86Battery">
      <action name="Execute">
    <keybind key="XF86Display">
      <action name="Execute">
    <keybind key="XF86Launch1">
      <action name="Execute">
    <keybind key="XF86Launch2">
      <action name="Execute">
        <command>nice python ~/.config/openbox/scripts/checkmail.py --update</command>
    <keybind key="XF86Launch3">
      <action name="Execute">
    <keybind key="XF86AudioMute">
      <action name="Execute">
        <command>~/.PersonalBin/volume mute</command>
    <keybind key="XF86WLAN">
      <action name="Execute">
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <command>~/.PersonalBin/volume -</command>
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <command>~/.PersonalBin/volume +</command>
    <keybind key="XF86MonBrightnessDown">
      <action name="PreviousWindow">
          <action name="Focus"/>
          <action name="Raise"/>
    <keybind key="XF86MonBrightnessUp">
      <action name="NextWindow">
          <action name="Focus"/>
          <action name="Raise"/>
=== Saving Power ===
Read [[Laptop#Power_Management]].
{{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:
Voltage 11.1V
N130            = 4000mAh [44Wh] (most markets), 5200mAh [57Wh] (Sweden)
N130 (Vodafone)  = ? [?] (Spain)
N130 (CMCC)      = ? [?] (China)
N140            = 5200mAh [57Wh] (US, Germany, France, Sweden), 5900mAh [65Wh] (UK)
Extended battery = 7800mAh [86Wh]
Install {{Pkg|powertop}} which is a [[powertop|very useful tool]] for measuring and tuning power consumption.
Enable CPU frequency scaling (P-states) by loading the driver module {{ic|acpi-cpufreq}}. This is most conveniently done dropping a namesake file in {{ic|/etc/modules-load.d}}:
Select the CPU frequency governor by adding the following lines to a systemd tmpfile:
w /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - - - - ondemand
w /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - - - - ondemand
{{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}}

Latest revision as of 22:34, 25 November 2017

Redirect to: