How do you rate this laptop with Linux?
Excellent
 
50% (4)
Good
 
50% (4)
Fair
0% (0)
Poor
0% (0)
Unusable
0% (0)

Asus N10J

Introduction

This is a compatibility guide to running Linux with the Asus N10J laptop.

This guide is intended to provide you details on how well this laptop works with Linux and which modules you need to configure. For details on how to actually install and configure the required modules have a look at our guides section for distribution specific instructions.

This page is just for discussing using Linux on the Asus N10J. For a general discussion about this laptop you can visit the Asus N10J page on LapWik.

Editing This Page

If you would like to edit this page please first view our Editing Guidelines.

Specifications

For full specifications see the Asus N10J specifications page.

NameAsus N10J
ProcessorIntel® Atom® Processor N270 : 1.6 GHz 533 MHz, On-Die 512K Cache
Screen10.2“ WSVGA Widescreen
RAMUp to 2GB
HDD160GB to 320GB
Optical DriveNone
GraphicsNVIDIA® GeForce® 9300M GS
Network10/100 Ethernet
Integrated 802.11a/b/g/n or 802.11b/g

Linux Compatibility

DeviceCompatibilityComments
ProcessorWorks
ScreenWorks
HDDWorks
GraphicsWorks Needs some tuning to get both working
SoundWorks need adjustments
EthernetWorks
WirelessWorks
BluetoothWorks
USBWorks
Card ReaderWorks
ExpressCard SlotWorks
WebcamWorks, but picture upside down Patch to uvcvideo avaliable

Notes

The following fixes apply to debian sid distro. May be different for others.

kernel upgrade
It is really recomended, but in no way obligatory.
The instructions as well as a .config can be found here:
http://forum.notebookreview.com/showthread.php?t=315810

Sound

To get sound working I added

options snd-hda-intel position_fix=1 model=3stack-6ch-dig

to /etc/modprobe.d/alsa-base

Video

To seemlessly switch video cards you need to create 2 xorg.conf files and a switch script
I stored them to /etc/double_xorg
The procedure looks like some voodoo, but nevertheless.
Boot with your nvidia card and install the drivers, go to vt1 using ctrl+alt+f1, login as root.

/etc/init.d/gdm stop

or

/etc/init.d/kdm stop

or

/etc/init.d/xdm stop

(whatever you are using)

mkdir /temp
cd /temp
wget ftp://download.nvidia.com/XFree86/Linux-x86/180.18/NVIDIA-Linux-x86-180.18-pkg1.run
chmod +x NVIDIA-Linux-x86-180.18-pkg1.run
./NVIDIA-Linux-x86-180.18-pkg1.run

Follow the on-screen instructions…
You should now be able to start gui

/etc/init.d/gdm start

or

/etc/init.d/kdm start

and synaptic.
Now the interesting voodoo part…
You have already installed the nvidia drivers and they wipe your libglx.so and libGL.so.1.2.
You have to reinstall xserver-xorg-core and libgl1-mesa. (the package names are that in debian) to get them back. Since nvidia does not provide the libGL.so.1.2 file and libglx.so is now is a symlink nothing harmful will happen after reinstall of the mentioned packages. You may now kill the gui, we won't need it for some time.

cd /usr/lib/xorg/modules/extensions/
mv libglx.so libglx.so.intel

Done. Now create /etc/double_xorg directory and put 3 files there

vid_switch

#!/bin/bash
INTEL1=`ls /usr/lib/xorg/modules/extensions |grep -c libglx.so.intel`
INTEL2=`ls /usr/lib | grep -c libGL.so.1.2`
if [ $INTEL1 == 1 ]; then
cp -u /usr/lib/xorg/modules/extensions/libglx.so.intel /etc/double_xorg/libglx.so.intel
fi
if [ $INTEL2 == 1 ]; then
cp -u /usr/lib/libGL.so.1.2 /etc/double_xorg/libGL.so.1.2
fi
VIDEO=`lspci|grep -c nVidia`
if [ $VIDEO == 1 ]; then
ln -sf `ls /usr/lib/xorg/modules/extensions/libglx.so.???.*` /usr/lib/xorg/modules/extensions/libglx.so
ln -sf `ls /usr/lib/libGL.so.???.*` /usr/lib/libGL.so.1
ln -sf /etc/double_xorg/xorg.nvidia /etc/X11/xorg.conf
echo -e "\033[1;36mUsing nVidia video\033[0m"
else
ln -sf /etc/double_xorg/libglx.so.intel /usr/lib/xorg/modules/extensions/libglx.so
ln -sf /etc/double_xorg/libGL.so.1.2 /usr/lib/libGL.so.1
ln -sf /etc/double_xorg/xorg.intel /etc/X11/xorg.conf
echo -e "\033[1;36mUsing Intel video\033[0m"
fi
rm -f libglx.so
rm -f libGL.so.1

