2011-10-03

Setting up Ubuntu 11.10 and 11.04 on an m11x R1

UPDATES FOR UBUNTU 12.04 AT THE BOTTOM

So you want to run ubuntu on your fancy (old) m11x but there are a couple of things that don't work out of the box. Here's what I had to do to get them working

Video Card Things
I don't really see any need for me to use the nvidia card in linux so I've opted to disable it. Unfortunately this led to some strange behaviour where my display would just freeze, but I found a way to prevent this.
Note: Whenever you see something indented please run it from the command line

Step 1: Blacklist nouveau
My guess is that by default Ubuntu loads Nvidia drivers by default so you have to tell it not to do that. Do that by editing the following file as root

sudo gedit /etc/modprobe.d/blacklist.conf

Add this line to the file somewhere

blacklist nouveau

now run

sudo update-initramfs -u -v

And now you should reboot

Step 2: Installing acpi_call
acpi_call is a program that lets you send a message to the nvidia card to turn off. You need to install git and make in order to compile it though

sudo apt-get install make git

Next clone the git repo that has the code

git clone https://github.com/mkottman/acpi_call.git

Now you need to build it

cd acpi_call
make


Now this will have built the kernel module file called acpi_call.ko. We need to put this file where the kernel modules live and

sudo cp acpi_call.ko /lib/modules/`uname -r`/kernel/drivers/acpi/
sudo depmod /lib/modules/`uname -r`/kernel/drivers/acpi/acpi_call.ko
sudo depmod -a
sudo modprobe acpi_call


Now add acpi_call /etc/modules

sudo gedit /etc/modules

and add

acpi_call

to that file somwhere.

Step 3: Testing!
Now you have to reboot. Once you've rebooted open up a terminal and cd into
acpi_call again. It's time to check if this worked or not

cd acpi_call
chmod +x test_off.sh
./test_off.sh


 If you see the text

.... Works!

It means we've installed this properly! You should now see a power draw of about 11W instead of 18W!

Step 4: Making the card turn off at boot and sleep resume
The problem is that you have to turn off the nvidia card every time you boot and every time you resume from sleep. To make it run during boot add the test_off script to your startup applications.

You also have to run the script on resume. Thankfully there is way to do that
run

sudo gedit /etc/pm/sleep.d/nvidia_off.sh

Paste the following into that file

echo "\_SB.PCI0.P0P2.PEGP._OFF" > /proc/acpi/call

Now make the script executable

sudo chmod +x /etc/pm/sleep.d/nvidia_off.sh

Step 5: Running at startup

Navigate to Startup Applications and add

echo "\_SB.PCI0.P0P2.PEGP._OFF" > /proc/acpi/call
 
Backlight
When I first booted up, my backlight didn't turn down at all which was kind of
annoying... to fix this you have to add acpi_backlight=vendor to your default grub file

sudo gedit /etc/default/grub

And change the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset acpi_backlight=vendor"

Now run:

sudo update-grub

And reboot! Your backlight should now be fixed

Sound
I booted into Ubuntu for the first time and thought my headphone jack wasn't working. It turns out that I have to plug into the SECOND headphone jack instead of
 the first... Ah well.

WiFi
 Initially WiFi worked fine, but then I tried to get it working at my school... turns out the default driver hates something about university networks. With a bit of googling I found this solution on Does Not Compute

sudo apt-get install bcmwl-kernel-source

Then

sudo gedit /etc/modprobe.d/blacklist-bcm43.con

And add the lines

blacklist brcmsmac
blacklist bcma

Reboot and voila!
Hope you have found this guide helpful!

edit: fixed some things

Ubuntu 12.04 Precise

After quite a delay I have install Ubuntu 12.04 on my laptop. So far these instructions are still correct EXCEPT:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset acpi_backlight=vendor"


Should be:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

2 comments:

Anonymous said...

The Backlight setting
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset acpi_backlight=vendor"
kills my dual-monitor configuration on xfce 11.10
The other settings are ok, thanks!

Unknown said...

Glad that I could help. Can you control the backlight without it? I think removing the nomodeset might help