From nobody Mon Aug 29 21:30:13 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 4MGkBB5Bt3z4ZlwP for ; Mon, 29 Aug 2022 21:30:26 +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 4MGkBB53Lxz3llP for ; Mon, 29 Aug 2022 21:30:26 +0000 (UTC) (envelope-from luporl@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661808626; 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=HY43EELnZ6gx9RT9/bavMjhKdWMj3STlhQwcd5ituwg=; b=G4M106cJvWB6ZFQpdUCwSvVwbxAlwlckh22QDU5wBMDtRbEAZK7H+VcK3/j/RQTuh3WLd3 6HCJi02y2rILQWDdhfhUL5wrigibY6ANSKMuDdjwz5jlytWbuW78s4Z+ZDXAWW4M1SXnPE sAJyLtdT9x4S5L8GITH94XLdkQ0WxYqsjgW6NIKtDPe1oU8aMLb8wtqTA5JLAP72rci0cE mAiPNrbmc0BHyCjYaC/2fIR0IsxhM2BIpCsMKrte6ciTxvftWsTwz1242fhD3r0KyTDtIz rMOqGCO9v/hJOnjwkLpw48J6ejo4UsvhGbdG7bOibn8PQ98qVx+olTvQ0dB0/Q== Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (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 4MGkBB3vgLz1KRb for ; Mon, 29 Aug 2022 21:30:26 +0000 (UTC) (envelope-from luporl@freebsd.org) Received: by mail-pj1-f48.google.com with SMTP id j9-20020a17090a3e0900b001fd9568b117so6268973pjc.3 for ; Mon, 29 Aug 2022 14:30:26 -0700 (PDT) X-Gm-Message-State: ACgBeo2QAYQajJJqSL7coGv4E0M/xazT0oxg9AodhTkzpeAnablczOxG v4UUzzXRlyyGbGQMrJnF3VE0zDhR3foa8QXXVZo= X-Google-Smtp-Source: AA6agR4FrNyYUAtS7A4Zk5wp9SWLHAA9Sz412TyCcf+Stdz/RHui6lZKzeFKW+6FsySAf5VteqXx05ACGm8Q+iAOoTg= X-Received: by 2002:a17:90b:3d8b:b0:1fb:6f72:3f8f with SMTP id pq11-20020a17090b3d8b00b001fb6f723f8fmr20564673pjb.125.1661808625495; Mon, 29 Aug 2022 14:30:25 -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: <5FAcTN78lF7Ahg2aMFUDIbxxgvRQWCw8lPb0gJClXucGCrrfXK79oZcOqmqN2RWCUm2bozjg3aJyTUf4Htra-d4KDsMkj4j9E6qkvP1_wkI=@proton.me> In-Reply-To: <5FAcTN78lF7Ahg2aMFUDIbxxgvRQWCw8lPb0gJClXucGCrrfXK79oZcOqmqN2RWCUm2bozjg3aJyTUf4Htra-d4KDsMkj4j9E6qkvP1_wkI=@proton.me> From: luporl Date: Mon, 29 Aug 2022 18:30:13 -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="000000000000ceb69c05e767f88f" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661808626; 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=HY43EELnZ6gx9RT9/bavMjhKdWMj3STlhQwcd5ituwg=; b=dP9KvTqADQmR7YBYTTrtbbGPKei2ZzsH48V31bDmoLEuRLacYTgDmneYVfM6kg9At8yrVY WTC5MtFGNP8XGaY+sbGincSCU5k6PjArh5nudvHKzK4UycCUC5+oIMznXOTOfrYA9Kh2tW jgjzAwZTV9iDxBx/+crG84HjeeCHU9UcVFERhb0GjcNFkLK+7OG+0CHo9Mfw87ECIBXTxr TgOkZpYtDXsqTg37NREHvThlOihhtX4bBM1mV0PwpkHVVIoZ8lKoThA+pb7iQMWiUoUVHY LYxPVJ4DjujsFodkNERmOdgAalqeufVqb7FZF+lCUyn30db3QyiyK8ao383kUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661808626; a=rsa-sha256; cv=none; b=Ge2hJtpbvCd1YYrj8gxrEc6GTPAMHJB0DGsG33VvxLRomM2qOllKAHFsimxceWsnV4vd66 IzyhTvL7+bfINS3DA/mIXErPPYy/lrQWuBx+p3OLLtHgX4Hw5Ixs5z8eK7xoWdXymDvUSt aJer/SnrkhkHxVh0ifid6gjpijPggLCyVzQGuCbAnb230qxGsehJqOB1x9o2J8OVNu5MVN iijO5+w0vPRgSRzM53dHhio6nfCknawuh0oA3lVaveTNSuSUCrzZpCcK06QfVbWMpDzGAP KrhjeMkFT59nxIzeayh8FwAFZHj7Jk7ZlTQ1oX+Xc/+6oiqVJ2xAriBtdQCw0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --000000000000ceb69c05e767f88f Content-Type: text/plain; charset="UTF-8" Hello, Your log file reports you are using an 8-bit color depth, but scfb only sets the RGB masks/offsets when depth is greater than 8. You can try to change X config to force the use of 24-bit color depth (hoping that the framebuffer exported by your OpenFirmware allows that. The depths supported by your adapter/firmware can be found somewhere in your device tree, with a tool like ofwdump). Using 14-CURRENT userspace wouldn't help much in this case, at least for now. If you are able to get X running with 24-bit color depth, then you would just need to confirm you are really using xf86-video-scfb version 0.0.7. (The log is reporting 0.0.5, but it looks like the version string wasn't updated since 0.0.5). If needed, the newer port and source versions can be found here: - https://github.com/freebsd/freebsd-ports/tree/main/x11-drivers/xf86-video-scfb - https://github.com/rayddteam/xf86-video-scfb Regards, Leandro On Sat, Aug 27, 2022 at 9:28 AM Jasper Vinkenvleugel < j.t.vinkenvleugel@proton.me> wrote: > 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 > 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 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 >>>> >>>> >>>> >> > --000000000000ceb69c05e767f88f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

Your log file reports you are us= ing an 8-bit color depth, but scfb only sets the RGB masks/offsets when dep= th is greater than 8.
You can try to change X config to force the= use of 24-bit color depth (hoping that the framebuffer exported by your Op= enFirmware allows that.
The depths supported by your adapter/firm= ware can be found somewhere in your device tree, with a tool like ofwdump).=

Using 14-CURRENT userspace wouldn't help much= in this case, at least for now.
If you are able to get X running= with 24-bit color depth, then you would just need to confirm you are reall= y using xf86-video-scfb version 0.0.7.
(The log is reporting 0.0.= 5, but it looks like the version string wasn't updated since 0.0.5).<= div>If needed, the newer port and source versions can be found here:
<= div>- https://github.com/freebsd/freebsd-ports/tree/main/x1= 1-drivers/xf86-video-scfb

Regards,
Leandro

<= div>


On Sat, Aug 27, 2022 at 9:28 AM Jasper Vinken= vleugel <j.t.vinkenvleuge= l@proton.me> wrote:
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 c= ontain it). Then I recompiled xf86-video-scfb, but unfortunately I still ge= t the same result. I have attached the log.

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

Kind regards,

Jasper Vinkenvleuge= l
------- 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@pr= oton.me> wrote:
Hello,

Thank you for your quick reaction and sorry for my l= ate response!
I'm using the OF= WFB kernel driver, yes. I just compiled and installed the 14.0-CURRENT kern= el (on which I run the 13.1 userland) and afterwards I updated my version o= f 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 proble= m 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 couldn't be merged to 13.1, because it changes struct fb_i= nfo.

Regards,
Lean= dro


------- Original Message -------
On Friday, July 29th, 2022 at 14:40, luporl <l= uporl@freebsd.org> wrote:

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




--000000000000ceb69c05e767f88f--