xorg.conf.intel

# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg


Section "InputDevice"
Identifier      "Generic Keyboard"
Driver          "kbd"
Option          "CoreKeyboard"
Option          "XkbRules"      "xorg"
Option          "XkbModel"      "pc105"
Option          "XkbLayout"     "us,ru"
Option          "XkbOptions"    "grp:ctrl_shift_toggle,lv3,ralt_switch,grp_led:scroll"
EndSection

Section "InputDevice"
Identifier      "Configured Mouse"
Driver          "mouse"
Option          "CorePointer"
Option          "Device"        "/dev/input/mice"
Option          "Protocol"      "ImPS/2"
Option          "ZAxisMapping"  "4 5"
Option          "Emulate3Buttons"       "true"
EndSection

Section "InputDevice"
Identifier      "Synaptics Touchpad"
Driver          "synaptics"
Option          "SendCoreEvents"        "true"
Option          "Device"        "/dev/psaux"
Option          "Protocol"      "auto-dev"
Option          "HorizEdgeScroll"       "0"
Option          "MaxTapTime"    "0"
EndSection
Section "Device"
Identifier "intel_gma"
Driver "intel"
Option "MonitorLayout" "LVDS,VGA"
Option "DRI" "true"
Option "Clone" "true"
Option "AccelMethod" "XAA"
Option "MigrationHeuristic" "greedy"
VideoRam 229376
Option "CacheLines" "1980"
EndSection

Section "Monitor"
Identifier      "Generic Monitor"
# Power saving mode
Option          "DPMS"
# at start X will automatically probe EDID information of the monitor.
# This can be overridden, but not recommended.
Horizsync       28-96
Vertrefresh     43-60
EndSection

Section "Screen"
Identifier      "Default Screen"
Device          "intel_gma"
Monitor         "Generic Monitor"
Defaultdepth    24
SubSection "Display"
Modes           "1024x600"
EndSubSection
EndSection

Section "ServerLayout"
Identifier      "Default Layout"
screen          "Default Screen"
Inputdevice     "Generic Keyboard"
Inputdevice     "Configured Mouse"
Inputdevice     "Synaptics Touchpad"

EndSection

Section "Module"
# To understand these comments, understand that there are three methods of running acceleration:
#       XGL, AIGLX, NVidia
# The GLX module provides the hardware OpenGL extensions to the X server
# Through AIGLX, this loads the open source GLX
# Through NVidia, this loads NVidia's GLX modules (closed source)
Load            "glx"
Load            "dbe"
Load            "extmod"
# The freetype module completely replaces the "type1" module
Load            "freetype"
Load            "i2c"
Load            "bitmap"
Load            "ddc"
Load            "int10"
Load            "vbe"
# DRI = Direct Rendering Infrastructure
# DRI is an X server extensions that allows "3d" acceleration calls to bypass the X server.
#       This leads the term "Direct Rendering" as the calls are routed directly to the hardware
#       This also leads to dramatic speed improvements/increases
# DRI is AIGLX's response to XGL. However, DRI provides the benefit that the entire screen is compositing as well.
# Loading this module is harmless unless it is enabled in the "Device" section.
# NVidia will not use this module as it's direct rendering calls are processed internally
Load   "dri"
# Load the mesa software acceleration libraries
#Load  "GLcore"

EndSection

# Specific only to the DRI module.
Section "DRI"
# Allows all users to access DRI
Mode 0666
EndSection

# Transparency = compositing
# Fancy Effects = GLX
# Using compositing with NVidia or AIGLX should incur no performance penalties
# Therefore:
# Disabling composite will disallow compiz, transparency, etc...

xorg.nvidia

# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg


