From nobody Wed Aug 17 13:39:47 2022 X-Original-To: freebsd-ppc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M78Jv5ynzz4ZTlg for ; Wed, 17 Aug 2022 13:39:59 +0000 (UTC) (envelope-from luporl@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M78Jv5KTjz3Fgx for ; Wed, 17 Aug 2022 13:39:59 +0000 (UTC) (envelope-from luporl@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660743599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2iTMz0WywpfKJo9IPuBVfs/upEZ5um1GgeyY8Jp+eSc=; b=tXp830mOW9c4I6ApuJSpGXtATk6qLDQfDyWqiJUQsdrVdVajOhE+GutNkwFEH//8mT+ZRx RWuL9rB60U12r/yKxsX4uTo0ySPsXVJwu0MSf3qr46o+WDkDB03ymTZNKCVA03KBTDmlPz 0wj8X6eSpCUKPhU2pp1hrksXmV4L6PM3O6C7jfJHNeSR8VnQi4P2Fxg5wfLepIWi1q7/kt MGlYmKzTQ73ZS6g6N+VGPohKmzx3+g50ggi3JkerdyIC70xC2pLqmSH4n7HYHzZv0ABog/ GoiAb0yRjFqUA5dG6xTgg5G9Z3zNhN68KhS1SJyMa+JdJ6tf06e3ExLqeZA2kQ== Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: luporl/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4M78Jv4Dyzz1NND for ; Wed, 17 Aug 2022 13:39:59 +0000 (UTC) (envelope-from luporl@freebsd.org) Received: by mail-pg1-f173.google.com with SMTP id r69so12004399pgr.2 for ; Wed, 17 Aug 2022 06:39:59 -0700 (PDT) X-Gm-Message-State: ACgBeo2BI64CpolKsClxTzjvoX407DPWcKEN2fVCULyY9BpJnJGBUE4P tst3Gvdkds+xsW0oqEdfjZ4OCXUrlLdR6tstTBA= X-Google-Smtp-Source: AA6agR6vJfZIY8qDAV/LDXTOWeRC9Z1gHG9md7RCry/D+kY6FTsDl0Tg9KorMyADGvLPGXlWSWCI9YpSm4Ys1dhaRFI= X-Received: by 2002:a63:81c8:0:b0:429:ea8c:3afa with SMTP id t191-20020a6381c8000000b00429ea8c3afamr243162pgd.22.1660743598371; Wed, 17 Aug 2022 06:39:58 -0700 (PDT) List-Id: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ppc@freebsd.org X-BeenThere: freebsd-ppc@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: luporl Date: Wed, 17 Aug 2022 10:39:47 -0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: X color issues on PowerMac G5 To: Jasper Vinkenvleugel Cc: "freebsd-ppc@FreeBSD.org" Content-Type: multipart/alternative; boundary="0000000000003e783105e6700019" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660743599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2iTMz0WywpfKJo9IPuBVfs/upEZ5um1GgeyY8Jp+eSc=; b=hHj8iWg02Eyhko3MqD/M45Pu7yXTUm/SXNvTlOpEAZrBHD8LDQO38RzN1cdHaOnKBcETLN DXRSDABRiduIYbg4if59m3MARc1cTDcQMP+8un53l4mAK/P+3PkiIPWDXshX7JekTrrC1Z orSw0nLKnWVQlRq0SCDLphnW4dPz2vWPXz8kB2v8Jc+wgTGzTCIc6lZmgKYqD8v7tIDA68 QYTvFKE3x5H6HdK9D3OXiKwznWWu7hwCq+NBmrXQ+weyRRL0Ka36QXK6VBoxK7Zm4EMwGh /vWSsZ/iYVf6k6cHMTdaJ+1rmYUjGpgWRkY+ZyUg6xBX/3BrbNai7faXkAdieg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660743599; a=rsa-sha256; cv=none; b=usyUGDj2PcahS2ySSkGohRXZxJpbar2JObu7K6ejd/Cv8DoHJIJE9ayEyjalgBX2gMNba8 Nkdvk+jPF20K827/DhQqKnf7FmDBDgIyJ4SKtFzIVe6J/+Vl/mSM7WGA5AAo+RMqYAPqX+ DbAtiK2L53c1bb1Db2gi0N7NDTvylnVYJSDAlpbv6cBNPiNNv5z/P1mTdG4qGjvaAqoBFi C4XyCYvx2l3nyAP3uZgxKRir2HRZ9lE1sSaVvdzSZc8f0TdeVP2SDGaLM8y+8FbSaSsLb8 y3OOjrayNvNOR+n4xRAErXgKYlgLu3EC5c7zNJ2BY+EbyQ8Ii339SYcZ4gqMQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --0000000000003e783105e6700019 Content-Type: text/plain; charset="UTF-8" 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 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 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 >>> >>> >>> > --0000000000003e783105e6700019 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Tue, Aug 16, 2022 at 5:16 PM Jasper Vi= nkenvleugel <j.t.vinkenvl= eugel@proton.me> wrote:
Hello,
=

Thank you for your quick reaction and sorry = for my late response!

I'm usin= g the OFWFB kernel driver, yes. I just compiled and installed the 14.0-CURR= ENT kernel (on which I run the 13.1 userland) and afterwards I updated my v= ersion 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 Vinkenvleuge= l

Hello,

I think installkernel doesn't install syste= m header files.
Can you attach your /var/log/Xorg.0.log and /usr/include= /sys/fbio.h files?

this part=C2=A0couldn't be merged to 13.1, because it changes s= truct fb_info.

Regard= s,
Leandro=C2=A0


<= div>
=20
------- Original Message -------
On Friday, July 29th, 2022 at 14:40, luporl <luporl@freebsd.org> wrote:
<= br>
I just remembered that one of the fixes of OFW= FB driver wasn't backported to 13.1-RELEASE, because it introduced a ne= w 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 ker= nel.

On Fri, Jul 29, 2022 at 9:28 AM luporl <lupo= rl@freebsd.org> wrote:
Hello Jasper,

I'm ass= uming colors are already ok on console, so that's a good start.
The color-related issues you're seeing with X are probably being cau= sed by using a graphics card with a Little-Endian framebuffer on a CPU that= is Big-Endian.

But indeed, even in this case, col= ors 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 ch= eck that with:
dmesg | grep "VT(ofwfb)".

=
Next, make sure you are using xf86-video-scfb version 0.0.7, tha= t has the fix for the color issues.

Finally, if yo= u have issues with Xorg Server (it used to crash in some cases on PPC64 wit= h 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&#= 39;ll need to get patch-hw_xfree86_common_xf86Helper.c and patch-render_pic= ture.c from https://peo= ple.freebsd.org/~luporl/gfx_patches/xorg-server/, copy them the to '= ;files' directory of xorg-server in ports tree, rebuild and reinstall i= t.
If you have this last issue, please let us know and we can req= uest these 2 patch files to be included in FreeBSD's xorg-server port&#= 39;s patches, to make this easier for other users, while FreeBSD is still u= sing 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 i= ncorrectly.

Recently I bought a PowerMac G5 with the intent of getting FreeB= SD 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 examp= le in TWM all white surfaces are red. On the wiki I read about color-relate= d issues with Blackbird and Talos II with the onboard graphics card and I w= onder 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 reg= ards,

Jasper Vinkenvleugel



--0000000000003e783105e6700019--