How To: Install Ubuntu Linux on HP Compaq C700 (Part 2)
Last time I posted what will work out of the box when you install the Ubuntu Hardy Linux distro on a HP Compaq C793TU notebook. Today, I’m spending some time writing about how to make some of the other things work like for example the Atheros wifi chip on a Compaq C793TU and dual head monitors that automatically configures itself whether there is an external monitor or none connected.
On this post, I’m also writing some special setup that I have that others might be interested like using a stereo bluetooth headset and a bluetooth mouse on the Compaq Presario C793TU.
How to enable support for the Atheros wifi chip on a Compaq Presario C793TU
When I installed Ubuntu Hardy on the HP Compaq notebook, wifi didn’t work out of the box. At first I tried to install ndiswrapper and use a Windows XP driver for the Atheros wifi chip but that didn’t work and my notebook just hung.
After some tinkering on my Ubuntu setup and checking the log file by doing a tail -f /var/log/messages showed that the wifi modules weren’t loading successfully. An “lspci |grep Atheros” showed that my Atheros chip was a “AR242x 802.11abg Wireless PCI Express Adapter (rev 01)”
A little more googling brought me to the Madwifi web site who makes Linux drivers for the Atheros chip set and the drivers are the one being used on Ubuntu Hardy.
Some more googling brought me to an enhancement ticket on madwifi and the Ubuntu forums. I decided to give the kernel update a spin. To update the kernel you will need to retrieve some packages from the Ubuntu repository. Start up a terminal on your Ubuntu notebook and run the following command (to have internet, I initially used a wired connection to my router):
sudo apt-get update
sudo apt-get install build-essential
After getting the build-essential package, you are now ready to update your kernel. Get the madwifi driver snapshot and update your Atheros driver by doing:
tar xvzf madwifi-hal-0.10.5.6-r3835-20080801.tar.gz
sudo make install
Restart your Ubuntu notebook to load the new Atheros drivers. You can manually unload the old driver modules and load the new ones but it’s much easier to just reboot Ubuntu 😉
After rebooting my notebook, wifi should now work. I checked it from the gnome networking icon and my HP Compaq notebook was able to find my router after enabling wireless networking. Now I got rid of the RJ45 cable and started using wifi for network connections at last.
Dual-head monitor setup
Setting up dual monitors on Ubuntu Hardy was actually quite easy. When I first tried to connect my external LCD display on the Presario notebook, Ubuntu was able to detect the external LCD (I am using a Samsung LCD) but I get a cloned display instead of having a side by side xinerama setup. When I checked the display settings (System/Preferences/Screen Resolution), the problem was that both screens although detected was overlapping each other. So I rearranged the screens so that they are side by side and saved the setup. When I restarted Ubuntu, the same thing happens — they are again overlapped.
After some googling, I made the following modifications on my /etc/X11/xorg.conf file:
Identifier “Default Screen”
Monitor “Configured Monitor”
Device “Configured Video Device”
Virtual 2560 1024
I added the three bold lines above. The problem was that when X11 starts up, the virtual screen layout was limited to the maximum size of the largest screen. In order to be able to display a “big virtual” screen, I got combined horizontal widths of my two monitors (external and notebook) and used it as the Virtual width (first number in the Virtual option). I took the higher value of the two heights and used it as the Virtual height (2nd number in the Virtual option).
I restarted X11 / Gnome (control-alt-backspace) and went to the System / Preferences / Screen Resolution setup dialog box. After moving the screen layouts to reflect my desired setup, I got xinerama dual-head monitor working. Using it right now!
Bluetooth on the Presario C700 / Ubuntu notebook
One of the things that I didn’t like about the Presario C793TU is that it didn’t have built-in bluetooth but that wasn’t going to stop me so after looking around some computer shops, I found this pretty tiny bluetooth usb dongle that fits perfectly into one of the usb ports on the HP Presario C700. It has support for A2DP stereo connections and works right out of the box with the Ubuntu Hardy – Compaq Presario C700 setup that I have.
The mere plugging it of the tiniy bluetooth dongle is all that is needed to make it work. After that, I just powered up my Logitech V740 bluetooth mouse. Went to “System / Preferences / Bluetooth” – Services Tab and clicked on Input Service. The I clicked on “Add”, Ubuntu found the Logitech mouse and clicked “Close”.
That’s it. I had the bluetooth mouse working. In fact it’s a lot, lot better than when I was using it under Windows. In Windows, I sometimes had a problem to get it working when I first open up my other notebook. I had to keep on pairing with the mouse using Logitech’s software. Under Ubuntu, it works like a charm, never misses it nor had to pair it again just to connect it. The Linux bluetooth guys surely did a great job of creating bluetooth drivers for Linux.
Well, the it doesn’t stop there, it also works like a charm with my Motorola HT820 stereo bluetooth headset. To make A2DP bluetooth work, I had to do some extra steps following the instructions at Bluez wiki How To page. First create a .asoundrc file that contains:
where xx:xx:xx:xx:xx:xx is the bluetooth address of my Motorola HT820 headset.
Next, configure alsa sound system to use bluetooth as the output device (this will make it work on the music player rhythmbox):
to route the sound to bluetooth:
gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink “alsasink device=bluetooth”
to route the sound to normal speakers:
gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink “autoaudiosink”
So that I would not be typing those commands on a terminal screen, I tried to look for an alternative and found this link for the following script:
state=`gconftool –get /system/gstreamer/0.10/default/musicaudiosink | cut -d -f1`
if [ $state == “autoaudiosink” ]; then
gconftool –type string –set /system/gstreamer/0.10/default/musicaudiosink “alsasink device=bluetooth”
zenity –info –title=”GStreamer” –text=”Switched to Bluetooth headphones.”
gconftool –type string –set /system/gstreamer/0.10/default/musicaudiosink “autoaudiosink”
zenity –info –title=”GStreamer” –text=”Switched to speaker output.”
echo musicaudiosink set to `gconftool –get /system/gstreamer/0.10/default/musicaudiosink`
I copied the script to my home / bin directory and installed it as a “Gnome Panel launcher app”. I even created a icon for it. Here it the icon that I used –
. Once I got it setup, all I had to do is click on the icon to toggle between stereo output using the notebook speakers or my bluetooth headphones.
That’s it for now, next time I’ll write something about how I made my Nokia mobile phone connect to Nokia PC Suite on a Windows XP running inside a VirtualBox.
Update: Checkout How to use Nokia PC Suite in Ubuntu Linux
Gerry Ilagan is into mobile apps and WordPress development at @speeqs. He loves to write about electronics, the Internet of Things, mobile phones, and #crazyideas.