Difference between revisions of "Samsung N120"

From ArchWiki
Jump to: navigation, search
(Saving Power: rm dupe out-of-date content)
m (update link(s) (avoid redirect if the titles differ only in capitalization) (testing https://github.com/lahwaacz/wiki-scripts/blob/master/fix-links-avoid-redirect.py))
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
This article aims on providing the informations on installing and setting up Arch Linux on the Samsung N120. Basically I used information from [[Samsung NC10]] netbook wiki.
 
This article aims on providing the informations on installing and setting up Arch Linux on the Samsung N120. Basically I used information from [[Samsung NC10]] netbook wiki.
  
A lot of the information is derived from the [http://bbs.archlinux.org/viewtopic.php?id=58117 NC10 Arch Forum] and [http://bbs.archlinux.org/viewtopic.php?id=77218 N120 Arch Forum] and several hints scattered around in the ArchWiki.
+
A lot of the information is derived from the [https://bbs.archlinux.org/viewtopic.php?id=58117 NC10 Arch Forum] and [https://bbs.archlinux.org/viewtopic.php?id=77218 N120 Arch Forum] and several hints scattered around in the ArchWiki.
  
=Prior to Installation, current state and Common Issues You Should Be Aware Of=
+
==Prior to Installation, current state and Common Issues You Should Be Aware Of==
 
Following information is based on kernel 2.6.32 (2010.04.08).
 
Following information is based on kernel 2.6.32 (2010.04.08).
 
* Suspend to RAM and Suspend to Disk works perfectly.
 
* Suspend to RAM and Suspend to Disk works perfectly.
Line 15: Line 15:
 
* If you encounter problems with the installation from USB disk, add acpi=off to the kernel parameters.
 
* If you encounter problems with the installation from USB disk, add acpi=off to the kernel parameters.
  
=Installation=
+
==Installation==
  
 
You can use the usb image provided at the official download locations or the iso, if you have an external optical drive. If installation fails try to add acpi=off to the kernel parameters.
 
You can use the usb image provided at the official download locations or the iso, if you have an external optical drive. If installation fails try to add acpi=off to the kernel parameters.
  
=Configure your installation=
+
==Configure your installation==
  
==Network==
+
===Network===
===Ethernet===
+
====Ethernet====
 
Works out-of-the-box with stock kernel module <b>sky2</b>.
 
Works out-of-the-box with stock kernel module <b>sky2</b>.
===Wireless===
+
====Wireless====
{{accuracy|reason=needs to be confirmed that the firmware still isn't provided}}
+
 
* With devices based on Atheros chip use the stock kernel module <b>ath5k</b>.
 
* With devices based on Atheros chip use the stock kernel module <b>ath5k</b>.
 
* With Realtek based devices wireless works with stock kernel module <b>r8192e_pci</b>.  
 
* With Realtek based devices wireless works with stock kernel module <b>r8192e_pci</b>.  
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device 8192 (rev 01)
+
See [[Wireless network configuration]] for more information.
You can use [https://aur.archlinux.org/packages.php?ID=36675 rtl8192e-firmware-git] from AUR to install the firmware files or get pre-created package from here: [http://www.ihku.biz/SamsungN120/rtl8192e-firmware-git-20100424-1-any.pkg.tar.xz rtl8192e-firmware-git-20100424-1-any.pkg.tar.xz].
+
  
The driver needs firmware files that are not currently included in linux-firmware, so grab them as follows:
+
===Video===
cd /tmp
+
git clone git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/firmware.git
+
# run these as root:
+
cp -av firmware/RTL8192E /lib/firmware/
+
depmod -a
+
modprobe r8192e_pci
+
  
==Video==
+
===Initial Brightness===
 
+
==Initial Brightness==
+
 
The full brightness can be set with the following command
 
The full brightness can be set with the following command
  
Line 48: Line 38:
 
where FF is the highest level of brightness. That parameter moves in the range 00..FF. Don't set it too low because your backlight will turn off! I tried different parameters and optimal are F.4B=45 or F.4B=50. I added setpci -s 00:02.1 F4.B=40 to my /etc/rc.local.
 
where FF is the highest level of brightness. That parameter moves in the range 00..FF. Don't set it too low because your backlight will turn off! I tried different parameters and optimal are F.4B=45 or F.4B=50. I added setpci -s 00:02.1 F4.B=40 to my /etc/rc.local.
  
==Graphics Adapter==
+
===Graphics Adapter===
 
The Video controller is a typical [[Intel]] chipset that works with the xf86-video-intel driver (or xf86-video-intel-new from AUR)
 
The Video controller is a typical [[Intel]] chipset that works with the xf86-video-intel driver (or xf86-video-intel-new from AUR)
  
Line 61: Line 51:
 
  EndSection
 
  EndSection
  
===External VGA===
+
====External VGA====
 
External VGA works out of the box with xrandr
 
External VGA works out of the box with xrandr
  
Line 70: Line 60:
 
You can also use randr frontend, lxrandr for example.
 
You can also use randr frontend, lxrandr for example.
  
Dual head positioning works also perfectly : [[Xorg#Multi-monitor_setups]]
+
Dual head positioning works also perfectly : [[Xorg#Multiple monitors]]
  
==Audio==
+
===Audio===
 
The audio device is an Intel HD. Since alsa 1.0.19 distributed in archlinux extra repository, you do not need to manually install alsa driver. Everything is working out of the box: onboard microphone and speakers, audio off on earphone plugging.
 
The audio device is an Intel HD. Since alsa 1.0.19 distributed in archlinux extra repository, you do not need to manually install alsa driver. Everything is working out of the box: onboard microphone and speakers, audio off on earphone plugging.
  
Line 95: Line 85:
 
  5.configure sound volume with alsamixer , reboot , and enjoy :)
 
  5.configure sound volume with alsamixer , reboot , and enjoy :)
  
==Suspend and Hibernate==
+
===Suspend and Hibernate===
 
Pm-suspend should work correctly without any quirks at the moment.
 
Pm-suspend should work correctly without any quirks at the moment.
  
Line 113: Line 103:
 
Right after resume you may notice (i.e. in powertop) lost support for C2 and C4 CPU states. Don't panic. Those modes are likely to return in several minutes.
 
Right after resume you may notice (i.e. in powertop) lost support for C2 and C4 CPU states. Don't panic. Those modes are likely to return in several minutes.
  
==Fn Keys==
+
===Fn Keys===
 
You need at least kernel 2.6.28.4 to get the Fn keys to work correctly.
 
You need at least kernel 2.6.28.4 to get the Fn keys to work correctly.
  
 
(Volume Controls worked out of the box in kdemod 4.2)
 
(Volume Controls worked out of the box in kdemod 4.2)
  
To bind the Fn keys to action, read [[Extra_Keyboard_Keys#The_quick_way]] and also [[Extra_Keyboard_Keys_in_Xorg#Using_your_Desktop_Environment_tools|Extra Keyboard Keys in Xorg]]. The suspend key (Fn+ESC) and disable touchpad (Fn+F10) keys should work out of the box. Note, that suspend key is handled in /etc/acpi/handler.sh (see "power/sleep" case entry). If you use pm-utils, you should substitute the default action with the call to pm-suspend or pm-hibernate.
+
To bind the Fn keys to action, read [[Extra keyboard keys]]. The suspend key (Fn+ESC) and disable touchpad (Fn+F10) keys should work out of the box. Note, that suspend key is handled in /etc/acpi/handler.sh (see "power/sleep" case entry). If you use pm-utils, you should substitute the default action with the call to pm-suspend or pm-hibernate.
  
 
This tweak taken from [https://help.ubuntu.com/community/NC10 Ubuntu wiki]. To get volume and brightness Fn keys work in Gnome you have to make sure that gnome-power-manager is running and add ";N120" to the list of Samsung models in /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi, i.e.
 
This tweak taken from [https://help.ubuntu.com/community/NC10 Ubuntu wiki]. To get volume and brightness Fn keys work in Gnome you have to make sure that gnome-power-manager is running and add ";N120" to the list of Samsung models in /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi, i.e.
Line 129: Line 119:
 
  <match key="/org/freedesktop/Hal/devices/computer:system.hardware.product"  
 
  <match key="/org/freedesktop/Hal/devices/computer:system.hardware.product"  
 
  contains_outof="SP55S;SQ45S70S;SX60P;R59P/R60P/R61P;Q310;X05;N120">
 
  contains_outof="SP55S;SQ45S70S;SX60P;R59P/R60P/R61P;Q310;X05;N120">
 
  
 
Also you can play with xbindkey. As an example, here is how to bind the keys for volume control :
 
Also you can play with xbindkey. As an example, here is how to bind the keys for volume control :
Line 173: Line 162:
 
Alternatively, you can add needed broghtness level on the boot, simply add line setpci -s 00:02.1 F4.B=FF (00..FF) to your /etc/rc.local.
 
Alternatively, you can add needed broghtness level on the boot, simply add line setpci -s 00:02.1 F4.B=FF (00..FF) to your /etc/rc.local.
  
===Fix Fn + key combinations does not produce key release events===
+
====Fix Fn + key combinations does not produce key release events====
 
Run and add following command to /etc/rc.local to fix Fn-key behavior ([https://bugzilla.kernel.org/show_bug.cgi?id=14052 14052]):
 
Run and add following command to /etc/rc.local to fix Fn-key behavior ([https://bugzilla.kernel.org/show_bug.cgi?id=14052 14052]):
 
  echo 133-139,143,147,236,227 > /sys/devices/platform/i8042/serio0/force_release
 
  echo 133-139,143,147,236,227 > /sys/devices/platform/i8042/serio0/force_release
 
For example the brightness controls (Fn+Up/Down) should now work as expected.
 
For example the brightness controls (Fn+Up/Down) should now work as expected.
  
==Power saving==
+
===Power saving===
  
 
See [[power saving]].
 
See [[power saving]].

Latest revision as of 11:06, 21 August 2014

This article aims on providing the informations on installing and setting up Arch Linux on the Samsung N120. Basically I used information from Samsung NC10 netbook wiki.

A lot of the information is derived from the NC10 Arch Forum and N120 Arch Forum and several hints scattered around in the ArchWiki.

Prior to Installation, current state and Common Issues You Should Be Aware Of

Following information is based on kernel 2.6.32 (2010.04.08).

  • Suspend to RAM and Suspend to Disk works perfectly.
  • Webcam works out-of-the-box, even with Skype.
  • Volume controls and LAN works.
  • WLAN works out of the box for Atheros hardware and with Realtek hardware after installing firmware.
  • Audio (including onboard microphone, speakers and audio off on earphone plugging) is working flawlessly.
  • It is possible to get all Fn+key combinations working (See Fn-keys and fix).
  • Updating BIOS to version 07CE (or later) fixes some brightness control issues.
  • If you encounter problems with the installation from USB disk, add acpi=off to the kernel parameters.

Installation

You can use the usb image provided at the official download locations or the iso, if you have an external optical drive. If installation fails try to add acpi=off to the kernel parameters.

Configure your installation

Network

Ethernet

Works out-of-the-box with stock kernel module sky2.

Wireless

  • With devices based on Atheros chip use the stock kernel module ath5k.
  • With Realtek based devices wireless works with stock kernel module r8192e_pci.

See Wireless network configuration for more information.

Video

Initial Brightness

The full brightness can be set with the following command

setpci -s 00:02.1 F4.B=FF

where FF is the highest level of brightness. That parameter moves in the range 00..FF. Don't set it too low because your backlight will turn off! I tried different parameters and optimal are F.4B=45 or F.4B=50. I added setpci -s 00:02.1 F4.B=40 to my /etc/rc.local.

Graphics Adapter

The Video controller is a typical Intel chipset that works with the xf86-video-intel driver (or xf86-video-intel-new from AUR)

To save some interrupts and therefore power you can disable dri in your xorg.conf. This disables 3D effects but if you do not need them this could be an option.

Section "Device"
Option "NoDRI"
Identifier "Card0"
Driver "intel"
VendorName "Intel Corporation"
BoardName "Mobile 945GME Express Integrated Graphics Controller"
BusID "PCI:0:2:0"
EndSection

External VGA

External VGA works out of the box with xrandr

in order to prevent problems when switching to console or when unplugging the external monitor, make sure to specify the frequency along with the mode, for example :

xrandr --output VGA --mode 1280x1024 --rate 60

You can also use randr frontend, lxrandr for example.

Dual head positioning works also perfectly : Xorg#Multiple monitors

Audio

The audio device is an Intel HD. Since alsa 1.0.19 distributed in archlinux extra repository, you do not need to manually install alsa driver. Everything is working out of the box: onboard microphone and speakers, audio off on earphone plugging.

Troubleshooting :

  • If the volume is too low, or lower than in Windows run alsamixer, and set "front" to 100%.
  • If the microphone does not work, press F4 in alsamixer and play with the settings (boost to 0, digital and capture to mid-values, and input to front-mic should be a sane default).

Note that settings can be saved with "alsactl store"

  • One user reported that he had to disable every snd module in his rc.conf except for two: snd_hda_intel and snd_pcm_oss.
  • [deprecated] if the speakers do not mute when you plug in headphones, you may need to compile alsa.

Download latest alsa build. Extract the tar.bz2 and open a console on alsa source folder

1.execute this command : ./configure --with-cards=hda-intel --with-oss=yes --with-sequencer=yes
2.execute this command : make
3.execute this command : sudo make install
4.get alsa-utils with pacman
5.configure sound volume with alsamixer , reboot , and enjoy :)

Suspend and Hibernate

Pm-suspend should work correctly without any quirks at the moment.

You can use this command not only to suspend from terminal but also in combination with acpid

If after closing the lid your machine doesn't wake up from suspend correctly and needs to be resumed multiple times, you can try using the following workaround. This is an excerpt from /etc/acpid/handler.sh file:

    button/lid)
       if [ `/bin/awk '{print $2}' /proc/acpi/button/lid/LID0/state` = closed ]; then
           /usr/sbin/pm-suspend
       fi
       ;;

In contrast hibernate works without "modifications" (except the ones mentioned in the pm-utils article).

If you are a kde4/kdemod user you can take advantage of powerdevil (included in kdemod-core/kdemod-kdebase-workspace since release 4.2). Screen brightness, cpu scaling, suspend and hibernate all work flawlessly, without any hack.

Right after resume you may notice (i.e. in powertop) lost support for C2 and C4 CPU states. Don't panic. Those modes are likely to return in several minutes.

Fn Keys

You need at least kernel 2.6.28.4 to get the Fn keys to work correctly.

(Volume Controls worked out of the box in kdemod 4.2)

To bind the Fn keys to action, read Extra keyboard keys. The suspend key (Fn+ESC) and disable touchpad (Fn+F10) keys should work out of the box. Note, that suspend key is handled in /etc/acpi/handler.sh (see "power/sleep" case entry). If you use pm-utils, you should substitute the default action with the call to pm-suspend or pm-hibernate.

This tweak taken from Ubuntu wiki. To get volume and brightness Fn keys work in Gnome you have to make sure that gnome-power-manager is running and add ";N120" to the list of Samsung models in /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi, i.e.

<match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" 
contains_outof="SP55S;SQ45S70S;SX60P;R59P/R60P/R61P;Q310;X05">

becomes

<match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" 
contains_outof="SP55S;SQ45S70S;SX60P;R59P/R60P/R61P;Q310;X05;N120">

Also you can play with xbindkey. As an example, here is how to bind the keys for volume control :

1) install xbindkeys (and xbacklight from package xorg-server-utils for brightness control):

pacman -S xbindkeys xorg-server-utils

2) crate a config file in your home directory :

vi .xbindkeysrc

3) with the following content :

"amixer sset Master 2+ &"
    m:0x0 + c:176
"amixer sset Master 2- &"
    m:0x0 + c:174
#"amixer sset Master 0 &"
"amixer sset Master toggle &"
    m:0x0 + c:160
#"sudo pm-suspend"
#    m:0x0 + c:223
"xbacklight +10"
    m:0x0 + c:233
"xbacklight -10"
    m:0x0 + c:232

For your NC10 Fn keysums may differ. If any Fn keys do not work with the above .xbindkeysrc, you should check the keysum values with

xbindkeys -k

4) run xbindkeys :

xbindkeys

and volume control should work within an X session !

to add aditional bindings, you can get the codes of most of the Fn-keys with

xbindkeys -k

For the keys that are not recongnized, see

dmesg |tail

to make the kernel recognize them.

(If your Screen is not bright enough, boot into Windows and set the Brightness to maximum)

(you can adjust Brightness during the boot process without returning into Windows and you need to set maximum brightness on battery only mode)

Alternatively, you can add needed broghtness level on the boot, simply add line setpci -s 00:02.1 F4.B=FF (00..FF) to your /etc/rc.local.

Fix Fn + key combinations does not produce key release events

Run and add following command to /etc/rc.local to fix Fn-key behavior (14052):

echo 133-139,143,147,236,227 > /sys/devices/platform/i8042/serio0/force_release

For example the brightness controls (Fn+Up/Down) should now work as expected.

Power saving

See power saving.