Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo on powerbook G4, 12in (1.33Ghz)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Fri Jun 03, 2005 3:43 am    Post subject: gentoo on powerbook G4, 12in (1.33Ghz) Reply with quote

Hi all,

I've recently installed gentoo on my 12in G4 1.33GHz powerbook. This is not the newest version of the powerbook but the one before. I started with a stage 3 install. Here are some ups and downs.

I
First, what everybody probably knows by now:
- this powerbook has an nvidia graphics card and is not fully supported under ppc linux. It works well enough for me though. I have the composite extension enabled and for what I do the x.org driver is perfectly adequate. But no suspend to ram (sleep) because of this.
- Airport Extreme does not work
- modem appears to not work (haven't tried very hard, tho)

II
Things that worked without any need for tweaking:
- sound (ALSA without problems)
- touchpad
- keyboard
- USB (I tried: printer, harddrives, wifi-card, flash drive, keyboard, mouse)
- firewire (I only tried a harddrive)
- ethernet card (the sungem driver)


IV
Issues:

Both the gentoo kernel (2.6.10-gentoo-r6) and the vanilla kernel (2.6.11) detect the wrong cpu speed. System thinks the machine is running at full speed when it's only running at half speed. Benjamin Herrenschmidt has a patch for the 2.6.11 kernel: http://lists.debian.org/debian-powerpc/2005/03/msg00554.html
I applied the patch against 2.6.11.3 and use powernowd for frequency scaling.
Jochen Voss has a patch for 2.6.11.8: http://seehuhn.de/comp/powerbook/
The page also has some other patches and interesting pointers. I didn't need any of the other patches, tho (he is dealing with the newest version of the 15in powerbook)

If you are using a newish powerpc laptop you should check if you ahve the same problem. Just do
cat /proc/cpuinfo
the cpu frequency and bogomips should be roughly the same value (for me: freq is 1333MHz and bogomips is 1327.10)

really bad:
I have had serious DMA related problems and I'm not sure I've gotten rid of them completely. The symptoms are errors like:
Code:
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }

hda: status error: status=0x58 { DriveReady SeekComplete DataRequest }

