Installing Arch on an Asus U36JC Notebook

Last weekend, I bought an Asus Pro36s notebook, also known as a U36JC. It features a quad core 64 bit Intel Core i5-2410M CPU at 2.3 Ghz, 4 GB DDR3 RAM, a 500 GB hard drive and an Nvidia GeForce GT 520M video adaptor. It weighs less than 1.5 kilos (that’s including batteries) and is somewhat smaller than the Vaio, which is just what I wanted.

The notebook came with Microsoft Windows 7 installed, but obviously I want to use it with my favourite Linux distro, Arch. Still, since I had paid good money for the Windows installation and you never know when it comes in handy, I decided to make it a dual boot machine.

Installing Linux on a notebook nowadays is not as hard as it used to be. After putting Arch on an Asus U36JC, most of it works out of the box, that means, without it needing any work at all beyond installing Arch and KDE. This includes:

  • FN-keys F1 through F12
  • Media keys (FN with cursor keys)
  • USB 2 and USB 3 ports
  • VGA out (see below)
  • HDMI out (see below)
  • SD card slot (accepts SD-HC cards too)
  • Wired and wireless network (using networkmanager)

Some of these still need some configuring, but the way to do that is a matter of taste. For instance: I configured the multi media keys in qmmp, my favourite music player, but you might use something else. So what follows is a description of those parts of the installation and configuration that needed some thinking before they worked. I explain what choices were made and how I came to them, and link to pages on the Arch wiki with step-by-step guides on how to implement them.

Task 1: Installation from USB

The notebook doesn’t have an optical drive, so I had to install Arch from a USB drive. Normally this shouldn’t be that hard. Still, after I had created a bootable USB disk with the Arch ISO image, it eluded me for a while how to actually boot the machine from it. The BIOS settings menu, entered by holding F2 during boot, has a option called Boot Option Priorities. However, before I actually inserted the USB drive, it only listed the hard drive as an option. And even then the machine kept booting Windows, ignoring the priority settings I had made.

I read in the “eManual” PDF that holding ESC while booting would allow me to select the boot device to boot from. That worked.

Task 2: Installing a base Arch system

Early in the Arch installation process, the hard drive must be partioned and mounted. Originally the hard drive had three partitions: 1 MB with unused space, 28 MB for Windows recovery purposes, 200 GB for Windows and the rest was formatted as VFAT and labeled DATA.

Since that last partition wasn’t actually used by Windows, I decided to use its space for Arch. I remove the DATA partition and created a primary boot partition of 100 MB and three logical partitions, 25 GB for root, 4 MB for swap and the rest, 244 GB, for home.

Installing grub on /dev/sda presented no problems. The Windows menu entry in /boot/grub/menu.lst looks like this:

# (2) Windows
title Windows
rootnoverify (hd0,1)
chainloader +1

hd0,1 is the second partition on drive 0, or sda2, which is the partition Windows is installed on. The makeactive directive that is in the file’s example has to be removed or commented out for Windows 7.

Task 3: Graphics environment

After booting into Arch I found that the wired network had been correctly configured. I created a user account for myself and set up ssh and yaourt. I use yaourt because I find it very convenient to access binary and source packages using just one command.

The notebook has an Nvidia graphics adapter, but it is configured in a hybrid configuration with a much less power hungry Intel graphics chip. Nvidia appears to have no plans supporting this on Linux, so simply installing the Nvidia driver didn’t work. Instead, I needed the Intel drivers and Bumblebee.

After installing that I installed KDE, Gimp, LibreOffice, Xine, Qmmp and a few more of my favourite applications.

Task 4: Suspend

Suspend-to-RAM, letting the notebook fall asleep quickly and making it wake up quickly again, is very useful for conserving battery power. Unfortunately, it didn’t really work out of the box. Instead of suspending, the notebook froze, showing a non blinking cursor at the top left. I tried various approaches but the solution escaped me for days.

I found an Ubuntu site that offered a solution that made sense, but didn’t appear to work. In the end, I found a line in my dmesg output warning me about the mei kernel module. It appeared that if I unloaded it and implemented the Ubuntu solution, suspend-to-RAM worked. Summarising:

  1. Ditch the mei module by blacklisting it. According to my dmesg output, it is not safe to use. This thread seems to confirm that.
  2. Put a file called 20_custom-ehci_hcd inside /etc/pm/sleep.d/. To do that, follow the instructions here.

After I had sorted that out, I needed only two more things for suspend-to-disk:

  1. Add resume=/dev/sdaX to the kernel line of the first option in /boot/grub/menu.lst, where X stands for the partition number of your swap drive, 6 in my case. Instructions are here.
  2. Add the resume hook to the HOOKS variable in /etc/mkinitcpio.conf. Instructions are here.

Task 5: Ondemand governor

The next thing to look into was CPU speed governing. Despite the fact that KDE is supposed to have the CPU always on ‘ondemand’, I noticed that the CPU was constantly on full speed, so I installed cpufrequtils. It appeared that after booting into KDE the CPU was indeed always in performance mode. To remedy this, I configured cpufreq as a daemon to always default to ondemand, by following these instructions.

Task 6: Fixing the camera orientation

The notebook has a camera sitting at the top of the screen panel, centred just above the screen. It works out of the box, but it appears Asus has installed the camera upside down. Why they would do that is beyond me. v4l-utils Is supposed to be able to handle this problem, but at least with this notebook it doesn’t appear to work. I have sent an email to Gegror Jasny, who is maintaining v4l, a library that can fix this. He emailed me back with a versions 8.6 and 9.0 (testing) of the project, which included data I had sent him. It worked perfectly, so as soon as he makes a release and the Arch package is updated, this will be fixed.

