Alubook (Powerbook 5,6)

From ArchWiki

Jump to: navigation, search

It is possible to use a Powerbook 5,6 with Arch Linux PPC.

Contents

Specifications

This is an Alubook Feb/2006.

CPU

$ cat /proc/cpuinfo

processor       : 0
cpu             : 7447A, altivec supported
clock           : 1666.666000MHz
revision        : 0.2 (pvr 8003 0102)
bogomips        : 73.47
timebase        : 18432000
platform        : PowerMac
machine         : PowerBook5,6
motherboard     : PowerBook5,6 MacRISC3 Power Macintosh
detected as     : 287 (PowerBook G4 15")
pmac flags      : 0000001b
L2 cache        : 512K unified
pmac-generation : NewWorld

General hardware

Specifications: 80 GB HDD, ATI RV350 (Radeon 9600 M10), audio, video Out (DVI/S-Video), Ethernet, Airport Extreme.

[benoitc@enlil ~]$ lspci
00:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 AGP
00:10.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]
0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 PCI
0001:10:12.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)
0001:10:13.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller
0001:10:17.0 Class ff00: Apple Computer Inc. KeyLargo/Intrepid Mac I/O
0001:10:19.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
0001:10:1a.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
0001:10:1b.0 USB Controller: NEC Corporation USB (rev 43)
0001:10:1b.1 USB Controller: NEC Corporation USB (rev 43)
0001:10:1b.2 USB Controller: NEC Corporation USB 2.0 (rev 04)
0002:24:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 Internal PCI
0002:24:0d.0 Class ff00: Apple Computer Inc. UniNorth/Intrepid ATA/100
0002:24:0e.0 FireWire (IEEE 1394): Apple Computer Inc. UniNorth 2 FireWire (rev 81)
0002:24:0f.0 Class ffff: Illegal Vendor ID Unknown device ffff (rev ff)

Compatibility

What works:

  • Display: OK. 3D Acceleration with R300. No S-Video Out. DVI Out works without problem with VGA screen and with a hack on DVI screens.
  • Auio: Works with snd-powermac. Quality is better with snd-aoa module(2.6.18x kernel) but input don't work with this one. Only software mixing works with dmis plugin.
  • Firewire : OK
  • Ethernet: (sungem module)
  • Wifi : Airport Extreme. Works with bcm43xx module. Only 8201/b

Display

Configure the powerbook with r300 driver and 3D acceleration:

# pacman -S xf86-video-ati

xorg.conf is available in Arch Linux PPC, ftp: ftp://ftp.archlinuxppc.org/other/misc/dualhead-powerbook56/xorg.conf

The Powerbook can be configured with automatic dualhead: DualHead on alubook (radeon)

Configuration

Touchpad

Works perfect with Synaptics. xorg.conf section:

Section "InputDevice"
       Identifier  "Touchpad"
       Driver     "synaptics"
       Option     "Device"                "/dev/input/mouse0"
       Option     "Protocol"              "auto-dev"
       Option     "LeftEdge"              "130"
       Option     "RightEdge"             "840"
       Option     "TopEdge"               "130"
       Option     "BottomEdge"            "640"
       Option     "FingerLow"             "7"
       Option     "FingerHigh"            "8"
       Option     "MaxTapTime"            "180"
       Option     "MaxTapMove"            "110"
       Option     "EmulateMidButtonTime"   "75"
       Option     "VertScrollDelta"       "20"
       Option     "HorizScrollDelta"      "20"
       Option     "MinSpeed"              "0.40"
       Option     "MaxSpeed"              "0.70"
       Option     "AccelFactor"           "0.011"
       Option     "EdgeMotionMinSpeed"    "200"
       Option     "EdgeMotionMaxSpeed"    "200"
       Option     "UpDownScrolling"       "1"
       Option     "CircularScrolling"     "1"
       Option     "CircScrollDelta"       "0.1"
       Option     "CircScrollTrigger"     "2"
       Option     "VertTwoFingerScroll"   "1"
       Option     "HorizTwoFingerScroll"  "1"
       Option     "SHMConfig"             "on"
       Option     "Emulate3Buttons"       "on"
