From nobody Fri Jul 29 12:40:02 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 4LvRtk4jWKz4X3GW for ; Fri, 29 Jul 2022 12:40:14 +0000 (UTC) (envelope-from luporl@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4LvRtk4FpNz44Kp for ; Fri, 29 Jul 2022 12:40:14 +0000 (UTC) (envelope-from luporl@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659098414; 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=rlwI+ka6yjc1+gXkWa79cogIiJlL9sy0nWVH4nC0R6g=; b=XpQhdlTdoi2w012qoTsTTiHPTcR2G5RTUtcRv1BCyhWgWBAVaflu9GRNPLLu2hTyWqbcgA Ua50OqC6vlmMZRBDDSZiw9zvpibvUREY/dLdWVShDi/1xDWlK2THKw20mV7u8MuwVcLhQA t+1C1y0ue9VE8qHElQXAvFOyHWVeqwtQ2po6jRCN0yDl+JGaXZy9b4kgunsAPyRlthixsH H6i/9u+wIfN7rYB4/RPC6T2FFmJeytuZ6D8tqfIDcx9kbYEq0mCqLDaqaOVsWJWLU5qvRB 5Cy3K0Gi4CipGFktOuy+kbERZr+5fTtGEJpfLm6IQYL7pVcXCQ3Sh6NQP+s73g== Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (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 4LvRtk3CLjzm9G for ; Fri, 29 Jul 2022 12:40:14 +0000 (UTC) (envelope-from luporl@freebsd.org) Received: by mail-pj1-f49.google.com with SMTP id 15-20020a17090a098f00b001f305b453feso8301245pjo.1 for ; Fri, 29 Jul 2022 05:40:14 -0700 (PDT) X-Gm-Message-State: ACgBeo1WYMWAAPqccjXL25jgua6+OaVLy9cXE4jlC+2iogy+or6Z4EQI I74H3v6mjIu5GwyQUmFAyYuTItDvsUw6OeZwYmU= X-Google-Smtp-Source: AA6agR5AugxSceTPLO+gGNBw3baV+WPc9Y8Ibs1GNW4w3WpBIKFXbiZJFi2VUL9GWo+KThOKubaJBbWnnQ/bOnbH3F4= X-Received: by 2002:a17:90b:3ec5:b0:1f0:500d:60c3 with SMTP id rm5-20020a17090b3ec500b001f0500d60c3mr4548298pjb.183.1659098413435; Fri, 29 Jul 2022 05:40:13 -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: Fri, 29 Jul 2022 09:40:02 -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="00000000000094907d05e4f0f3cf" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659098414; 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=rlwI+ka6yjc1+gXkWa79cogIiJlL9sy0nWVH4nC0R6g=; b=mKhr1tAxeofo5iE+IR5E5ChEjIEvk8QF+tsJN8OhEqBMUEOXxOFRx2XoI669MCHVC1MdPG 0Byj57t/JBm6vG93Ds1RL9TKTXSKD57fLV0HoWNyME28Bl+2oTCJyxgTn1hb38DgHQV725 jTOEtnBmhXG/0Hac5RoDbafRaTIPxXyDm1zVZnR3tqKEGELWQ16EG3ESTHBVDFCiQsnNO9 jjmVdqmyc8KZqimg1aE97G2ZM28Z61hbez2ssfysNIQv6A8B2WXGzvgObPZN9BNlO8CP+Z Tj4qSUtDJfetjJS5VkC1LNRGymG2k12puIN62edTeZ/yzOBJcfUUfH68eenKoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659098414; a=rsa-sha256; cv=none; b=t2S/jwcZxjWtt9TbC8V6+UE39sRNWJF5fnEm0noHqCa2k9dznA1J+Q1vp5ZWYo4wo9oB5Z YujPsZ5Ea5pFhCXWkNg4iblJiFPXAzSyLytJHKGdYOzSGoRmG216Jo9U3SPqzHqj4L9Hu3 g/be0zIb6goEyaIPx6crVKXDrYgfzbYJiCrGoNG8+vYzxfSciJzemrfJfNbNaydXXJkm9T 78YfjiSPeW5aNpC7BZuOAWWsceDhpNB7j4Y5z9FdqtgowuMQCtlBywOmT3dFSQz0KipYZ9 YfYWxlpg76rVadncH+W0nEdJM08Y+7h4fUlhYtKzF0zed4nYaRjr/3pSEmIumw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --00000000000094907d05e4f0f3cf Content-Type: text/plain; charset="UTF-8" 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 >> >> >> --00000000000094907d05e4f0f3cf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I just remembered that one of the fixes of OFWFB driver wa= sn'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 wan= t to try to use a -CURRENT kernel, or apply=C2=A0https://reviews.freebsd.org/D29000 and rebuild 13.= 1-RELEASE kernel.

On Fri, Jul 29, 2022 at 9:28 AM luporl <luporl@freebsd.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
Hello Jas= per,

I'm assuming colors are already ok on console, = so that's a good=C2=A0start.
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 m= achines, such as Blackbird, Talos II and probably G5, running in Big-Endian= mode.
AFAIK, this was tested only with OFWFB kernel driver. Is t= his the one you're using? You can check that with:
dmesg | gr= ep "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 an= d rebuild it from ports.
You'll need to get=C2=A0patch-hw_xfr= ee86_common_xf86Helper.c=C2=A0and=C2=A0patch-render_picture.c from https://people.freebsd.org/~luporl/gfx_patches/xorg-server/, co= py them the to 'files' directory of xorg-server in ports tree, rebu= ild 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.vinkenvleug= el@proton.me> wrote:
Hello,

Please excuse me if I'm using this mailing list incorrectly.

Recentl= y I bought a PowerMac G5 with the intent of getting FreeBSD 13.1-RELEASE po= werpc64 running on it. So far so good, but when I want to use X on the Nvid= ia FX 5200 Ultra the colors are completely off. For example in TWM all whit= e surfaces are red. On the wiki I read about color-related issues with Blac= kbird and Talos II with the onboard graphics card and I wonder if similar p= roblems might be going on here? The only other pointer I can find is 's= cfb: LoadPalette 0' being spammed in the console.

Kind regards,

Jasper Vinkenvleu= gel


--00000000000094907d05e4f0f3cf--