MacBuild Tips 'n Tricks

From FreekiWiki
Jump to navigation Jump to search

Airport activation

Airport cards may not be recognized at installation time, or if a replicated hard drive is installed. Usually all that is required is to do sudo modprobe airport from the command line for one time activation, and adding airport to /etc/modules for persistent boot time activation.

Airport Extreme activation

Airport Extreme cards use the bcm43xx driver, but the required firmware is not present in the driver as distributed. The process for acquiring and installing the software is described in here. It says, essentially, to install the package bcm43xx-fwcutter, which should download and install the appropriate firmware. My experience is that that may or may not work. An alternative process is described in the README.gz file in the bcm43xxx-fwcutter package, which shows up in /usr/share/doc/bcm43xx-fwcutter/. This approach requires the use of the MacOSX Airport Extreme driver file. Where that is and what to do with it is explained in the README. After installation the wireless ethernet interface must be activated in the Network Manager.

Audio setup on Digital Audio/Quicksilver

There is a related bug at https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/87652.
There are a couple of suggested workarounds (OSS emulation, snd-aoa vs. snd-powermac) but no definitive
fix for feisty.  One of the entries there suggests that the bug may be fixed in one of the kernel 2.6.20-22
versions.  I don't know if that is available as a backport for Feisty. - tonyr 09aug07.

Sometimes when installing Ubuntu on G4 Digital Audio or Quicksilver models, audio doesn't work. No sound comes out under any circumstances, and attempts to open sound controls report that no audio device is present.

The last two generations of G4 Tower models use audio hardware nicknamed Tumbler, and use a special audio output jack that provides power to external speakers. One result of this is that special speakers designed to be used with these machinex are required. Another result, one that concerns us here, is that Ubuntu installation may fail to find any audio device. In that case no audio module is configured and alsamixer parameters controlling audio output are wrong.

To check that no audio device has been detected, you can run alsamixer from a terminal command line, or double-click the speaker icon in the top menu bar (the icon may not be there if no audio device was detected). In either case, you should see some kind of error message or advisory saying that no audio device is configured or detected.

To detect the audio device one-time, on a terminal command line type

sudo modprobe snd-powermac

If that didn't complain, you should shortly see an advisory in the lower right corner of the display indicating that a new audio device is detected.

To make that happen at boot time, edit the file /etc/modules as root (sudo) and add snd-powermac as the last line. Here is an example with the line added:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp
snd-powermac

The one you edit may be slightly different, and may not have any other module names at all.

At this point there might still be no sound coming form the speaker during a sound test. Use these commands on a terminal command line to modify the audio driver configuration:

sudo amixer sset 'Auto Mute' off
sudo amixer sset 'PC Speaker' on

To make this happen at boot time, edit the file /etc/rc.local as root (sudo) and ad the two lines

amixer sset 'Auto Mute' off
amixer sset 'PC Speaker' on

at the bottom.

CD Audio Skip

iMacs/PowerMacs with CPU speeds of 40MHz or less and with older CD drives seem to have problems playing CDs using SoundJuicer and RythmBox, the CD ripper and CD player installed by default with Ubuntu. Playback audio will 'skip', producing gaps of a few seconds, and may even cease altogether. Loren has been able to solve this by replacing CD drives in slot loading iMacs and PowerMac Towers. Replacement drives are not always available for iMacs, however. Another solution is to install gxine from the Applications->Add/Remove menu and modify some of its configuration parameters.

gxine configuration parameters are found in the user's home directory, ~/.gxine/config. There may be a global/default version of this somewhere but I haven't looked for it. The parameters for tweaking are media.audio_cd.drive_slowdown, default 4, revised to 0 or 12, and engine.buffers.audio_num_buffers, default 230, revised to 500 (maybe unnecessary). It turns out there is also a visualization parameter there, which can be set to do nothing: gui.post_plugins.audio_visualisation, default goom, revised to None. These revisions make the default operation permanent.

The remaining issue is how to make gxine do the right thing as the default audio auto-startup application. Default preferred applications can be modified through the System->Preferences->Removeable Drives and Media->Multimedia menu. In the Audio CD Disks command box, replace the existing sound-juicer -d %d entry with gxine cdda:/ , which works for commercial audio CDs.

The modified sections of ~/.gxine/config look like this:

  • for cd_drive.slowdown
# slow down disc drive to this speed factor
# numeric, default: 4
#media.audio_cd.drive_slowdown:4
media.audio_cd.drive_slowdown:12
  • for audio_num_buffers