EndSection

Remember to add:

InputDevice     "Touchpad"      "SendCoreEvents"

to the ServerLayout section.

Audio

Use snd_powermac:

# modprobe snd_powermac 

To have good sound quality, set PCM to 70%:

# amixer set PCM 70% unmute

dmix alsa plugin is used for software mixing. File /etc/asound.conf is configured as follows:

pcm.!default {
        type plug
        slave.pcm asymer
}

pcm.dmixer {
        type dmix
        ipc_key 1977
        ipc_perm 666
#       ipc_key_add_uid true
        slowptr true
        slave {
                pcm "hw:0"
                period_time 0
                period_size 1024
                buffer_size 8192
                rate 44100
        }
}

pcm.dsnooper {
        type dsnoop
        ipc_key 1978
        ipc_perm 666
#       ipc_key_add_uid true
        slave.pcm "hw:0"
}

pcm.asymer {
        type asym
        playback.pcm "dmixer"
        capture.pcm "dsnooper"
}

pcm.jack {
        type jack
        playback_ports {
                0 alsa_pcm:playback_1
                1 alsa_pcm:playback_2
        }
        capture_ports {
                0 alsa_pcm:capture_1
                1 alsa_pcm:capture_2
        }
}

# These are for alsa-oss
pcm.dsp0 pcm.default
ctl.mixer0 "hw:0"

File is available here: ftp://ftp.archlinuxppc.org/other/misc/dmix-powerbook/asound.conf ftp://ftp.archlinuxppc.org/other/misc/dmix-powerbook/asound.conf.

Do not forget to reload module after alterations.

Wireless

On a recent kernel (>2.6.24) the module bcm43xx has been deprecated; b43 has taken its place. Add it to /etc/rc.conf:

b43 !bcm43xx

Network profiles

Use network profiles instead of the default network daemon. An example WPA connection:

CONNECTION=wireless
INTERFACE=wlan0
SCAN=yes
SECURITY=wpa
ESSID=essid_name
KEY=key_string
IP=dhcp
TIMEOUT=20

And /etc/wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
       ssid=essid_name
       psk=53173395c4vs4568ff448657fd9c0d4d55b232c9bc77c4230c6e962ssdb10412
}

Add net-profiles in {{{1}}} line on rc.conf.

Original 'network' daemon

Instead of using network profiles, simply add wlan0 to the {{{1}}} line in rc.conf.

Power management

Power is managed with 2 tools: pbbuttonsd and powernowd.

# pacman -S pbbuttonsd powernowd

pbbuttonsd

Read the man of pbbuttonsd to configure it. pbbuttonsd manages power, screen light and key dimming, among others.

To use pbbuttonsd you need to load the i2c_dev module to manage function keys. Load therm_adt746x for temperature information and fan control:

# modprobe i2c-dev
# modprobe therm-adt746x

To launch pbbuttonsd:

# /etc/rc.d/pbbuttonsd start

Add the name to DAEMONS line in /etc/rc.conf to start it on boot.

Example configuration file (/etc/pbbuttonsd.cnf)

