Thursday, August 1, 2013

Setting up HP Pavilion G6-2313AX on Ubuntu 12.04 with led and button working :-)

Hello,

             I recently purchased the HP Pavilion G6-2313AX from flipkart, the specs of the laptop got me into buying it and well the advertisements that flipkart issues on the right panes of it's pages.


I had successfully installed Ubuntu 12.04 with everything working, that's right even the bluetooth, led light and wifi on/off button. This tutorial is for all those people who are struggling to run linux in the laptop.

Files you'll need to download :

Wireless Driver

Bluetooth Driver

Please note that these drivers stop working after Kernel 3.2 and you'll start getting kernel panics, you can try any linux distribution but i recommend Ubuntu 12.04 LTS at the moment as it will be supported till 2017 which is feasible even if the driver doesn't get fixed.

First we'll need to get the build environment ready in order to compile anything :

(You can skip this step if you know you have the neccessary build tools)
 

Open up a terminal window and type the following in it:


sudo apt-get install linux-headers-$(uname -r) linux-headers-generic build-essential dkms  


Now that the tools required to compile are installed, we can proceed with compiling the drivers.

Open up a terminal and cd to the directory in which the files mentioned in the links above were downloaded and execute the following commands :  

tar -xvf 2012_0508_RT3290_Linux_STA_v2.6.0.0.tar.bz2
cd 2012_0508_RT3290_Linux_STA_v2.6.0.0
make
sudo make install
sudo modprobe rt3290sta

If the last command executes successfully then everything installed correctly and we're good to go ahead with installing the bluetooth driver.

Now in the same directory execute the following commands :

tar -xvf NB087_BT_ubuntu_release.tar.bz2
cd NB087_BT_ubuntu_release
cd rtbth_3.9.3
cd rtbth_3.9.3
make
cp rtbth.ko ~/bluetooth cd ..
cd ..
cp rtbt.bin /etc/Wireless/RT3290
cp rtbt.bin ~/bluetooth
cp 49rtbt /usr/lib/pm-utils/sleep.d/
cd ~/bluetooth gedit bluetooth.sh

Now copy the following and paste it into the gedit window to make the script for initiating the bluetooth driver

#!/bin/bash insmod rtbth.ko mknod /dev/rtbth c 192 0 ./path/to/the/file/rtbt.bin exit 0

Now we need to execute the script during boot, this can be done by editing the /etc/rc.local file as done below :

gksu gedit /etc/rc.local

Now copy and paste the below commands in the gedit window before exit 0.

cd /home/YourName/bluetooth/
sh bluetooth.sh

Restart your computer and if everything wen't perfectly the bluetooth and wifi on/off button should work.

Please do let me know if you are facing problems with the above mentioned steps or i have made a mistake in this post and +1 if you like my work.

Thank You!