# number of audio buffers
# numeric, default: 230
#engine.buffers.audio_num_buffers:230
engine.buffers.audio_num_buffers:500
  • for audio_visualization
# Default audio visualisation plugin
# { None  fftgraph  oscope  fftscope  goom }, default: 1
#gui.post_plugins.audio_visualisation:goom
gui.post_plugins.audio_visualisation:None


<still needs a set of step-by-step cli instructions - tr 15may07>

CD Eject keyboard key problem

[redfine the key to F15 with keyboard shortcuts. Not perfect, but better than the default behavior]

Defeating Mac OSX Security

Desktop applets fail to initialize

If the system clock is not set correctly, there may be several failure notices during Desktop initialization reporting applet startup errors. The last one is usually about Nautilus being unusable. The fix for this is to set the system clock correctly. See #Set the clock to UTC(GMT) time.

Dual Boot OSX and Ubuntu

Dual Processor G4 tower

A dual processor G4 power should have Ubuntu version 7.04 (Feisty) installed. Currently the only installation method available is with the PPC Alternate CD (eventually there should be a replication image for this).

After the installation completes, the SMP (multiprocessor) version of the kernel must be installed manually with Synaptic (GUI tool) or apt-get (cli tool).

To install with Synaptic from the top menu bar select System->Administration->Synaptic Package Manager. Select and install the package linux-image-powerppc-smp, and reboot.

To install the package using apt-get use these commands:

sudo apt-get install linux-image-powerpc-smp
sudo ybin -v

DVD play with ogle

DVD play failure, strange color effect

Firmware upgrade

G4 Cube Sound

iMac auto restart after software shutdown

Some iMacs will automatically restart when powered down using the Desktop shutdown button. This is a known hardware problem that Apple is aware of. It appears to be related somehow to the USB controller, and the recommended workaround is to unplug the Keyboard/Mouse USB connector after the shutdown process has started.

Forcing power down with the front panel power button is a brute force methid that works, but could leave some file system corruption (ext3 file systems, the default in Ubuntu Linux since Dapper, reduce the risk of this).

Keyboard shortcuts

Laptop/Notebook recycling

Laptops and notebooks that are to be recycled should have the hard drive and battery removed and the display separated from the rest of the body. The hard drive goes to advanced testing, or can be permanently disabled by MacBuild before recycling. The display does not need to be removed from the cover, and goes into a Gaylord (Huge Cardboard Box) currently right outside of the Black Hole. The rest of the body needs no further disassembly, and goes in a Gaylord currently beside Monitor Testing. The battery goes into the battery recycling mailer carton, sealed in a plastic bag (should be some in the carton).

MacBook intermittent shutdown problem

PCI video in AGP tower

PMU/CUDA

PMU stands for Power Management Unit. There is a small (usually) gray button on a metal box about 1/4" square somewhere on the logic board. Some G3 B&W PowerMacs have two such buttons together near the PRAM battery. On those machines the button is called CUDA instead of PMU.

[this section needs the reference diagram links for the PMU from texas_macman - tr 1 aug07]

PowerBook memory slot failure

Power-On failure

Sometimes a Mac will fail to power up when the power button is pressed. If the PRAM battery has been dead for a relatively long time, it is possible that the machine has 'forgotten' how to turn on. This can be tested and possibly fixed by replacing the battery and pressing the PMU for about 1 second. See #PMU/CUDA above for information about locating the PMU button.

Power supply testing

There is no tester for Mac power supplies. Apple publishes power supply testing manual procedures for some PowerMac towers:

This link, MDD Power Supply Mods, indicates that the Mirrored Drive Door PowerMac (G4 MDD Quicksilver) is different from other Quicksilver models.

PRAM (Backup) Batteries

The PRAM battery for iMacs and G3/G4 towers is a smallish cylindrical 3.6v (or 3.7v) lithium battery. Some are green-and-white, some are red/silver/yellow, some are blue-and-white, some are purple-and-green. A suggested good battery voltage range is 3.39v to 3.69v. A battery showing a lower voltage is considered 'bad', and should be recycled.

All G3 ibooks and G4 12" ibooks do not have a PRAM battery. They use a capacitor to supply enough power to maintain the clock and PRAM contents for about 20 seconds while changing a system battery. This is documented at http://docs.info.apple.com/article.html?artnum=58445 and http://docs.info.apple.com/article.html?artnum=86181 .

Set the clock to UTC(GMT) time

