Bug 271826 - FreeBSD is disastrously slow on a PowerMac G5, freezing at every command
Summary: FreeBSD is disastrously slow on a PowerMac G5, freezing at every command
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 13.2-RELEASE
Hardware: powerpc Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-qa, performance
Depends on:
Blocks:
 
Reported: 2023-06-04 21:00 UTC by Sergey Fedorov
Modified: 2024-05-24 11:21 UTC (History)
6 users (show)

See Also:


Attachments
An instance of USB errors (27.69 KB, image/jpeg)
2023-06-05 09:17 UTC, Sergey Fedorov
no flags Details
USB error upon intro screen load (50.12 KB, image/jpeg)
2023-06-05 09:24 UTC, Sergey Fedorov
no flags Details
USB errors when booting (resolution fixed) (353.86 KB, image/jpeg)
2023-06-05 09:27 UTC, Sergey Fedorov
no flags Details
USB error upon intro screen load (265.47 KB, image/jpeg)
2023-06-05 09:28 UTC, Sergey Fedorov
no flags Details
Booted system on PMG5 2.3 (320.33 KB, image/jpeg)
2023-06-05 09:34 UTC, Sergey Fedorov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Fedorov 2023-06-04 21:00:03 UTC
Something is seriously wrong with FreeBSD implementation for PowerPC: it is practically unusable as of now, freezing for more than a minute at every input. Same behavior during installation and with installed system. Pattern is consistent: you have a 1–2 seconds to type something or make a selection in a menu, then everything freezes, after half a minute fans go high speed, that condition lasts for another minute, then fans go back to normal, and system unfreezes. It is not occasional, but happens literally at every window during installation and every text command in the terminal.

Installation process is rather buggy and super-fragile too: I had random quits in the middle a number or times; in the beginning when installer boots, sometimes there are numerous USB-related errors, but sometimes they are skipped.

I have tried it on two PowerMacs, both reasonably fast (G5 Quad 16 GB RAM SSD, G5 2.3 DC 9 GB RAM SSD) – in MacOS I use them daily for development without any pain. I also tried using HDD instead of SDD – nothing changed. Quad has ATI GPU installed, while 2.3 has NVidia, if that matters.

I wanted to have FreeBSD as a second system to work on improvement of Macports support for it (so that I can test my ports not only in MacOS but also in FreeBSD). Hope someone can help to sort this issue out.

