Solving Wireless Troubles With A Macbook Pro & Ubuntu 8.04 (Hardy Heron)

When I was running Ubuntu 7.10 (Gutsy Gibon) the wireless card on my Macbook Pro was not recognised so I installed Madwifi to get it working.  When I upgraded to 8.04 (Hardy Heron) everything still worked fine (whether this was because Madwifi was still in use or because 8.04 has the right drivers for the wireless card I am unsure) but with the update which I installed on 11/07/2008 once I had restarted my computer my wireless card was no longer accessible.  Luckily I found this great tutorial from http://ubuntu-tutorials.com a while ago which I mentioned while talking about setting up 7.10 on a Macbook Pro and this solved the problem and got my wireless card working again.  The previous settings were saved which makes me think Madwifi has been fine all along until the 11/07/2008 Ubuntu update.  Looking in the Update Manager log file at /var/log/apt/term.log for there were a fair few updates and replacement but I don’t know what most of them are so I can’t specifically say what happened - anyone who might know and wants the look at the log file get in touch.

  1. sudo aptitude install build-essential
  2. wget -c http://snapshots.madwifi.org/madwifi-trunk-current.tar.gz
  3. tar -zxf madwifi-trunk-current.tar.gz
  4. cd ‘to the folder madwifi was unzipped to’
  5. make
  6. sudo make install
  7. sudo modprobe ath_pci
  8. sudo modprobe wlan_scan_sta

Run all that through terminal and you’re sorted.
Thanks to Christer Edwards of http://ubuntu-tutorials.com and Madwifi for this.

Noisy Line Out / Speaker Left Channel using Ubuntu 7.10 and a Macbook Pro

Since installing Ubuntu 7.10 Gutsy Gibon I have had noise coming from the left channel of my Macbook Pro both from the line out and from the internal speakers. Oddly enough, even when I am using the line out I get noise from the left speaker. It sounds very similar to the noise produced when using the line out of a G4 with mirrored double doors; you can hear this crackling electronic noise that I put down to the processor cycling and poor shielding - mouse over the dock or use system resources and you get an increase in the rate and intensity of the noise - clearly poor shielding within the G4 but everyone G4 owner will tell you it’s one of the loudest computers ever. But back to Ubuntu on the MAcbook Pro..

I have never had this problem with my Macbook Pro and OS X so all I can assume is the gain table in the ALSA driver is somehow wrong in Ubuntu 7.10 causing a much lower signal to noise ratio than in OS X. This would also result in a much lower maximum and overall volume output when using Ubuntu, and this is indeed the case.

With the release of Ubuntu 8.04 Hardy Heron and the inclusion of the PulseAudio sound server hopefully things will improve. Until then the following solution solves all the above problems for me except the left speaker noise while a line out is plugged in. You’re probably using your line out for louder sound like me so this will cover up the problem for the most part so it’s not really a problem any more.

From http://ubuntu-utah.ubuntuforums.org/showthread.php?t=611345. Thanks to Volanin for the solution and everyone who contributed to this thread.

1. Open a terminal and type:
sudo gedit /etc/modprobe.d/options

2. Add the following line to the end of the file:
options snd-hda-intel model=[MODEL_BELOW] position-fix=2 probe_mask=1

You must select the Intel HDA model that corresponds to your computer:
intel-mac-v1 : Intel Mac Type 1
intel-mac-v2 : Intel Mac Type 2
intel-mac-v3 : Intel Mac Type 3
intel-mac-v4 : Intel Mac Type 4
intel-mac-v5 : Intel Mac Type 5
macmini : Intel Mac Mini (equivalent with type 3)
macbook : Intel Mac Book (eq. type 5)
macbook-pro-v1 : Intel Mac Book Pro 1st generation (eq. type 3)
macbook-pro : Intel Mac Book Pro 2nd generation (eq. type 3)
imac-intel : Intel iMac (eq. type 2)
imac-intel-20 : Intel iMac (newer version) (eq. type 3)

For example, I have a Macbook 2rd generation, and the setting that worked was model=macbook-pro.

3. Save the file and type in the terminal:
sudo update-initramfs -u

4. Reboot your computer.

5. For BEST sound, if the above works, open a terminal and type:
alsamixer
And set the FRONT and SURROUND sliders to their maximum.
It might be necessary to unmute them with the ‘M’ key.
Press ESC twice to leave the program.