# Configuration file for PBButtonsd >= Version 0.5
# for complete list of options please see pbbuttonsd.conf man-page
[SYSTEM]
userallowed           = "paranoid"      ; user who is allowed to use IPC
autorescan            = yes             ; automatic rescan of event devices
CmdTimeout            = 4
[MODULE POWERSAVE]
onAC_policy           = performance     ; nochange, performance, custom or powersave
onAC_TimerAction      = none            ; none, suspend-to-ram, suspend-to-disk, blankscreen
onAC_CoverAction      = blankscreen
onAC_KeyAction        = suspend-to-ram  ; SleepKey
onAC_SuspendTime      = 0               ; time in 1/10 seconds
onAC_DimTime          = 6000            ; time in 1/10 seconds
onBattery_policy      = powersave
onBattery_TimerAction = none            ; none, suspend-to-ram, suspend-to-disk, blankscreen
onBattery_CoverAction = suspend-to-ram
onBattery_KeyAction   = suspend-to-ram  ; SleepKey
onBattery_SuspendTime = 0               ; time in 1/10 seconds
onBattery_DimTime     = 6000            ; time in 1/10 seconds
SleepKey              = 116
SleepKeyDelay         = 0               ; values > 0 may be dangerous, if the power key is used to trigger sleep
BWL_first             = 22              ; first battery warnlevel, time in minutes
BWL_second            = 10              ; second battery warnlevel, time in minutes
BWL_last              = 3               ; last battery warnlevel, time in minutes
Script_PMCS           = "/etc/power/pmcs-pbbuttonsd %s %s %s"
#Script_PMCS          = "/tmp/p %s %s %s"
EmergencyAction       = sleep           ; action, if battery is critically low
HeartbeatBeep         = no              ; beep, if nothing else showed that the computer lives
CPULoad_sleeplock     = yes
CPULoad_min           = 20              ; value in percent
CPULoad_period        = 20              ; time in seconds
NETLoad_sleeplock     = yes
NETLoad_min           = 4096            ; traffic in Bytes/s
NETLoad_period        = 20              ; time in seconds
NETLoad_device        = "ether"
[MODULE DISPLAY]
#LCD_Brightness       = 8              ; initial LCD brightness level
LCD_FadingSpeed       = 5               ; 0 = no smooth fading
LCD_AutoAdjust        = yes             ; only on Aluminum PowerBooks
LCD_IllumUpKey        = 60 + ctrl
LCD_IllumDownKey      = 59 + ctrl
LCD_Threshold         = 94
LCD_AutoAdjMin_Bat    = 2               ; autoadjust parameter
LCD_AutoAdjMax_Bat    = 7
LCD_AutoAdjMin_AC     = 1
LCD_AutoAdjMax_AC     = 15
#KBD_Brightness       = 0              ; initial keyboard illumination level
KBD_OnBrightness      = 5               ; initial level if KBD on/off key is pressed
KBD_FadingSpeed       = 5               ; 0 = no smooth fading
KBD_AutoAdjust        = yes             ; only on Aluminum PowerBooks
KBD_IllumUpKey        = 68 + ctrl
KBD_IllumDownKey      = 67 + ctrl
KBD_IllumOnKey        = 66 + ctrl
KBD_Threshold         = 28              ; only on Aluminum PowerBooks
dev_FrameBuffer       = "/dev/fb0"
UseFBBlank            = no
DimFullyDark          = yes
CRT_MirrorKey         = 65 + ctrl
[MODULE MIXER]
SoundSystem           = ALSA            ; none, auto, OSS or ALSA
Volume                = 50              ; initial volume level
Speakers_muted        = no              ; mute after startup?
VolumeUpKey           = 63 + ctrl
VolumeDownKey         = 62 + ctrl
MuteKey               = 61 + ctrl
OSS_Mixer             = "/dev/mixer"    ; settings for OSS
OSS_Channels          = "volume, speaker"
ALSA_Card             = "default"       ; settings for ALSA
ALSA_Elements         = "Master, 'PC Speaker'"
MixerInitDelay        = no
[MODULE CDROM]
dev_CDROM             = "/dev/cdrom"
EjectCDKey            = 161
EjectCDKeyDelay       = 0
[MODULE PMAC]
dev_PMU               = "/dev/pmu"
dev_ADB               = "/dev/adb"
TPModeUpKey           = 225 + alt
TPModeDownKey         = 224 + alt
TPMode                = drag
KBDMode               = fkeysfirst
Batlog                = none
NoTapTyping           = yes

If you want to use the Fn button instead of Ctrl, just substitute all occourrences of ctrl with fn.

powernowd

powernowd is used to change CPU speed on demand. First load cpufreq_userspace module:

# modprobe cpufreq_userspace

Default configuration of powernowd is enough, just launch it:

# /etc/rc.d/powernowd start

Add the name to the DAEMONS line in /etc/rc.conf to start it on boot.

Note: From time to time with powernowd your computer may freeze due to CPU speed alterations. If you do not want it you could also manually configure cpufreq* modules. See: cpufreq

External links

Personal tools