The clock should be automatically set during a CD installation on a machine connected to the internet. The usual FG MacBuild process clones an existing hard drive rather than installing Ubuntu from scratch.

There are two cli commands that are used to set the clock, even when the applet failure messages occur. The system time is originally set to UTC time, and then then the hardware clock is updated from that setting. In a terminal enter the commands

sudo date -u MMDDHHMMYYYY
sudo hwclock -uw

where

MM    - two digit month
DD    - two digit day
HH    - two digit hour
MM    - two digit minute
YYYY  - four digit year

Note that the date/time needs to be UTC(GMT) time, which is +7 hours from PDT, or +8 hours from PST, and the HHMM part is in 24-hour military format (e.g. 4:15PM is 1615 in 24-hour format).

The MacBuild process allows for a Linux Rescue CD (it's currently a Finnix CD) to be used to boot the system before any other software installation to verify POST and configuration. This Linux is command-line only, and can also be used to set the clock. The second command is slightly different in this case, clock vs. hwclock:

sudo date -u MMDDHHMMYYYY
sudo clock -uw

Time since last check message shows huge numer of days at boot

Sometimes after installing a repicated hard drive into a refurbished Mac, the boot process will report (in white text on a black screen) that a file system check has not been performed in several thousand days, usually referring to /dev/hda3. This is a failure in the replication process somehow, and should really be fixed in the replication script. There is a relatively simple command line fix. Use the command tune2fs to set the superblock information on the disk partition to today's date. Here is an example:

sudo tune2fs -T 20070530 /dev/hda3

The date part is a six digit string in the form YYYYMMDD (yead, month, day), and the partition is the one mentioned in the original boot time message. You can verify that the last check time has been updated, also using tune2fs like so:

sudo tune2fs -l /dev/hda3

Look ffor the line that says Last checked:.

Ubuntu splash

A normal CD installation of Ubuntu may result in the normal Ubuntu startup splash screen not being displayed. When the system is first booted after installation, the display remains dark for a long time until the small rotator 'waiting' icon appears right before the login screen. This could give the impression that 'nothing is happening'.

The fix:

  1. edit /etc/usplash.conf (with nano or vi)
  2. change xres=800 to xres=1024
  3. change yres=600 to xres=768
  4. save and exit
  5. on the command line run sudo update-initramfs -u'
    • this takes about a minute
  6. on the command line run sudo ybin -v
  7. restart

This fix should already be applied in the hard drive replication images. It has never been made to work with the 17" Studio Display ADC monitors, whose default resolution seems to be 1600x1200.

Video setup on Flower Power iMac

iMacs with 500MHz, 600MHz, and 700MHz processors, the so called Flower Power models, have a 750cx version CPU and ATI Rage 128 Pro Ultra video controller. After a normal Edgy alternate CD install, video response is extremely sluggish. For example, mouse cursor movements lag several seconds behind physical mouse movement.

A fix is suggested in http://ubuntuforums.org/showthread.php?t=191080. It consists of the following changes to /etc/X11/xorg.conf:

NOTE: It is usually sufficient to just add the "Option ForcePCIMode" line to the Device Section. - tr 1aug07 
  • in the Module section
Section "Module"
# Load "i2c"
# Load "bitmap"
# Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "dbe"
Load "glx"
# Load "int10"
# Load "type1"
# Load "vbe"
EndSection
  • in the Device section
Section "Device"
Identifier "ATI Technologies, Inc. Rage 128 Pro Ultra TR"
Driver "ati"
Option "UseFBDev" "false"
Option "SWcursor" "true"
Option "ForcePCIMode" "true"
EndSection

The normal way to apply these changes is

  1. CTL+ALT+F1 to use a virtual terminal (command line interface)
  2. login as oem
  3. command: sudo /etc/init.d/gdm stop
  4. make a backup copy of xorg.conf, e.g. cp /etc/X11/xorg.conf /etc/X11/xorg.conf.`date +%Y%m%d%k%m%S`
  5. edit /etc/X11/xorg.conf, for example, sudo nano /etc/X11/xorg.conf
  6. modify the Module and Device sections as indicated above
  7. save the file and exit
  8. command: sudo /etc/init.d/gdm start

The normal Ubuntu login page should appear with much better video response.

Note that the original problem is observed in Ubuntu Edgy (Release 6.10).  ATI video
driver installation is different in Ubuntu Feisty (7.04), in that a best driver version
is selected to match the detected video controller.  The problem may not be present with 
Feisty, but that has not been tested as of 15May2007.