Sunday, May 22, 2011

Asus 1215N, CUDA, and setup notes

First and foremost:  The Asus 1215N works PERFECTLY for CUDA in both Windows and Linux!  There have been several posts about the internet either complaining about CUDA not working, or wondering if it works.

I would like to report that, in fact, it does work perfectly.  I would further like to expand on how it works, what needs to be done to set things up, and document other gotchas in the setup process.  If this is helpful, please let me know!


People looking for a full review of this netbook can find it elsewhere on the internet.  I have no interest in providing a standard review.  I will only be reviewing and commenting on the portions that relate to my interests: CUDA (and, soon, OpenCL) development.

The stock OS that comes with the system is rubbish.  It's Windows 7 Home 32-bit, which is OK, except for all the garbage it comes with.  After literally 30 minutes of it setting itself up, it was so full of crap that I gave up and started over.  This system has no CD drive, so you get to learn the fine art of installing Windows and Linux from a USB stick.  A 4GB stick is sufficient.

Installing Windows 7 from a USB key is fairly straightforward:
http://www.intowindows.com/how-to-install-windows-7vista-from-usb-drive-detailed-100-working-guide/

This works quite nicely.  I would also add that the Atom processor in this laptop IS a 64-bit processor, so you can install a proper OS.  I put Windows 7 Professional 64-bit on.

A note on booting from USB: You must put the USB stick in the laptop, boot up, enter the BIOS, select the USB drive under the hard drive options, then save and reboot.   You cannot configure this laptop to always boot from USB (as far as I can tell).  Also, after the first stage of the setup, remove the USB key or it will boot from it again and restart setup.

Once Windows is installed, there are many drivers to install.  However, Windows Update does a good job of finding them.  After all the updates ran, I installed the latest nVidia driver package to ensure I had the most recent driver version and best Optimus support.

You may want the nVidia Optimus Test Tools to verify that things are working as designed.  Once the driver is installed and the CUDA development environment is set up, one can observe the nVidia core being powered on as a CUDA app runs, and then immediately turning off.  Pretty spiffy!

So, Windows support is perfect.  10/10 for CUDA support, 9/10 for setup.  Having a good OS with no crapware on the system from the factory would be better.

Linux, on the other hand, works nicely but is much more difficult to set up.  Prepare for some fun.

I used Ubuntu 10.04 LTS, as this is the supported OS for CUDA 3.2 right now.

The install is a standard install from USB, and is well documented.

Now comes the tricky parts.  You'll want to upgrade to at least a 2.6.36 kernel if you like your ethernet port - the stock 10.04 kernel does not support it.  I upgraded to 2.6.37 with the Ubuntu Kernel PPA - anything past 2.6.36 supports the ethernet port.

The next thing you may notice is that the "ctrl-alt-F1" type functions do not work.  They mostly manage to lock the system up with some pretty colors.  This is not good.  To fix this (and lose framebuffer, but... such is probably solvable if one tries), Disable Kernel Mode Setting.

Now, you can change to a text console, kill X, and install the current nVidia drivers.  Be careful, though - do NOT let the installer update your X11 configuration files!  The nVidia chip CANNOT drive the video output, so you MUST leave the Intel display chip driving the output.  If you do not let the nVidia driver update the X11 configuration files, things should continue to work.  If not... revert from backups.

At this point, you should be able to boot into X11 (on the Intel display chip), install the CUDA drivers, and get things working.  If you cannot get a test program to run, try running it as root.  This will create the /dev/nvidia0 and /dev/nvidiactl entries, which should allow things to work.  At least, it did for me.

The final issue to resolve is that of battery life.  Under Linux, the nVidia chip is always powered.  This is fine - unless you care about battery life.  Fortunately, someone has hacked together some the acpi_call kernel module that allows you to fix this.


git clone http://github.com/peberlein/acpi_call.git
cd acpi_call
make
sudo insmod acpi_call.ko
./asus1215n.sh


You can now toggle the GPU on and off with the asus1215n.sh script - just pass "on" or "off" to it to alter the state.

The GPU does revert to a powered on state if you sleep - be aware of this.  And, obviously, it will need to be on for CUDA apps to access it.

So, you should now have a fully functional 1215N with both Windows & Linux running, with a fully supported CUDA development environment in both!

Questions?  Comments?  Let me know.

8 comments:

  1. First of all, your article is so helpful.

    I tried following your steps for the linux install. I am using Fedora 13 and cuda 4.0.

    I did not allow the nvidia driver to update the x11. After compiling the SDK, I tried running device query and this is the result:


    ./bin/linux/release/deviceQuery Starting...

    CUDA Device Query (Runtime API) version (CUDART static linking)

    cudaGetDeviceCount returned 38
    -> no CUDA-capable device is detected
    [deviceQuery] test results...
    FAILED

    Any further assistance is much appreciated. Thank you.

    ReplyDelete
  2. Try running it as root. I've found that if the driver is not loaded, you have to run the first CUDA capable app as root to get the stuff loaded, then you can run without root privileges and things behave.

    ReplyDelete
  3. BitWeasil, thank you for your help.

    First I tried just running the deviceQuery as root and it did not work. Then I compiled the makefile as root and tried running deviceQuery. This is the result

    [root@comp release]# ./deviceQuery
    ./deviceQuery: error while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directory

    I logged out and tried running the program as a regular user and I got the previous "FAILED" message.

    ReplyDelete
  4. Huey - that error means you do not have your LD_LIBRARY_PATH updated to include the CUDA toolkit, you do not have the CUDA toolkit installed, or something else weird has happened. Be sure you have the CUDA toolkit and the loader configured to know where libcudart.so.4 is.

    ReplyDelete
  5. This article was really helpful, thank you.

    ReplyDelete
  6. Acknowledges for paper such a beneficial composition, I stumbled beside your blog besides decipher a limited announce. I want your technique of inscription... laptop finder

    ReplyDelete
  7. With the help of this netbook, I was not working, but I can say with confidence that I believe in his performance. Since I'm always in the choice of prefer gadget Asus products.
    Richard Brown due diligence data room

    ReplyDelete
  8. Thanks for the blog, If you find any problem with your laptop then you can call asus tech support who will provide you best assistance to solve all the problem regarding laptop.

    ReplyDelete