P. S. I am aware PowerPC is Tier II support, but this is a matter of system simply being usable or not at all. It obviously should not be the case that it takes several minutes to type in login and password with freezes every few letters typed.
Comment 1 Warner Losh freebsd_committer freebsd_triage 2023-06-04 22:23:46 UTC
Is a -current snapshot any better? Does 12.x work any better?
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2023-06-05 00:47:51 UTC
(In reply to Sergey Fedorov from comment #0)

How are the HDD(s) and SSD(s) connected?

> … when installer boots, sometimes there are numerous USB-related errors, 
> but sometimes they are skipped. …

In the absence of a photograph, I might assume hardware issues.
Comment 3 Sergey Fedorov 2023-06-05 09:17:48 UTC
Created attachment 242607 [details]
An instance of USB errors
Comment 4 Sergey Fedorov 2023-06-05 09:19:03 UTC
(In reply to Graham Perrin from comment #2)

I do not think so, since it happens on two different machines which otherwise work perfectly fine.
However I add a pic now of USB-related issues.

Please notice those are not central to the matter though. Freezing happens regardless.
Comment 5 Sergey Fedorov 2023-06-05 09:24:02 UTC
Created attachment 242608 [details]
USB error upon intro screen load

This happened 2–3 times out of numerous install attempts. I.e. not consistent, nevertheless did happen on both machines.
Comment 6 Sergey Fedorov 2023-06-05 09:25:00 UTC
I will re-upload pics, compression killed them. Sorry.
Comment 7 Sergey Fedorov 2023-06-05 09:27:02 UTC
Created attachment 242609 [details]
USB errors when booting (resolution fixed)
Comment 8 Sergey Fedorov 2023-06-05 09:28:50 UTC
Created attachment 242610 [details]
USB error upon intro screen load
Comment 9 Sergey Fedorov 2023-06-05 09:34:32 UTC
Created attachment 242611 [details]
Booted system on PMG5 2.3

Installed and booted system on PowerMac G5 2.3 DC. No errors on boot, but it was badly freezing even when entering login/password and every other command.
Comment 10 Sergey Fedorov 2023-06-05 09:41:00 UTC
(In reply to Graham Perrin from comment #2)

> How are the HDD(s) and SSD(s) connected?

Native SATA bus connection. I.e. not a PCIe card, FW drive or anything else non-default.
SSD were a direct replacement for HDDs. The PowerMac where I had FreeBSD installed now has HDD in upper bay which is used for FreeBSD (I moved macOS onto SSD).
Comment 11 Sergey Fedorov 2023-06-05 09:44:23 UTC
(In reply to Warner Losh from comment #1)

I don’t have spare DVDs around to check that. Is there a way to make install image recognizable from a FW drive? That works fine for MacOS installation, but I could not get it work for FreeBSD. USB drive might be an option too, late PowerMacs support USB booting, unofficially.
Comment 12 drk 2023-06-06 00:54:24 UTC
In attempting to install FreeBSD on PPC I found that utilizing the 13.2 DVD iso with a G5 1.8 Ghz single processor and Nvidia FX5200, the install was smooth and rapid, working nicely in text mode (but no success on the graphic side). Moving forward I attempted an install of 13.2 on my favored device, a G5 1.8 Ghz dual processor with an ATI 9600XT card, but the install was painfully slow... marginal graphic support (card is "supported"). So not to be thwarted, I pulled out my last remaining G5, an identical G5 dual 1.8 with the 9600 card and attempted the same install... once again, the process was incredibly slow with the same outcome observed as with the first dual. Just to confirm my suspicion, I wiped the drive on the original G5 single processor and began an install. Once again, with the single, the process was quick and smooth.  So basically I found 13.2 very workable on a G5 single.  However, it has been my experience and that of others that install on a multiprocessor PPC is exceedingly challenging and as noted by opening poster renders 13.2 essentially unusable on these devices.
Good news:  Swapping in a 9600Xt card into the G5 single has yielded fully functional FreeBSD on PPC.
Bad news:  13.2 would currently seem to be a no go on the multiprocessor devices.
Hopeful that this may addressed and remedied to some extent.
P.S.  all drives standard HDD.
Comment 13 Justin Hibbits freebsd_committer freebsd_triage 2023-06-12 15:06:21 UTC
Does 13.1 work on multiprocessor/multicore G5 machines?  Unfortunately my FreeBSD G5 died 5 years ago, so I haven't been able to maintain the G5 at all, I've been using only the Power9.

I recommend testing 12.x (latest), 13.1, and 13.0 (if 13.1 is slow).  That could help narrow down when the slowdown occurred.
Comment 14 Mitch 2023-08-05 20:19:16 UTC
(In reply to Justin Hibbits from comment #13)
To answer your question I've tried several release on my PowerMac G5 Quad (PowerMac 11,2 with pcie bus) using the DVD drive.

Here are the results

12.4 Boots and installs just fine.

13.0 Kernel loads but painfully slow, very similar behaviour to Sergey's issue.
Loads normally until "Root mount waiting for: usbus2" then fans are roaring and takes forever to get to the Install menu.

13.1 Pretty much the same as 13.0, except even worse as it simply reboots on its own from time to time.

13.2 Doesn't load at all, Black screen with fans roaring immediately.

14.0 Latest Snapshot, Same observation as 13.2.

According to what I've seen, the Toolchain/ABI starting with release 13 has departed from GCC4 which makes it even more red herring.

It would be really awesome to get a PPC970/MP functional 64bit release with modern toolchain ! 

I'd like to help testing/troubleshooting as I fear this is the latest opportunity we have until this platform fall into oblivion. 

Cheers,

Michael
Comment 15 Sergey Fedorov 2023-08-05 20:26:50 UTC
(In reply to Mitch from comment #14)

Thank you very much for testing!

P. S. It would be great if someone could address this and fix in the current master of FreeBSD.

There are many people using PowerPCs, and it remains the only affordable/accessible option for the most end-users as well as developers. Given that other realizations of BSD apparently are fine, it is certainly not something unfixable.
Comment 16 Sergey Fedorov 2023-12-19 06:08:58 UTC
Any update on the matter from PowerPC port maintainers?

We have FreeBSD working on G4 but broken on G5, this is very upsetting.
Comment 17 Sergey Fedorov 2024-02-15 04:50:23 UTC
FreeBSD 14 (ppc 32-bit) does not boot on G5 at all. Tries to load in OF, then quits. (I have probably not tried 13.x ppc on G5, not sure if that one works. Initial report was about ppc64 version.)
Comment 18 Denis Ahrens 2024-04-25 12:53:22 UTC
I can confirm this behaviour. I had a fine running FreeBSD 12 test disk which I nulled to try the latest stuff (14). But the 14 installer (RELEASE and STABLE from 18th of April) is so slow that it is impossible to use.
Comment 19 Denis Ahrens 2024-04-25 14:27:14 UTC
can also confirm now that 12.4 is installing and running fine on a dual g5 powermac.
Comment 20 Justin Hibbits freebsd_committer freebsd_triage 2024-05-01 13:57:57 UTC
(In reply to Sergey Fedorov from comment #15)

Unfortunately I think the number of committers with PowerMac G5 hardware supporting FreeBSD is dwindling as the machines age.  My only G5 that ran FreeBSD died back in 2018, so I'm unable to do anything significant for it.

That said, I'll support as best as I can.

Regarding the "USB error upon intro screen load" that's often solved by unplugging/plugging the device (happens all the time with one of my FTDI debuggers), not a problem with FreeBSD itself.

The "Root mount waiting for usbus2", unless you have root on USB you can try setting the hw.usb.no_boot_wait tunable; it looks like usbus2 is having enumeration problems (just a guess).

For 13.x performance, you can try testing a commit before, and after, c583b02587 (PowerMac timebase sync for G4), which should be a nop for G5, but might not be.  Other possibilities are pmap related (superpage support was added in the 13 timeframe, I believe).
Comment 21 Denis Ahrens 2024-05-24 11:21:03 UTC
If anyone can build a kernel without c583b02587 to test I can try that. Since 12.4 has not even working packages anymore I can't do anything.