Section "InputDevice"
Identifier      "Generic Keyboard"
Driver          "kbd"
Option          "CoreKeyboard"
Option          "XkbRules"      "xorg"
Option          "XkbModel"      "pc105"
Option          "XkbLayout"     "us,ru"
Option          "XkbOptions"    "grp:ctrl_shift_toggle,lv3,ralt_switch,grp_led:scroll"
EndSection

Section "InputDevice"
Identifier      "Configured Mouse"
Driver          "mouse"
Option          "CorePointer"
Option          "Device"        "/dev/input/mice"
Option          "Protocol"      "ImPS/2"
Option          "ZAxisMapping"  "4 5"
Option          "Emulate3Buttons"       "true"
EndSection

Section "InputDevice"
Identifier      "Synaptics Touchpad"
Driver          "synaptics"
Option          "SendCoreEvents"        "true"
Option          "Device"        "/dev/psaux"
Option          "Protocol"      "auto-dev"
Option          "HorizEdgeScroll"       "0"
Option          "MaxTapTime"    "0"
EndSection

Section "Device"
Identifier      "nVidia Corporation GeForce 9300M GS"

# Enabling the nvidia drivers means that all acceleration processing is done internally
# NVidia provide's its own GLX module
# NVidia does not use the X server's DRI stack.
#       Instead, it uses a proprietary method to route call directly to the hardware and provide drect rendering
# Though the only possible driver is nvidia, it is also possible to override NVidia's methods:
#       by force-enabling AIGLX in "ServerLayout", loading dri, and enabling DRI in "Device"
#       by enabling XGL (which is a bad idea anyway)
Driver          "nvidia"
# lspci | grep -i nv            <- To find device
#Busid           "PCI:3:0:0"

# Adds support for 32-bit rendering on ARGB colorspace windows and pixmaps
# ARGB = alpha, red, green, blue
# AKA you should enable this on the new NVidia driver
Option          "AddARGBVisuals"        "True"
Option          "AddARGBGLXVisuals"     "True"
#Option          "NoLogo"                "True"

# Experimental : enable hardware acceleration of the X render extension
# Enabled by default in newer drivers however
#Option          "RenderAccel"           "True"

# Enable RGB overlay. (Not available with X composite)
# Also slow with virtual desktops larger than 2046x2047
# Requires depth of 24 or higher
# Requires an NVidia quadro
#Option          "Overlay"               "True"

# Improves performance by using OS to notify X to update direct-rendered visuals instead of running through the hardware.
# Enabled by default in newer drivers
#Option          "DamageEvents"          "True"

# Disable clipping OpenGL rendering to the root window
#Option          "DisableGLXRootClipping"        "True"

# An X server option to disable accel. writes into offscreen video memory
# Might be needed if using AIGLX instead of proprietary NVidia interface
# Probably ignored if using the NVidia method
#Option         "XaaNoOffscreenPixmaps"

# Might cause crashes in older NVidia drivers.
# Forces the driver to allow GLX when composite on the X server is enabled.
# Not necessary on modern X servers; might decrease stability
#Option         "AllowGLXWithComposite"         "True"

# An X server option to allow occluded window pixel data to be remembered
# Caution in enabling. It might be faster to redraw the information than to fetch it
# BackingStore is implemented in a very hackish but memory-efficient way. Therefore, it tends to be slow
#Option          "BackingStore"                  "True"

# Use below in conjuction with v-sync (see nvidia-settings)
# v-sync will however cap framerate to a max of 60 fps on most monitors

# Only use with plenty of vram
# Allows the X server to render into the third buffer without waiting for the other two buffers to be cleared
# (buffer swapping happens every fps, for example every 60 times per second)
# This can possibly avoid screen tearing and sudden low fps
# Touchy on 256-MB vram (if you play games with 4x AA), probably ok on 512
#Option          "TripleBuffer"                  "True"


Option          "UseDisplayDevice"              "DFP-0"
EndSection

Section "Monitor"
Identifier      "Generic Monitor"
# Power saving mode
Option          "DPMS"
# at start X will automatically probe EDID information of the monitor.
# This can be overridden, but not recommended.
Horizsync       28-96
Vertrefresh     43-60
EndSection

Section "Screen"
Identifier      "Default Screen"
Device          "nVidia Corporation GeForce 9300M GS"
Monitor         "Generic Monitor"
Defaultdepth    24
SubSection "Display"
Modes           "1024x600"
EndSubSection
EndSection

Section "ServerLayout"
Identifier      "Default Layout"
screen          "Default Screen"
Inputdevice     "Generic Keyboard"
Inputdevice     "Configured Mouse"
Inputdevice     "Synaptics Touchpad"

EndSection

Section "Module"
# To understand these comments, understand that there are three methods of running acceleration:
#       XGL, AIGLX, NVidia

# The GLX module provides the hardware OpenGL extensions to the X server
# Through AIGLX, this loads the open source GLX
# Through NVidia, this loads NVidia's GLX modules (closed source)
Load            "glx"
Load            "dbe"
Load            "extmod"
# The freetype module completely replaces the "type1" module
Load            "freetype"
Load            "i2c"
Load            "bitmap"
Load            "ddc"
Load            "int10"
Load            "vbe"
# DRI = Direct Rendering Infrastructure
# DRI is an X server extensions that allows "3d" acceleration calls to bypass the X server.
#       This leads the term "Direct Rendering" as the calls are routed directly to the hardware
#       This also leads to dramatic speed improvements/increases
# DRI is AIGLX's response to XGL. However, DRI provides the benefit that the entire screen is compositing as well.
# Loading this module is harmless unless it is enabled in the "Device" section.
# NVidia will not use this module as it's direct rendering calls are processed internally
Load            "dri"
# Load the mesa software acceleration libraries
#Load           "GLcore"

EndSection

# Specific only to the DRI module.
Section "DRI"
# Allows all users to access DRI
Mode 0666
EndSection

# Transparency = compositing
# Fancy Effects = GLX
# Using compositing with NVidia or AIGLX should incur no performance penalties
# Therefore:
# Disabling composite will disallow compiz, transparency, etc...
chmod +x vid_switch

Now open and edit /etc/rc.local and add 2 lines there just before exit 0

/etc/double_xorg/vid_switch
/etc/init.d/gdm start

This is it! You can call yourself an adept of voodoo!
N.B. I live in russia, so I added the keyboard switch via ctrl+shift in xorg.confs. Remove it if that's not what you want.

Webcam
The webcam on my notebook was working out of the box, but the image was upside down. The fix was found as a couple of patches to the source of uvc-linux here: http://ubuntuforums.org/showthread.php?t=838210
The only thing that is different - the patches didn't work for me and the svn sources from berlios are outdated. Therefore here is the updated procedure:

sudo -s
mkdir /temp
cd /temp
apt-get install mercurial
hg clone http://linuxtv.org/hg/~pinchartl/uvcvideo/
cd trunk/uvcvideo/linux/drivers/media/video/uvc

Now place the following patch as say video_fix.patch

--- uvc_video.c.orig    2008-12-28 17:02:02.000000000 +0300
+++ uvc_video.c 2008-12-28 17:21:24.000000000 +0300
-421,6 +421,10 @@
struct uvc_video_queue *queue = &video->queue;
unsigned int maxlen, nbytes;
void *mem;
+      /* Patch variables */
+    __u8 *mem_tmp, *ptr_tmp;
+    int i, k, pixel_size;
+