It all depends on what you’re using the camera for. If you’re using Kopete, you can go to Settings -> Video -> Options and select vertical as well as horizontal mirroring to turn the image 180 degrees.

Or using mplayer:

# mplayer tv:// -tv driver=v4l2 -flip

Obviously, all this costs CPU power. Using mplayer in full screen mode you can even see yourself blink. And to think that this is only needed because the Asus people installed the camera the wrong way. :rolleyes:

Task 7: Synaptics touchpad

I don’t have very special requirements for a touchpad, but I’d like to be able to drag stuff by double tapping and then dragging with only one finger and vertical scrolling by dragging a finger along the right edge. This didn’t work out of the box. Still, doing that is so easy that I only added it here for completion. First, I installed the driver:

# yaourt -S xf86-input-synaptics

Then I added a single line to /etc/X11/xorg.conf.d/10-synaptics.conf:

Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "TapButton3" "2"
Option "VertEdgeScroll" "on"

Task 8: Hard drive spin down

One of the more annoying habits of the notebook is that the default hard drive power saving setting is too aggressive. The hard drive keeps spinning down all the time, so that lots of times the notebook appears frozen for a second or two when the hard drive is needed. Also, some low level processes use the hard drive periodically, resulting in audible clicking sounds every few seconds.

To avoid this, I installed laptop mode tools and added it to my /etc/rc.conf:

# yaourt -S laptop-mode-tools
# sudo vim /etc/rc.conf
DAEMONS=(hwclock syslog-ng dbus !hal laptop-mode avahi-daemon networkmanager sshd sensors @crond @bumblebee @cups @alsa @cpufreq @mysqld)

Then I changed the default spin down value in /etc/laptop-mode/laptop-mode.conf to 128. This is a good value between never spinning down at all and spinning down too often.

# sudo vim /etc/laptop-mode/laptop-mode.conf
# Power management for HD (hdparm -B values)

One thing that accesses my hard drive a lot is ext4’s journalling program. To prevent it from doing that, I added commit=600 to my /etc/fstab entries for /home and /:

UUID=...       /       ext4    defaults,noatime,commit=600     0       1
UUID=...       /home   ext4    defaults,noatime,commit=600     0       1

The noatime attribute specifies that the last access time of every file is not recorded. This significantly speeds up hard drive performance.

A note on the HDMI and VGA ports

When the computer is booted while connected to a second monitor or TV, via either the VGA or HDMI ports, the screen’s contents will be duplicated on that screen. The second screen’s resolution appears to be leading. KDE’s control centre however will allow the user to configure this behaviour. Go to Hardware->Screen and monitor->Multiple Monitors. I am not sure if and how this works in other environments.

After updating to KDE 4.7.3 last weekend, I noticed that even when I connected the HDMI port to my TV after the notebook had already booted, a pop up came up that told me that a second monitor had been detected. It then took me to the KDE control centre section mentioned above. I didn’t find any reference to this in the KDE 4.7.3 release notes, so this could also work with previous releases.

VGA is not supposed to be hot-pluggable, so I’m not going to look into that.

Concluding remarks

It took a few days of searching and trying out various solutions to get suspend-to-RAM to work, the hybrid graphics setup is not ideal, and the camera is upside-down. But most of the notebook works out of the box. FN-keys, networking, and also the camera.

Whatever notebook you’re going to put Linux on, there will probably always be a few drawbacks. Notebooks get smaller, faster, cool better and need less power every year, so I imagine that manufacturers will need more and more hacks to make all that work. When you’re using the proprietary OS that came pre-installed, you’ll probably never notice these things but if you want all the advantages of Linux, you will have to deal with them.

The Asus U36JC is in my opinion a pretty decent notebook to use with Linux, or at least with Arch. It is fast, light, subtle in appearance and with a few minor tweaks can be turned into a very powerful mobile Linux platform.

  1. Oct 20, 2011: Initial publication.
  2. Oct 21, 2011: Added Task 7.
  3. Oct 29, 2011: Added Task 8.
  4. Nov 17, 2011: Added a note on the HDMI and VGA ports.
  5. Feb 3, 2012: Updated the entry about v4l entry in task 6.

Categorised as: cool stuff, gadgets, howto, linux


  1. Eike says:

    Thanks for your Blogpost about this Laptop and Linux.
    Question – did you manage to get the HDMI output do work?
    I booted it up with the latest Fedora and the external screen shows the Fedora logo but cant be detected by xrandr.
    Thank you for your time.

  2. thefoggiest says:

    When I connect the cable just before booting the machine, I get text as well as graphic output, mirroring on the TV what I see on the monitor. The TV seems to be leading: the monitor’s resolution is set to that of the TV.

    I have tried to control it using KDE’s control centre, but without any luck so far. I suspect the hybrid graphics is playing into this as well. Let me know if you get anything!

  3. Eike says:

    Hi Thefoggiest,
    I got some hints from a u36jc owner in the german ubuntuusers forums. He used a vga terminator on the vga port and than could create a second desktop with the intel gpu that he had control over. He exported this desktop via x11vnc and xinit onto the hdmi port. I wish it was a howto or I could work it out from there but I am afraid that is a bit beyond my technical knowledge – however I thought it is good to share this with you – maybe it is helpful.
    I keep you updated if I find out more.

  4. thefoggiest says:

    Hi Eike,

    Yesterday HDMI seemed to work perfectly, and all I did was do a yaourt -Syua. I added a paragraph on it at the end of the post. Hope this helps.

  5. chrisanthropic says:

    I just used your notes to get suspend to ram working on my Asus U43F with a fresh install of Arch and KDE4.8.

    After hours of irritation your steps worked great. Thanks!