Re: X color issues on PowerMac G5

From: luporl <luporl_at_freebsd.org>
Date: Fri, 29 Jul 2022 12:40:02 UTC
I just remembered that one of the fixes of OFWFB driver wasn't backported
to 13.1-RELEASE, because it introduced a new ioctl and also changed a
struct.
So, besides the previous steps, you may also want to try to use a -CURRENT
kernel, or apply https://reviews.freebsd.org/D29000 and rebuild
13.1-RELEASE kernel.

On Fri, Jul 29, 2022 at 9:28 AM luporl <luporl@freebsd.org> wrote:

> Hello Jasper,
>
> I'm assuming colors are already ok on console, so that's a good start.
> The color-related issues you're seeing with X are probably being caused by
> using a graphics card with a Little-Endian framebuffer on a CPU that is
> Big-Endian.
>
> But indeed, even in this case, colors should work fine on PowerPC64
> machines, such as Blackbird, Talos II and probably G5, running in
> Big-Endian mode.
> AFAIK, this was tested only with OFWFB kernel driver. Is this the one
> you're using? You can check that with:
> dmesg | grep "VT(ofwfb)".
>
> Next, make sure you are using xf86-video-scfb version 0.0.7, that has the
> fix for the color issues.
>
> Finally, if you have issues with Xorg Server (it used to crash in some
> cases on PPC64 with the color fixes in OFWFB and SCFB), if you're using
> version 1.20.x or older, you may need to patch it and rebuild it from ports.
> You'll need to
> get patch-hw_xfree86_common_xf86Helper.c and patch-render_picture.c from
> https://people.freebsd.org/~luporl/gfx_patches/xorg-server/, copy them
> the to 'files' directory of xorg-server in ports tree, rebuild and
> reinstall it.
> If you have this last issue, please let us know and we can request these 2
> patch files to be included in FreeBSD's xorg-server port's patches, to make
> this easier for other users, while FreeBSD is still using 1.20.x.
>
> Cheers,
> Leandro
>
> On Fri, Jul 29, 2022 at 4:18 AM Jasper Vinkenvleugel <
> j.t.vinkenvleugel@proton.me> wrote:
>
>> Hello,
>>
>> Please excuse me if I'm using this mailing list incorrectly.
>>
>> Recently I bought a PowerMac G5 with the intent of getting FreeBSD
>> 13.1-RELEASE powerpc64 running on it. So far so good, but when I want to
>> use X on the Nvidia FX 5200 Ultra the colors are completely off. For
>> example in TWM all white surfaces are red. On the wiki I read about
>> color-related issues with Blackbird and Talos II with the onboard graphics
>> card and I wonder if similar problems might be going on here? The only
>> other pointer I can find is 'scfb: LoadPalette 0' being spammed in the
>> console.
>>
>> Kind regards,
>>
>> Jasper Vinkenvleugel
>>
>>
>>