Linux, Ubuntu 7.10 (Gutsy Gibbon) & A Macbook Pro

Ubuntu 7.10 on a 15″ Powerbook G4 was not so easy to get working, but it was possible. Based on this and that Jay has had 7.10 running on his 1st Generation (Core Duo, not Core Duo 2) Macbook for a few weeks with no problems other than a few key modifications and the brightness keys not working (the volume keys do) I reasoned that as my Macbook Pro also uses the same Intel processor architecture (i386) running 7.10 should present no problems. I was mistaken, but the problems I have had so far can be solved. Here are the solutions I used to solve my problems; hopefully they will also help others.

Installing

I originally used the regular 7.10 install disc (here) which worked OK, but I wanted to look at all the options on install so I used the 7.10 Alternate disc (here).

From previously installing different version of Ubuntu on other machines I know that if you install with your ethernet cable connected (so your computer can access the internet) a number of updates are downloaded on install. Not downloading these on install seems to create more problems that it is worth so I would recommend installing with an internet connection.

When you boot the disc (hold C at startup) you a presented with a series of option screens. Most things are self explanatory. I would recommend choosing your keyboard from the list and not pressing keys to define it - I had to go and change this in System > Preferences > Keyboard to Macintosh as it set me up with a universal keyboard layout which was a bit odd. I was also able to select my screen size of 1440 x 900. Installation ran smoothly and on restart I entered my username and password and I’m straight to the desktop.

Updates

On reaching the desktop I was presented with a prompt to install updates. This obviously only happens if you have an internet connection, so keeping your ethernet cable plugged in is also advantageous here.

Ubuntu 7.10 Macbook Pro 15

I was also prompted to install restricted drivers from ATI for my display which I did. After each install, I was prompted to restart but first I navigated to System > Administration > Software Sources to tick the appropriate boxes thus ensuring all software was available to me (On default all the correct things seem to be ticked which is why I was prompted to download restricted drivers - good stuff). I then opened System > Administration > Update Manager and clicked ‘Check’ to scan for any new software not picked up at first. I got told my system is up to date, so I restarted.

On restart I now have a much crisper display, so the ATI drivers seem to have worked well.
No Wireless Networking

UPDATE 30/04/08

This works fine with 8.04 Hardy Heron.

A glaring problem was that I had no wireless connection. I could not select other than wired network, so I had a search and came up with this great tutorial from http://ubuntu-tutorials.com

  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.
No Sound

This was a bit more of a problem and took a frustrating day of trying various reported solutions and having assorted documented problems along the way, but I now have sound working correctly:

  • Sound out of speakers
  • Sound out of line out
  • Sound using headphones
  • Pluging in line out turns off speakers
  • Volume controlled from keyboard and/or internal mixer slider

N.B. I haven’t tested the microphone or line in yet and to be honest I don’t really need them so I probably won’t worry about them. I should test them though and post it up here…

Sound in, either microphone or line in does not work.

To get all this working I first followed the tutorial in the official Ubuntu wiki here and that failed. I was able to download the drivers and kernal for ALSA, but on running ./hgcompile I got a load of files and folders not found and permission denied errors. I tried various different approaches but there seems to be some problem with either the download source, the tutorial or both so I abandoned this approach.

I then found this post in the Ubuntu user forums which was a great help (as the Ubuntu user forums increasing are to me). In this post, there are a number of ways to sort out your sound. I tried them all and had no success until I compiled the ALSA drivers from source. To do this, you need to know what sound card you have so you can install the correct drivers. Things are made a bit more difficult because the 15″ Macbook Pros apparently uses different soundcards and drivers to pretty much every other mac.

To get the information needed, in terminal type:

lspci -v

This will bring up a big list of devices. Near the top should be your soundcard. I have the following:

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
Subsystem: Sigmatel Unknown device 7680
Flags: bus master, fast devsel, latency 0, IRQ 21
Memory at 50400000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>

Go to http://www.alsa-project.org and navigate to ‘Soundcards’. Here you can choose the vendor based on what lspci -v returned. In my case I chose Intel which led me to this page where you can choose your specific driver. As my card is part of the ICH7 family and a High-Definition Audio controller (HDA) as shown by lspci -v, I chose ‘ICH southbridge HD-audio and modem’ and clicked ‘Details’ to view the driver documentation. At the top of this page is the driver name that you need. In my case it is snd-hda-intel.

Now you know the specific driver you need for your soundcard the following method should work (It did for me):

  1. sudo apt-get install build-essential linux-headers-$(uname -r) module-assistant alsa-source
  2. sudo dpkg-reconfigure alsa-source
  3. At the blue dialog box answer yes (for ISA-PNP - recommended by package maintainers), then yes again (for debugging - recommended by package maintainers).
  4. Select which driver you want to install. In my case, I deselected ‘all’ then selected ‘hda-intel’.
  5. sudo module-assistant a-i alsa-source

You a presented with a progress bar while the nessarcary files are transfered.

6. Once this is complete, enter the following to reload the driver:

sudo modprobe snd-hda-intel

7. To ensure the driver is loaded when you turn on your computer add snd-hda-intel (or what ever your driver name is) to the bottom of this file:

/etc/modules

After all this, restart and sound should be all working fine. If not, double click the speaker icon at the top right of the screen, select Edit > Preferences and ensure that PCM is selected and the volume is up.

ALSA Volume Control Preferences Ubuntu 7.10 Macbook Pro 15

To get your volume slider working with this ensure that PCM is selected in Volume Control Preferences which can be reached by right clicking on the speaker icon at the top right of the screen and selecting Preferences.

ALSA Volume Control Preferences Ubuntu 7.10 Macbook Pro 15

To get the volume keys working, ensure Main Menu -> System > Preferences > Sound Preferences has PCM selected.

Ubuntu 7.10 Macbook Pro 15

This all worked fine for me with no distortion and I can happily listen to all my music now. Buzzin.

Keyboard Layout / Right Click

I want the ctrl key when combined with a single mouse click to be right click. I am frustrated that I either have to use an external mouse or set Preferences > Mouse > Touchpad to ‘tap to click’ so I can use three finger right clicks. In doing this, single finger taps are left clicks and this is annoying when trying to select things - windows change, text gets selected. Blah. It is also annoying that backspace is backspace but ctrl or alt or apple keys and backspace are not delete. Grrrr. Need a way to combine multiple button/mouse presses into a single command. I need to learn more about keymodmaps.

As a temporary solution which is working fine for me so I might not change I followed this Ubuntu help document for installing Ubuntu on a Macbook Pro and remapped my key as follows:

First go to > System > Preferences > Keyboard, and click on ‘Accessibility’ button. check ‘Enable keyboard accessibility features’ and then go to ‘Mouse keys’ tab and check ‘Enable Mouse Keys’ and hit ‘Close’ button.

Then create a text file as ~/.xmodmap containing the following text (Note: This sets Right Apple key as Right mouse click and Left Enter Key as Alt Gr key)

keycode 116 = Pointer_Button3
keycode 108 = ISO_Level3_Shift

Add a call to xmodmap to your startup applications (System > Preferences > Sessions) [example]:

xmodmap /home/yourusername/.xmodmap

Restart X (Ctrl+Alt+Backspace) for the changes to take effect.

This worked great for me. Interestingly enough I have just installed jUploader (a Flickr uploader for Linux) and in this program I can press ctrl and click and this has the same function as pressing the right apple key, which is set to be right click. Hmmmm….

Mounting A Network Drive On Startup Using Linux Ubuntu 7.10 On A Macbook Pro

http://celeb.wohoo.co.uk/wp-content/uploads/2007/02/nas-where-are-they-now.jpgI wanted to have my network attached storage (NAS) always mount on startup.

To do this there must first be a place to mount to, so create a folder (I created mine at /media/nas) either visually or using the following line in terminal:

sudo mkdir /media/nas

Once this is done the following line mounts the drive:

sudo mount -t cifs -o username=username,password=password //192.168.1.10/nas /media/nas

Once that is all working to get the NAS to mount every time add the following line to the bottom of /etc/fstab:

#Mount NAS
//192.168.1.10/nas /media/nas cifs username=username,password=password

Add the correct username and password and you’re away. If it’s a guest account the username is guest and password remains blank. The drive mounts fine at startup and when no network connection is present, nothing happens. When you then connect, the NAS will be mounted automatically, at least in my experience.

There may be some issues with permission so you might need to chmod and chown the folder created to mount to, but I have had no problems as yet.

Ububtu, A Powerbook G4 & How To Make It Work

I am becoming increasingly disenchanted with Apple and it’s software (when you call up, Computer Support is the 4th selection choice - after of course iPhone, iPod and Buy Accessories - that says it all) so it seems obvious to start looking elsewhere for an operating system and applications that fulfill my needs. I have been considering the switch to Linux for some time and now seems the ideal point to experiment before making a move.

Ubuntu 7.10 (Gutsy Gibbon) on the Apple Powerbook G4

I have an old and very beaten Powerbook G4 (Specifically Machine Model PowerBook5,2 and Build 8L127) which I have not turned on for over a year so I charged that up and downloaded the latest version of Ubuntu (7.10 Gutsy Gibon). I looked at other Linux distributions for PPC, and while there are many more specific OS’s, Ubuntu has great support for a range of architectures (PPC [G3, G4, G5], Intel and AMD), a really good user base and forum and lots of versions and documentation, plus a live CD so you can use before install.

As Ubuntu has the ability to boot live off CD by typing at the prompt:

live

but unfortunately that didn’t work too well and when it finally loaded I ended up on a blank screen:

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-1

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-2

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-3

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-4

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-5

A quick search brought up this great post by 小罗 w which while sharing many of my views on Apple recently also has some great information on exactly the problems I have been having, also using 7.10 on a Powerbook G4. On start up from the live CD he typed:

