jtes.net
John Slade – Software Engineer, London UK
Category: Linux

Easy setup of NAT forwarding using iptables under Linux (this was only tested on Fedora 18):

EXTERNAL=wlan0
INTERNAL=p3p1
sysctl -w net.ipv4.ip_forward=1
iptables -F
iptables -A FORWARD -i $INTERNAL -j ACCEPT
iptables -A FORWARD -o $INTERNAL -j ACCEPT
iptables -t nat -A POSTROUTING -o $EXTERNAL -j MASQUERADE

Just a quick update to my previous post about Linux on the Samsung Series 9 2012.  I have now upgraded the laptop to Fedora 17 and most things that were a problem are now working.

I have had this laptop for 3 months now and use Linux on it almost everyday.  I only ever boot into Windows 7 to watch Netflix.  It is an absolutely amazing laptop: fast, brilliant screen, easy to type keyboard and it looks great.

Trackpad

Works out the box in FC17.  No changes required. Right click works perfectly now and so does two finger scroll.

Keyboard backlight

The keyboard backlight now turns on when the laptop is in low light conditions.  However, the function keys don’t work to adjust the brightness.  So if you do want to do that you have to use the command line (must be run as root):

echo N > /sys/devices/platform/samsung/leds/samsung\:\:kbd_backlight/brightness

Suspend

There is a still sometimes a problem with the brightness when resuming from suspend.  I have just got used to it and enter my password to a black screen and alter the brightness.

I came across a video on Vimeo that I wanted to download to my computer so that I could watch it later.  The  Vimeo Downloader script for Linux no longer works as Vimeo have updated their site.  So I fixed it:

https://raw.github.com/johnteslade/vimeo-downloader/master/vimeo_downloader.sh

Source code repository: https://github.com/johnteslade/vimeo-downloader

Usage

Run the following from the command line:

./vimeo_downloader.sh http://vimeo.com/1084537

On Wednesday I collected by brand new laptop – the latest Samsung Series 9 (model NP900X3B).  Ordered through John Lewis and collected from my local Waitrose.  This is the first time I have ever sent this much money (£1199) on an electrical item.  The laptop is

I’m a Linux user so this post is about getting Fedora 16  running on it.

Update: 27 Jun 2012 added new post for running Fedora 17 on this laptop

Updated: 28 Mar 2012 added mouse details and backlight adjustment

Updated: 26 Mar 2012 with more details

If you prefer to run another Linux distribution see these blog posts: Debian by Daniel Barlow and Ubuntu by Vaibhav Verma.

Booting from USB

First step of getting Linux installed is to boot from a USB stick.  This took me ages to get working – in particular you must disable “Fast BIOS Mode” in the BIOS setup (it’s on the “Advanced” tab).  Then you can alter the boot priority to USB first.  Thanks for this thread on Notebook Review for pointing that out.

My Fedora 16 x86_64 live USB stick booted fine and everything seemed to work ok.  So next step was to install it to disk.

Re-partitioning

In order to make space for Linux I shrunk the main partition (originally 90GB in size) down to 50GB using the Windows Disk Management tool.  This left 43GB of unallocated space to install Linux on.  I also had to delete the 5GB hibernation partition using gparted.  This has had no effect on how Windows runs.

Trackpad

The biggest problem I found in Fedora was that trackpad has didn’t work properly.  It worked fine in the original 3.1.0 kernel – but when I updated to 3.2.10 and 3.3.0 it started behaving erratically and the cursor not moving when I moved my finger.  Add the following to your xorg config (thanks to Guy Lunardi for this):

Option "FingerLow" "1" #sensitivity detection low
Option "FingerHigh" "1" #sensitivity detection high
Option "RTCornerButton" "3" #right-click to bottom right
#Option "MinSpeed" "0.7"
#Option "MaxSpeed" "1.7"
Option "TapAndDragGesture" "1" #tap&release then tap&drag
Option "PalmDetect" "1" #avoid bad track behavior
Option "VertTwoFingerScroll" "1" #two-finger vertical scroll
Option "VertEdgeScroll" "0" #right edge vertical scroll
Option "TapButton1" "1" #one-finger tap = left-click
Option "TapButton2" "3" #two-finger tap = right-click1

There are still some problems – you can’t tap the touchpad to click and right click is broken.  But two finger multitouch works to scroll up and down pages.

Backlit Keyboard

The keyboard backlight keys (f9 and f10) don’t work as default.  However, there is a fix for first series 9 laptop (details here) that works on this laptop.

  • Download https://github.com/iksaif/samsung-laptop-dkms
  • Compile the code (you need to have kernel-devel, kernel-headers and gcc installed)
  • Load the module with insmod
  • Change the brightness (N=0 for off, N=8 for max) echo N > /sys/devices/platform/samsung/leds/samsung\:\:kbd_backlight/brightness

There is more work to automatically load this module and map the keys.

Suspend

I initially thought that the laptop would not resume from suspend/sleep.  But on further investigation it is just a screen brightness problem.  When it resumes the brightness is so low the screen looks like it is off.  But you can enter your password, hit enter and then sometimes the brightness comes back – or if not hit Fn+F3 and it works again.  I will get a bug raised for this.

External Monitors

The laptop has two external monitor ports – MicroHDMI and VGA (via a dongle.  Since I don’t have the VGA dongle I could only test microHDMI and it works fine under Linux.  I was able to drive 2048×1152 monitor as a second screen and drag windows between that and the laptop screen.

Wireless

Wireless worked out the box, connecting to my WPA2 home network.  I’ve had no problems with connectivity.

Sound

The sound works out the box (and the speakers sounds great for such a small laptop).  The headphone jack works too but I haven’t tested it with a microphone (it’s a dual headphone/microphone port).

Graphics

Again out the box graphics works perfectly.  Works in 3D acceleration perfectly – I’m running Gnome 3 shell.   glxgears (yes it’s basic) runs but there is some tearing when in fullscreen mode.

Battery Life

I haven’t done any tests on battery life, nor have I changed any settings.  From a full charge, Linux is estimating about 3 hours of time remaining (windows reports about 5).  This is my next item of things to check out – trying out powertop, Jupiter and tuned.

Ethernet

Ethernet is via a breakout dongle (code AA-AE2N12B and supplied in the original box).  This worked perfectly in Linux: plugin dongle, attach ethernet cable and good to go.  The only annoying thing is having to remember to carry around the dongle.

Webcam

Tried this out using Cheese and Skype and both the camera and internal microphone and work fine.

Conclusion

Overall Linux is working very well on this laptop.  There is some more work to do be done, but I am surprised how much worked on the default Linux installation.

If there is anything else anyone would like to me test out let me know in the comments.

I am also updating the LinLap entry for this laptop.

I always had problems getting Flash to work in both Firefox and Chrome when running Fedora Linux.  This became more of a problem since I started using the x86_64 kernel.  But here are the steps I took that worked under Fedora 16.  Thanks to the_nins on the chrome support pages.

Install the flash rpm
From http://get.adobe.com/flashplayer/
Install the other required packages
yum install flash-plugin nspluginwrapper.x86_64 nspluginwrapper.i686 alsa-plugins-pulseaudio.i686 libcurl.i686
Create the wrapped up plugins for x86_64
mozilla-plugin-config -i -g -v
Create a symlink to the wrapped file:
cd /usr/lib64/mozilla/plugins
ln -s /usr/lib64/mozilla/plugins-wrapped/nswrapper_32_64.libflashplayer.so

Restart the browser and it should pickup the flash plugin.  I would also highly recommend using flashblock to load flash animations on demand – addons for Chrome and Firefox.