Wednesday, March 11, 2015

Ubuntu-MATE on my iBook G4!


So I have been wanting another PowerPC machine to some more testing of different linux distros on. My current PowerBook G4 has been my main laptop for a few months and I am pretty happy with Debian on it right now. So I have been searching craigslist and ebay for any good deals on iBooks. I was able to get an iBook G4 1.42 GHz for about $96 on criagslist. I was excited to bring it home to begin the job of getting Linux to run on it. It had  768MB of RAM so I ordered a 1GB stick from OWC, it should be arriving this week. So here are my thoughts on 15.04 MATE

1. Install
    The install was very straight forward. However to boot into the live iso you will need to this at yaboot (see graphics section below for detail):

live radeon.modeset=1 video=radeonfb:off video=offb:off video=1024x768-32[enter your screen resolution] radeon.agpmode=-1 

The CD Rom has some issues so I decided to go with a USB install. On iBook G4 macines this means booting into openfirmware and running a command like this: boot usb1/@1:2,\\yaboot. There is great information on USB booting on the UbuntuPowerPC wiki if you want more detail. Once you get the installer going it is pretty standard and simple.

2. Wireless
    The Ubuntu Community Documentation Site has a really good walkthtough on installing firmware on Broadcom wireless cards here. Once I identified my chipset I was able to download the proper driver: sudo apt-get install firmware-b43-installer

3. Sound
    Begining with 14.04 there are known issues with sound on PowerPC Macs. There are some ibooks and powerbooks requires modules to be recompiled. There is an extensive discussion thread on the Ubuntu Forums here. Thankfully this was not the case with either my iBook G4 or my PowerBook G4. I just need to delete the file /etc/modprobe.d/blacklist.local.conf then I need to load the correct module by running this command: sudo modprobe snd-aoa-i2sbus. I then ran the command alsamixer and set the PCM channel to 80. Once that was set I added the snd-aoa-i2sbus module to the /etc/modules so it would load on boot. There is more information on sound issues at the UbuntuPowerPC wiki. This issue is also exprienced on Debian testing (Jessie).

4. Graphics
    Since 14.10 you need to enable KMS if you have a radeon video card (see this bug thread). KMS has been known to be buggy so in the past you had the option to disable it. Now without it you will have issue like no XVid playback. I entered the following on my iBook to enable KMS on the second yaboot screen on boot: 

Linux radeon.modeset=1 video=radeonfb:off video=offb:off video=1024x768-32 radeon.agpmode=-1 

When you login you will need to these paramters to the /etc/yaboot.conf file. You add them this way:

image=/boot/vmlinux
        label=Linux
        read-only
        initrd=/boot/initrd.img
        append="quiet splash radeon.modeset=1 video=radeonfb:off video=offb:off video=1024x768-32 radeon.agpmode=-1"

image=/boot/vmlinux.old
        label=old
        read-only
        initrd=/boot/initrd.img.old
        append="quiet splash radeon.modeset=1 video=radeonfb:off video=offb:off video=1024x768-32 radeon.agpmode=-1"

One you add these setting using nano, vi or whatever editor you use. You wil to run the following command sudo ybin -v to apply the changes. You should see the following or something similar if KMS is enabled.

:~$ cat /var/log/Xorg.0.log |grep -e drm -e dri2 -e radeon -e KMS
[    31.499] Kernel command line: root=UUID=cbe24412-5af3-4fd4-8a99-179d70cf2b66 ro quiet splash video=radeonfb:off radeon.modeset=1 video=radeonfb:off video=offb:off video=1024x768-32 radeon.agpmode=-1
[    31.522] (II) xfree86: Adding drm device (/dev/dri/card0)
[    31.806] (II) LoadModule: "radeon"
[    31.806] (II) Loading /usr/lib/xorg/modules/drivers/radeon_drv.so
[    31.901] (II) Module radeon: vendor="X.Org Foundation"
[    32.124] (II) [KMS] Kernel modesetting enabled.
[    32.127] (II) Loading sub module "dri2"
[    32.127] (II) LoadModule: "dri2"
[    32.127] (II) Module "dri2" already built-in
[    32.144] (II) RADEON(0): KMS Color Tiling: enabled
[    32.145] (II) RADEON(0): KMS Color Tiling 2D: disabled
[    32.145] (II) RADEON(0): KMS Pageflipping: enabled
[    33.081] (II) config/udev: Adding drm device (/dev/dri/card0) card0 /sys/devices/pci0000:00/0000:00:10.0/drm/card0
[    33.081] (II) config/udev: Ignoring already known drm device (/dev/dri/card0)

Having KMS enabled does not mean that you will have 3D acceleration. There are issues with the Mesa r300 driver that will require you to set the default screen depth on you xorg.conf file to 16. However this will limit your display. There are patched deb files for Mesa that fix this issue. However they are only for 14.04 version of Mesa. If you want them you can download them here. There is also more information on configuring graphics on the UbuntuPowerPC wiki as well.

5. Performance
   The desktop, while not as fast as my PowerBook running LXDE on Debian, performed well. Moving the mouse around was a little sluggish at times, but I am thinking that could be either the trackpad or maybe I needed more RAM. Video playback using mpv was as great. I was able to get some decent 720p playback on some videos. Since I was running 15.04 version I was not able to really use the patch for r300 mesa driver needed for 3D acceleration. This means that some of the games I wanted to play like Supertuxkart was just not possible. Web browser was good with the exception that firefox could load certain pages that would load fine on Debian using iceweasel. I am seeing the same issue with Lubuntu 14.04 so I do think it is an issue Ubuntu-MATE specifically. So if you have an iBook, PowerBook, and especially a Powermac G4 or G5 give Ubuntu-MATE a try!






4 comments:

  1. Extremely helpful. Allowed me to get a PowerBook G4 17" working. For me, Lubuntu seemed to work better, but the same tips applied equally for the two distros.

    ReplyDelete
  2. Thank you lots for this post; it's a pity I didn't find it earlier. Instead, I spent too long making sense out of the myriad outdated posts out there.

    I'd suggest to add some minimal tips about creating the USB install media. Some web pages talk about Startup Disk Creator, Unetbootin, even some paid tool - but for Lubuntu *and* Ubuntu Mate, a simple "sudo dd if=image.iso of=/dev/diskX bs=1m" + "boot usb1/disk@1:2,\\:tbxi" in OF worked perfectly for me.

    ReplyDelete
  3. Thank you so much for your post!
    I had some issues installing the system, which i resolved somehow. It works flawlessly now.
    Thanks.

    ReplyDelete