Sometimes, these things lead to massive file system corruptions (like /etc and /bin complete gone...).
It is not due to a bad hard drive. I have four laptop drives (and two laptops). *All* of them show the same problems when running under gentoo on ppc; *none* of them have problems when running under OS X and *none* of them have a problem when inserted into my PC laptop running either windows or linux. Needless to say, fsck reports no problems (yes, I have a lot of time; I'm between jobs 8) ). It could be that it is a hardware problem (something wrong on the motherboard?) but since I don't have any problems when using OS X, I am leaning towards a kernel issue.

Setting the dma mode down to udma2 and applying the patch above to get the system to report the correct cpu frequency seems to help. I haven't seen bad hard drive behavior the last couple of days but will have to see. Anyone else seen this problem? The problem seems to occur more often when two or more processes try to write to the disk at the same time (e.g. untarring multiple tarballs at once).

V
Mac-on-Linux:
This is great!! Quicktime on linux!!
I use the stable 0.9.70 version. I had to do a bit of tweaking.

1. The installer places the module tun.ko in the wrong place. It should be in /usr/lib/mol/0.9.70/modules/2.6.x/
but is in
/usr/lib/mol/0.9.70/modules
instead. Just move it to the right place.

2. The config file /etc/mol/tunconfig needs editing: all instances of
/var/run/dhcpd.pid
have to be replaced by
/var/run/dhcp/dhcpd.pid
otherwise, mol cannot make networking available to os x the second time it starts and after.



Overall, I'm quite happy so far except for the dma thing :evil: There is no way I'm using my linux on ppc in a serious way until I'm absolutely sure I've gotten rid of the problem. Using partimage to back up the system eases the pain of having to do a reinstall all the time a little bit...
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sat Jun 04, 2005 3:20 pm    Post subject: Reply with quote

Those last two issues with MOL should be resolved by switching to the ~ppc version.

As for your other issues (the dma issue and the cpu speed issue) have you tried using the latest vanilla kernel? You may have some problems with the rivafb on 2.6.12 (I'd like to know how it works for you), but it may fix these other issues without having to patch the kernel.

Thanks!
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Sun Jun 05, 2005 5:46 pm    Post subject: Reply with quote

Hi,

I tried the vanilla kernel (2.6.12-rc5). rivafb seems to work (I don't do anything that is demanding on the graphics card like playing games but X is working fine and I can play dvds). CPU frequency seems detected correctly BUT
dma is still an issue. In fact, it's worse. I got:
Code:
Jun  5 13:29:53 tunixG4 hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
Jun  5 13:29:53 tunixG4 hda: dma_intr: error=0x04 { DriveStatusError }
Jun  5 13:29:53 tunixG4 hda: dma_intr: status=0xd1 { Busy }
Jun  5 13:29:53 tunixG4 hda: DMA disabled
Jun  5 13:29:55 tunixG4 hda: status error: status=0x50 { DriveReady SeekComplete}
Jun  5 13:29:55 tunixG4 hda: no DRQ after issuing MULTWRITE
Jun  5 13:29:55 tunixG4 hda: status error: status=0x50 { DriveReady SeekComplete }
Jun  5 13:29:55 tunixG4 hda: no DRQ after issuing MULTWRITE
Jun  5 13:29:55 tunixG4 hda: status error: status=0x50 { DriveReady SeekComplete }
Jun  5 13:29:55 tunixG4 hda: no DRQ after issuing MULTWRITE
Jun  5 13:29:55 tunixG4 hda: recal_intr: status=0x51 { DriveReady SeekComplete Error }
Jun  5 13:29:55 tunixG4 hda: recal_intr: error=0x04 { DriveStatusError }
Jun  5 13:29:55 tunixG4 hda: status error: status=0x50 { DriveReady SeekComplete }
Jun  5 13:29:55 tunixG4 hda: no DRQ after issuing MULTWRITE
Jun  5 13:29:55 tunixG4 hda: status error: status=0x50 { DriveReady SeekComplete }
Jun  5 13:29:55 tunixG4 hda: no DRQ after issuing MULTWRITE
Jun  5 13:29:55 tunixG4 hda: status error: status=0x50 { DriveReady SeekComplete }
Jun  5 13:29:55 tunixG4 hda: no DRQ after issuing MULTWRITE

right after I booted up. I'm back to the patched 2.6.11.3 which so far has been reasonably stable. Though I in the logs I see some dma related errors at boot-time (typically before dma is set to udma2).
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Wed Jun 08, 2005 3:26 pm    Post subject: Reply with quote

another little update about the dma thing.

I got a bit curious about hard disk performance under os x becuase it seemed a bit sluggish. I did:

dd if=/dev/hda3 of=/dev/null bs=1k count=60000

in os x and I got rates between 14 and 17MBytes per second. If I do the same thing under linux with udma mode 2, I consistently get above 22MB/Sec. So os x seems to be running the HD at a slower rate than udma2 (is this a fair way of comparing what is going on under os x and linux?)

I haven't found a mode that I can set using hdparm that gives me the same kind of performance under linux as under os x. The closest is mdma2 or udma0 which give me around 13.5MB/sec.

anyway, maybe the problem is that the powerbook I have isn't designed to handlle high udma modes. I've been running with mdma2 for a couple of days and haven't seen a single dma related message so far. It does not seem too sluggish unless I have to access large files (I guess for small files, the max transfer speed isn't gonna be reached anyway so it doesn't really matter).

clarification: the above dd command is for linux. In osx, the device names are different so it's something like
dd if=/dev/disk0s3 of=/dev/null bs=1k count=60000
conveniently, os x (free bsd?) will time it for you automagically and give you the data transfer rate. In linux I used the time command and a calculator...
Back to top
View user's profile Send private message
mroy31
n00b
n00b


Joined: 03 May 2005
Posts: 11

PostPosted: Thu Jun 09, 2005 10:07 am    Post subject: Reply with quote

JoseJX wrote:
Those last two issues with MOL should be resolved by switching to the ~ppc version.

As for your other issues (the dma issue and the cpu speed issue) have you tried using the latest vanilla kernel? You may have some problems with the rivafb on 2.6.12 (I'd like to know how it works for you), but it may fix these other issues without having to patch the kernel.

Thanks!


I have the new powerbook 12" (02/05) and I actually use the 2.6.12rc5 with the new patch of Ben for the suspend to disk.
I have a problem with the suspend to disk : when I try a suspend to disk with X, I have a freeze. After investigations (view Debian Mailing List), It's a conflict between rivafb and xorg when you try to open a new console. If you use "video=ofonly", the suspend to disk works perfectly.
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Thu Jun 09, 2005 5:47 pm    Post subject: Re: gentoo on powerbook G4, 12in (1.33Ghz) Reply with quote

quatsch wrote:
I have the composite extension enabled and for what I do the x.org driver is perfectly adequate.

I own the same pbook and composite is veeeeery slooooow...
I use "nv" driver without any option.

quatsch wrote:
Both the gentoo kernel (2.6.10-gentoo-r6) and the vanilla kernel (2.6.11) detect the wrong cpu speed. System thinks the machine is running at full speed when it's only running at half speed.

My bogomips are 1327.10 since 2.6.10 (no patch needed).

quatsch wrote:
I have had serious DMA related problems and I'm not sure I've gotten rid of them completely. The symptoms are errors like:
Code:
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }

hda: status error: status=0x58 { DriveReady SeekComplete DataRequest }


How do you get those messages? /var/log/messages?
I want to check my drive too.
_________________
Io credo che le tecnologie siano moralmente neutrali fino a quando non le utilizziamo - William Gibson

LINEE GUIDA DEL FORUM
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Thu Jun 09, 2005 9:24 pm    Post subject: Reply with quote

I usually do
cat /var/log/messages |grep hda
to get messages concerning hda.
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Thu Jun 09, 2005 9:42 pm    Post subject: Reply with quote

Code:
root@absolution neon # cat /var/log/messages | grep dma
root@absolution neon #

Ok, tnx. No dma errors found here...

About composite, it really works on your pbook?
_________________
Io credo che le tecnologie siano moralmente neutrali fino a quando non le utilizziamo - William Gibson

LINEE GUIDA DEL FORUM
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Thu Jun 09, 2005 10:18 pm    Post subject: Reply with quote

no dma problems? Maybe there are differences in the hardware even though Apple did not advertise them. I got mine for a really good price right after they came with the new one in February.

Composite works fine for me. At least, when it comes to drawing dropshadows under windows and menus, I have no problems. I see the occasional bug - like failure to completely erase a window when it is closed - but afaik these are problems with the composite extension and not the graphics card driver.

I am not at my powerbook now so I can't give you my config but I just used xorgconfig to configure x.org and then added the lines for enabling the composite extension.
As my wm/de I use xfce4 and I use xcompmgr instead of the composition manager that comes with xfce4 (the xfce4's comp manager doesn't draw shadows under menus).
Back to top
View user's profile Send private message
praveen
n00b
n00b


Joined: 08 Jun 2005
Posts: 43

PostPosted: Fri Jun 10, 2005 8:04 am    Post subject: Reply with quote

Can you post the output of

hdparm -i /dev/hda

and

hdparm /dev/hda

Can you also post your kernel config under

-> Device Drivers
-> ATA/ATAPI/MFM/RLL support
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Sat Jun 11, 2005 11:56 pm    Post subject: Reply with quote

sorry for the slow reply .Here goes:

Code:
# hdparm -i /dev/hda

/dev/hda:

 Model=FUJITSU MHT2060AT, FwRev=009A, SerialNo=NN29T3412UC9
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117210240
 IORDY=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 *mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a:

 * signifies the current active mode

As you can see, it's set to mdma2. I force it from the /sbin/rc script.
Code:
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECD=m
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
CONFIG_BLK_DEV_IDESCSI=m
# CONFIG_IDE_TASK_IOCTL is not set

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_SL82C105 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
# CONFIG_IDEDMA_PCI_AUTO is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y
CONFIG_BLK_DEV_IDE_PMAC_BLINK=y
# CONFIG_IDE_ARM is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_BLK_DEV_HD is not set


I've played quite a bit with the IDE related settings in the kernel config - nothing really helps. Any suggestions are welcome, though.
Back to top
View user's profile Send private message
praveen
n00b
n00b


Joined: 08 Jun 2005
Posts: 43

PostPosted: Tue Jun 14, 2005 11:02 am    Post subject: Reply with quote

You should use the fastest mode available, which is udma5. The kernel should pick this mode. Its not a good idea to use a lower mode.

Try enabling the following options in your kernel.

CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_GENERIC=y
CONFIG_BLK_DEV_SL82C105=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_CMD64X=y
CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y
CONFIG_BLK_DEV_IDE_PMAC_BLINK=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y

I have just pasted this from my own config file.

Then look at the result of

hdparm -i /dev/hda

and

hdparm /dev/hda

and also post it here.
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Tue Jun 14, 2005 4:46 pm    Post subject: Reply with quote

please read my posts. using udma5 leads to dma related failures. the kernel indeed picks udma5 by default and I manually force it down to avoid the problems.
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Tue Jun 14, 2005 5:10 pm    Post subject: Reply with quote

hmmmm,

I had some serious trouble this morning. even my os x would lose the hard drive - by which I mean it stopped seeing the drive in the middle of things as if it got unplugged and the hard drive was not detected at boot time, either. It is very hot over here today which also means that my powerbook running a bit hotter than usual. After cooling down the computer a bit, the hard drive would reappear but the drive kept on 'disappearing'. Well, I disconnected the battery and all of a sudden it's stable again. At least it's stable in os x. I haven't tried linux yet. but maybe it is a bad battery even though I had it replaced during the recent recall. I should talk to Apple. BTW, is it normal that the battery is glued to the cover? I think it's a bit retarded...
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue Jun 14, 2005 9:37 pm    Post subject: Reply with quote

Well, I wouldn't rule out a hardware problem. Random 0x51 errors are often indicative of a dying harddisk, your experience today makes me think that's probably the case. Make backups and talk to Apple. :)

Good luck!
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Wed Jun 15, 2005 3:20 am    Post subject: Reply with quote

yeah,

i'm pretty confident it's not the harddrive b/c I have these dma issues with four different drives that all work fine in my pc laptop - i spent a lot of time opening and closing the powerbook and replacing hard drives. my guess now is something wrong with power management.

thanks for all the suggestions!!
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Wed Jun 15, 2005 7:24 pm    Post subject: Reply with quote

a very cautions update:

I went to the apple store and talked to some "genius" over there and I was told to reset pram and pmu before sending it in for repairs. Well, I did and things seem to be doing better. For one, the powerbook doesn't get as hot as it used to. I am also re-installing gentoo b/c that's a lot of disk activities and I haven't seen errors so far - I would have before. So quite possibly, it was something to do with low level power-management. Hopefully, this has fixed my dma problems - knock on wood...

In any case, given what happened yesterday, the issue doesn't seem to be the linux kernel but something else that os x might generally handle better than linux.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum