Tue 16 Sep 2008
The days of hacking are not over! Installing Linux on newish hardware is always a challenge and a bit of fun. If you didn’t search carefully beforehand and got yourself a beast like this read below for instructions on how to make Linux work on it.
First, the hardware description:
Core2 Duo CPU P8600 @ 2.40GHz
4GB DDR2 800MHz
NVIDIA GeForce 9700M GT 512MB
15.4″ @ 1680×1050
Realtek 8168B Gigabit Ethernet
Intel WiFi Link 5100 802.11abgn Wireless card
Intel ICH9 sound card with Realtek ALC663 codec
6 cell battery for up to 2 hours of autonomy
320GB WD hard disk
Initial euphoria passing, let’s try to upgrade Vista to Ubuntu 8.04, 64bit version of course. In the default configuration you will have a nasty surprise of all kinds of errors sooner or later during the installation process. This is all because of the Enhanced SATA setting in the BIOS. Before wasting good CDs trying to burn again the installation kit, try rebooting the laptop and pressing F2 during the flames to open BIOS settings, then from Advanced tab switch to Compatible mode instead of Enhanced.
I’ve seen reports of a kernel parameter that you can specify at CD boot time and fixes this problem on the fly, without having to switch modes from BIOS:
“You can use enhanced mode with dmraid=true and use software raid with the intel ICH controller with no problems. This is my setup.”
Careful how you partition the disk! I made the mistake of removing all the partitions and starting clean, but this way you will loose all those fancy ASUS quick boot options and the Vista installation. There probably is a way to use only one of the partitions for Linux and also keep what’s good and nice from the original. From what I discovered later in BIOS the only way to upgrade the BIOS (non-Windows way) is probably through that special partition on the first hard disk, one more reason not to hurry with the partitioning.
If all goes well, as it should, you will end up having a perfectly good operating system with poor graphics and no network connectivity. There were three major problems at this point:
- wired network card was recognized but didn’t sense the link state while continuously incrementing the number of dropped packets at a rate of 1M per second or so,
- wireless was not recognized at all,
- no sound.
If this is also true for you then look around for a wireless router with USB connection, I was very lucky to have a Livebox that had this option. The system will automatically configure the modules, all you have to do is type dhclient eth1 to get an IP address by DHCP from the router.
Next, you really need to upgrade your kernel. 2.6.24 just doesn’t have the drivers for your hardware, so you have to download the latest (that is 2.6.27-rc6 today), with:
# cd /usr/src/
# wget eu.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.27-rc6.tar.bz2
# tar -xjf linux-2.6.27-rc6.tar.bz2
# cd linux-2.6.27-rc6
and then follow the instructions in the official guide of building custom kernels on Ubuntu:
# cp /boot/config-`uname -r` .config
# make oldconfig
# make menuconfig
(make sure you check the IWL5000 Wireless network card option)
# make-kpkg clean
# CONCURRENCY_LEVEL=2 fakeroot make-kpkg –-initrd –-append-to-version=-custom kernel_image kernel_headers
# cd ..
# dpkg -i linux-image-2.6.27-rc6-custom_2.6.27-rc6-custom-10.00.Custom_amd64.deb
# dpkg -i linux-headers-2.6.27-rc6-custom_2.6.27-rc6-custom-10.00.Custom_amd64.deb
(install nvidia-glx-new even if you won’t use the provided module)
apt-get install nvidia-glx-new nvidia-settings
Now it will start to work. You will be able to use the wired connection and you will get the annoying KDE sounds when it loads. To make the wireless also work you need the firmware for it, so download iwlwifi-5000-ucode-5.4.A.11.tar.gz, unpack it and copy iwlwifi-5000-1.ucode to /lib/firmware and /lib/firmware/2.6.27-rc6-custom (though only the first might be enough). Another reboot probably is required now and you will see the wireless card but you will not be able to connect to any network. In fact you cannot even see any network right? You have also probably noticed that the blue leds in front (Bluetooth and WiFi) and both lit during startup but then the WiFi goes dark and no matter what you do it doesn’t get back on. This is because at the end of boot process some ACPI-related service is started and somewhere it sends a wrong command to the card. Long story short, these files have to be deleted (or moved somewhere else):
Reboot and enjoy your hyper high speed wireless.
One final touch regarding the network component: you need to upgrade Network Manager. The default one that comes with 8.04 has memory leaks. If you leave the laptop running for a day or more, you will see some 1-2GB of memory wasted by the manager, and it keeps growing. While you can kill and start it again, it’s easier to:
$ sudo dpkg -i network-manager-dev_0.6.6-0ubuntu7_amd64.deb
(yes, it’s the version for Intrepid, but works fine in 8.04 and has no memory leaks)
Once you are online you can start playing with small details like having the right resolution on the screen … With this kernel you need also the bleeding edge NVidia driver 177.67+, that you only find in the Beta section of their site. Get the binary kit, chmod +x it, go to a text console (Ctrl-Alt-F1), killall kdm and run it to install the driver. But you will still not be able to modprobe nvidia because of the Unbutu modprobe directives that only work with the official nvidia-glx-new packages. So go to /etc/modprobe.d/lrm-video and comment out the last three lines (those that have nvidia somewhere). modprobe nvidia should work now.
Run as root nvidia-xconfig and go quickly to /etc/X11/ to fix the touchpad entry of X, since the NVidia configuration utility will replace the definition with a standard mouse one. Look in xorg.conf.backup for Synaptics Touchpad and take all the lines below Identifier (Driver + the rest of Option lines). Go to xorg.conf, same section, delete everything except the Identifier line and paste the previous definition.
If you ever run intro trouble remember that you can press Esc to get the GRUB menu where you can either choose the old kernel or the new one in recovery mode so that you can edit xorg.conf or revert to the backup file created by the NVidia installer in the same folder.
This is about it with the hardware. Just be careful not to disable the boot sound completely from BIOS (though you can turn the volume down to 0) because without this initialization of the sound card you will not hear anything later. The sound volume in Linux is still quite low but I hope it’s just a temporary problem until they put everything right in the driver. Until then you can use the pre-amp feature in VLC or “-af volume=10.0:0″ in MPlayer.
One nice thing: the embedded camera will just work, you can use it right away in Kopete for example (after installing the Jasper runtime with apt-get install libjasper-runtime). The same with the bluetooth and the SD/MMC/MS card reader.
While using the laptop you will probably notice an annoying frequent noise coming from the CD-ROM. It is the HAL daemon looking for changes (CD inserted) to present the user with a nice dialog. At the price of having to manually mount the CDs (how often do you use CDs these days anyway?) one can always disable cdrom polling with:
hal-disable-polling –-device /dev/scd0 .
If you still hear some annoying ticks every few seconds, they come from the hard disk. The heads are parked too often, apparently in an attempt to save power in general on the laptop. You can either reduce the frequency of this or disable the feature completely (which I did) with:
hdparm -B 255 /dev/sda
To have this setting permanent you can either make a simple startup script or take advantage of the existing /etc/hdparm.conf and uncomment the existing apm = 255 option, also adding at the end something like:
read_ahead_sect = 16
Here you have more explanations about this topic:
Other frustrations related to this hardware that helped a lot in this quest:
I must say that Ubuntu is really really well done, and coming from a former Slackware fan this means a lot And the kernel developers also did a very good job in keeping up with all the new hardware out there. Kudos!
ASUS OLED display (0b05:175b)
Thanks to Jakub Schmidtke, the asusoled driver now has G50/G70/G71 support. You just need to grab the latest SVN version from svn://svn.berlios.de/lapsus/asus_oled/trunk.
You can use asusg50oled.sf.net to monitor a few machine parameters based on this driver (the above picture). Included in this archive are also ACPI event handlers for a couple of the blue buttons and the lid and some scripts to call from Thunderbird or Kopete to display the messages on screen. The same application works also for the older ASUS G1 and G2 OLEDs (0b05:1726).
2 Responses to “Ubuntu on Asus G50V”
Leave a Reply
You must be logged in to post a comment.