Re: X color issues on PowerMac G5

From: Jasper Vinkenvleugel <j.t.vinkenvleugel_at_proton.me>
Date: Sat, 27 Aug 2022 12:28:22 UTC
Hello,

My original fbio.h did not have FBIO_GETRGBOFFS so I replaced it with the one from my source tree (which I confirmed does contain it). Then I recompiled xf86-video-scfb, but unfortunately I still get the same result. I have attached the log.

Would it make more sense to get a 14-CURRENT CD and install that? Unfortunately compiling a lot of software from source is not a very nice experience as my G5 only has a single-processor single-core 970FX.

Kind regards,

Jasper Vinkenvleugel
------- Original Message -------
On Wednesday, August 17th, 2022 at 15:39, luporl <luporl@freebsd.org> wrote:

> On Tue, Aug 16, 2022 at 5:16 PM Jasper Vinkenvleugel <j.t.vinkenvleugel@proton.me> wrote:
>
>> Hello,
>>
>> Thank you for your quick reaction and sorry for my late response!
>>
>> I'm using the OFWFB kernel driver, yes. I just compiled and installed the 14.0-CURRENT kernel (on which I run the 13.1 userland) and afterwards I updated my version of xf86-video-scfb to 0.0.7. Unfortunately this did not seem to fix my issue, as I'm still getting the same output I got previously. Is it a problem that I'm still using the 13.1 userland?
>>
>> Kind regards,
>>
>> Jasper Vinkenvleugel
>
> Hello,
>
> I think installkernel doesn't install system header files.
> Can you attach your /var/log/Xorg.0.log and /usr/include/sys/fbio.h files?
>
> If your fbio.h file doesn't have FBIO_GETRGBOFFS in it, then xf86-video-scfb won't try to call this ioctl.
> In this case, you would need to backup the original fbio.h file, replace it with the one from -CURRENT and rebuild scfb.
> After that, you may restore the original file, if needed.
>
> This is a workaround, but unfortunately this part couldn't be merged to 13.1, because it changes struct fb_info.
>
> Regards,
> Leandro
>
>> ------- Original Message -------
>> On Friday, July 29th, 2022 at 14:40, luporl <luporl@freebsd.org> wrote:
>>
>>> 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