if (len <= 0)
return;
-431,6 +435,60 @@
nbytes = min((unsigned int)len, maxlen);
memcpy(mem, data, nbytes);
buf->buf.bytesused += nbytes;
+    /* Have the last copied bytes completed the current frame? */
+    if (nbytes == maxlen) {
+        /* Area where to save the original frame before manipulation. */
+        mem_tmp = (__u8 *) kmalloc(buf->buf.bytesused / 2, GFP_ATOMIC);
+        if (mem_tmp != NULL ) {
+            /* Copy the original frame in a temporary buffer. */
+            memcpy(mem_tmp, queue->mem + buf->buf.m.offset,
+                   buf->buf.bytesused / 2);
+            /* "pixel_size" depens on the pixel color depth (bpp),
+             * but in YUY2 image format is constant and equal to 2.
+             */
+             pixel_size = video->streaming->format->bpp / 8;
+            /* The following loop copy 2 pixels at a time (4 bytes
+             * in YUY2 format) from the last two stored in "mem"
+             * (and going back) to the first two (and going on)
+             * stored in "mem" itself following a sort of YUY2
+             * algorithm.
+             */
+            ptr_tmp = queue->mem + buf->buf.m.offset
+                  + buf->buf.bytesused / 2;
+            /* When the top-half of the frame has been reversed,
+             * rows are copied from the last one stored in "mem_tmp"
+             * (and going up) into the bottom half part of "mem"
+             * buffer.
+             */
+            for (i = 0, k = buf->buf.bytesused / 2 - 2 * pixel_size;
+                 i < buf->buf.bytesused;
+                 i += 2 * pixel_size, k -= 2 * pixel_size){
+                /* If the top-half of the frame has been
+                 * revesed, then it is needed to split the
+                 * source buffer from "mem" to "mem_tmp".
+                 */
+                if (i == buf->buf.bytesused / 2) {
+                    ptr_tmp = mem_tmp;
+                    k = buf->buf.bytesused / 2
+                        - 2 * pixel_size;
+                }
+                 /* The order of copied bytes is changed from
+                  * (Y0 U0 Y1 V1) to (Y1 U0 Y0 V1), i.e. from
+                  * (#0 #1 #2 #3) to (#2 #1 #0 #3).
+                  */
+                 ((__u8 *)(queue->mem+buf->buf.m.offset + i))[0] =
+                 ((__u8 *)(ptr_tmp + k))[2];
+                 ((__u8 *)(queue->mem+buf->buf.m.offset + i))[1] =
+                 ((__u8 *)(ptr_tmp + k))[1];
+                 ((__u8 *)(queue->mem+buf->buf.m.offset + i))[2] =
+                 ((__u8 *)(ptr_tmp + k))[0];
+                 ((__u8 *)(queue->mem+buf->buf.m.offset + i))[3] =
+                 ((__u8 *)(ptr_tmp + k))[3];
+            }
+            /* For this frame "mem_tmp" is not needed any more. */
+            kfree(mem_tmp);
+        }
+    }

/* Complete the current frame if the buffer size was exceeded. */
if (len > maxlen) {''

This is the patch from ubuntuforums manually applied and recreated (no idea why it didn't work in it's initial form)

now

patch -p0 < video_fix.patch


cd /temp/trunk/uvcvideo
make all
make install
modprobe -r uvcvideo
modprobe uvcvideo

That's it. The image from the webcam is now as it should be. While modprobing I got:
aifiltr0@sylwer:/temp/trunk/uvcvideo$ sudo modprobe uvcvideo
WARNING: Error inserting v4l2_compat_ioctl32 (/lib/modules/2.6.28-sylwer1/kernel/drivers/media/video/v4l2-compat-ioctl32.ko): Invalid module format
aifiltr0@sylwer:/temp/trunk/uvcvideo$

However, that didn't seem to affect anything. The webcam works as it should.

suspend/resume fix
The thing that cauht my attention was suspend and resume. Both suspend and hibernate work out of the box in 2.6.28 without any need of tuxonice (Although tuxonice has the compression feature and is swifter hence, I'm too lazy to try).
The problem is, that we need some thing to be done upon suspend and resume. Wifi seems to have troubles upon resume, until we unload and load
again ath_pci. As well as we need to reload asus_laptop. Here is the fix o automate that stuff. Create as root the following file
/etc/pm/sleep.d/20asus
(you may call it whatever you like, numbers indicate the execution order)

#!/bin/bash
case $1 in
hibernate)
modprobe -r ath_pci
modprobe -r asus_laptop
;;
suspend)
modprobe -r ath_pci
modprobe -r asus_laptop
;;
thaw)
modprobe ath_pci
modprobe asus_laptop
;;
resume)
modprobe ath_pci
modprobe asus_laptop
;;
*)  echo "??"
;;
esac

Now

chmod +x 20asus

and you are done. Double check that this file is owned by root:root, otherwise it won't work.

Summary

Most things work. Thanks to notebookreview forums where I have found initial stuff.
More useful things are avaliable in this thread: http://forum.notebookreview.com/showthread.php?t=315810


Discussion

majoritywhip, 2012/08/30 23:33

per the webcam patch, what does “as say” mean?

Enter your comment. Wiki syntax is allowed:
If you can't read the letters on the image, download this .wav file to get them read to you.
 
asus_n10j.txt · Last modified: 2010/10/13 15:21 (external edit)
Contact Us Sister Sites Privacy Policy Terms of Use
Copyright © 2006-2013 Linlap.com and other authors