live-nosplash-powerpc resolution=1024×768 vga=795 video=ofonly

It’s pretty obvious what it does but I had a load of problems just like 小罗 . I have also tried using the suggested

live video=ofonly

but had similar problems. Here are some screen grabs (the complete set on Flickr here).

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-7

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-17

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-23

Got nearly all of it, some screens went a little too fast to photograph with a still camera. [N.B It takes absolutely AGES. Over 10 minutes and as 小罗 say sosmetimes you get crashes. It is pretty interesting to look at all the errors coming up. Surprise surprise, there is a system clock error.. (See further down this post).

After all this, you get this dialogue box (sometimes you need to press a button or the power button quickly as the computer stalls):

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-24

I chose YES the first time, and got this X11 warning which led to a restart:

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-25

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-26

I then did the same again and chose NO, which led to this:

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-28

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-29

ubuntu-7.10-gutsy-gibbon-powerbook-g4-screengrab-30

So 7.10 does not even load on a Powerbook G4 as far as I can get it to. But it's not all bad news - 7.04 does.

Ubuntu 7.04 (Feisty Fawn) on the Apple Powerbook G4

[N.B I actually tested these the other way round, and have test all versions from 6.06 (Dapper Drake) but to make things easier to follow I've written it up this way. Maybe I wouldn't have tried it the other way round. Nah, I definitely would have done, I'm determined to get this working].

On to trying 7.04 (Feisty Fawn) I just used almost the same line (I figured go for broke) at the prompt booting off the live CD:

live resolution=1024×768 vga=795

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-1

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-2

think this next error is something to do with my wireless card:

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-3

and there you have it:

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-4

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-5

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-8

Ubuntu now loads up fine and looks pretty nice too which is great until I get these errors on the desktop:

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-10

I can load the applications but on comparing 7.04 on my G4 to 7.10 running on an Intel iBook I didn’t seem to have any of the ’system tray’ stuff and menu bar items that the iBook had, and the error messages I got seem to reflect this.

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-11

In doing some more reading I found out something I really should have noticed when I chose which version of Ubuntu to install - that is that version 6.10 Edgy EFT is apparently the last version to support PPC. See here… While there is nothing saying 6.10+ versions won’t work, the fact that support for PPC apparently ends with 6.10 is not very encouraging. Although while downloading all 6.10+ versions there is a specific ISO for PPC for example http://cdimage.ubuntu.com/ports/releases/gutsy/release/ - so maybe it is supported. Hmm..

So I downloaded 6.10 as a test and booted off the live CD again but still the same errors, and I have also had pretty much identical problems with Ubuntu 6.06 & 6.10 and Kubuntu and Xubuntu 6.06. So far I have yet to try the following solution on these versions and have only tried it on 7.04.
Being consistent across 6.06, 6.10, 7.04 & 7.10 and Ubuntu, Kubuntu and Xubuntu made me think the problem lay with my computer as opposed to a disc or OS version specific error. But it’s only a hunch. More of a search for the specific errors turned up a few really useful pages on the Ubuntu forums which between them helped me work out the problem (See what I mean about support - it’s great, I found an almost identical screen grab here).

Javahead noted (in post #8) that on a G4iMac he had to reset the PMU/NVRAM for Ubuntu 7.04 Fiesty Fawn to install, which then worked fine. In another thread (post #6) DirtDawg also talked about a dead PRAM battery in a G3 giving the errors I have been seeing.

Now I’m not sure what PMU/NVRAM or PRAM are but I do know that if your internal battery dies (this can easily happen if your computer is old and you leave it off for a good while as I did) then your hardware clock resets. If this happens the date sets itself to the earliest date it can - something like 1901 - and your computer then says “Wait.. I haven’t been invented, I must behave erratically!” (well, not really but it’s easier thinking of it like that) and fails to work correctly. It’s the bloody millennium bug all over again.

To test this, I booted up in OS X which I still had installed and surprise surprise, I got this notification:
system_clock_set_too_early

So with things making a little more sense I thought I’d try running the 7.04 live CD so I started Ubuntu, got errors like I had before and opened terminal and typed sudo date MMDDhhmmYYYY (obviously with the real date in);

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-12

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-13

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-14

Then closed Terminal and clicked the power button at the top right of the screen and logged out;

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-15

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-16

Then let Ubuntu log back in as the default user;

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-18

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-19

Et Voilà:

ubuntu-7.04-feisty-fawn-powerbook-g4-screengrab-20

Sorted. Thanks JavaHead!

As I am running off the live CD, this needs to be typed in every time I start up so next step is to hard install and see if my battery IS totally dead (i.e My system clock resets every time I turn the machine of and on again) in which case I will hack open my G4 again and replace it, or if it is fine and I can move onto sorting out right clicks, wifi and all the other things that in my reading so far I have found out are hard to get working on a G4 Powerbook.

The Joys of Linux :)

Lets see….

« Previous Page