Date: Mon, 29 Aug 2022 18:30:13 -0300 From: luporl <luporl@freebsd.org> To: Jasper Vinkenvleugel <j.t.vinkenvleugel@proton.me> Cc: "freebsd-ppc@FreeBSD.org" <freebsd-ppc@freebsd.org> Subject: Re: X color issues on PowerMac G5 Message-ID: <CAC7XEc%2BPSdtiefLCUuOcuCfnTEL_JK9Yf0BjJrHHcSshkkC8nw@mail.gmail.com> In-Reply-To: <5FAcTN78lF7Ahg2aMFUDIbxxgvRQWCw8lPb0gJClXucGCrrfXK79oZcOqmqN2RWCUm2bozjg3aJyTUf4Htra-d4KDsMkj4j9E6qkvP1_wkI=@proton.me> References: <w5OwKtaH01Zy5d90DZ6ZZeJogilFHy89YRuNJeburRu8RFr92Yn2hyQnhNyi1sUUSUjnLzCn-oGedUJjzxtpUcwQoM9bzfhuHrlA1XJXtaU=@proton.me> <CAC7XEc%2Bczoc%2BqFS8jDSS6SifLZM2iM9SvfYRrm=J5Yy-6YGHAg@mail.gmail.com> <CAC7XEcJdusFTr6Mm6z4Vb2g9JBifHQCHjpw0Q3cwHpYOf0x9uA@mail.gmail.com> <qAVD8hJdkZpPf2Gk7ehdfejoVLH2gkyOtqfsh12AjEVML787yDsebwwuZrrMXYaXTgkIz9vdHfzcEMpbZsTJhXEepndw9YS8LmOV2kGtobQ=@proton.me> <CAC7XEcKf9BbBFKaK=qXvNwyz=u96BYrjX%2B-s6YG2J=fTsPzQpg@mail.gmail.com> <5FAcTN78lF7Ahg2aMFUDIbxxgvRQWCw8lPb0gJClXucGCrrfXK79oZcOqmqN2RWCUm2bozjg3aJyTUf4Htra-d4KDsMkj4j9E6qkvP1_wkI=@proton.me>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <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 >>>> >>>> >>>> >> > --000000000000ceb69c05e767f88f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hello,<div><br></div><div>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.</div><div>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.</div><div>The depths supported by your adapter/firm= ware can be found somewhere in your device tree, with a tool like ofwdump).= </div><div><br></div><div>Using 14-CURRENT userspace wouldn't help much= in this case, at least for now.</div><div>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.</div><div>(The log is reporting 0.0.= 5, but it looks like the version string wasn't updated since 0.0.5).</d= iv><span class=3D"gmail-pl-c1"><span class=3D"gmail-pl-pds"></span></span><= div>If needed, the newer port and source versions can be found here:</div><= div>- <a href=3D"https://github.com/freebsd/freebsd-ports/tree/main/x11-dri= vers/xf86-video-scfb">https://github.com/freebsd/freebsd-ports/tree/main/x1= 1-drivers/xf86-video-scfb</a></div><div>- <a href=3D"https://github.com/ray= ddteam/xf86-video-scfb">https://github.com/rayddteam/xf86-video-scfb</a><br= ></div><div><br></div><div>Regards,</div><div>Leandro</div><div><br></div><= div><br></div><div><br></div></div><br><div class=3D"gmail_quote"><div dir= =3D"ltr" class=3D"gmail_attr">On Sat, Aug 27, 2022 at 9:28 AM Jasper Vinken= vleugel <<a href=3D"mailto:j.t.vinkenvleugel@proton.me">j.t.vinkenvleuge= l@proton.me</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding= -left:1ex"><div style=3D"font-family:Arial;font-size:14px">Hello,</div><div= style=3D"font-family:Arial;font-size:14px"><br></div><div style=3D"font-fa= mily:Arial;font-size:14px">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.</div><div style=3D"font-family:= Arial;font-size:14px"><br></div><div style=3D"font-family:Arial;font-size:1= 4px">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.<br></div><div = style=3D"font-family:Arial;font-size:14px"><br></div> <div style=3D"font-family:Arial;font-size:14px"> <div> <div>Kind regards,<br></div><div><br></div><div>Jasper Vinkenvleuge= l<br></div> </div> </div><div> ------- Original Message -------<br> On Wednesday, August 17th, 2022 at 15:39, luporl <<a href=3D"mai= lto:luporl@freebsd.org" target=3D"_blank">luporl@freebsd.org</a>> wrote:= <br><br> <blockquote type=3D"cite"> <div dir=3D"ltr"><div dir=3D"ltr"><br></div><div class=3D"gmail= _quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Aug 16, 2022 at 5:16 = PM Jasper Vinkenvleugel <<a rel=3D"noreferrer nofollow noopener" href=3D= "mailto:j.t.vinkenvleugel@proton.me" target=3D"_blank">j.t.vinkenvleugel@pr= oton.me</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"= margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef= t:1ex"><div style=3D"font-family:Arial;font-size:14px">Hello,</div><div sty= le=3D"font-family:Arial;font-size:14px"><br></div><div style=3D"font-family= :Arial;font-size:14px">Thank you for your quick reaction and sorry for my l= ate response! <br></div><div style=3D"font-family:Arial;font-size:14px"><br= ></div><div style=3D"font-family:Arial;font-size:14px">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?<br></div><div style=3D"font-f= amily:Arial;font-size:14px"><br></div> <div style=3D"font-family:Arial;font-size:14px"> <div> <div>Kind regards,<br></div><div><br></div><div>Jasper Vinkenvleuge= l<br></div></div></div></blockquote><div><br></div><div><font face=3D"arial= , sans-serif">Hello,<br><br>I think installkernel doesn't install syste= m header files.<br>Can you attach your /var/log/Xorg.0.log and /usr/include= /sys/fbio.h files?<br><br></font></div><div><font face=3D"arial, sans-serif= ">If your fbio.h file doesn't have FBIO_GETRGBOFFS in it, then xf86-vid= eo-scfb won't try to call this ioctl.<br>In this case, you would need t= o backup the original fbio.h file, replace it with the one from -CURRENT an= d rebuild scfb.<br>After that, you may restore the original file, if needed= .<br><br>This is a workaround, but unfortunately </font><span style=3D"font= -family:arial,sans-serif">this part</span><span style=3D"font-family:arial,= sans-serif"> couldn't be merged to 13.1, because it changes struct fb_i= nfo.</span></div><div><font face=3D"arial, sans-serif"><br>Regards,<br>Lean= dro </font><br></div><div><br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding= -left:1ex"><div style=3D"font-family:Arial;font-size:14px"><div><div></div> </div> </div><div> ------- Original Message -------<br> On Friday, July 29th, 2022 at 14:40, luporl <<a rel=3D"noreferre= r nofollow noopener" href=3D"mailto:luporl@freebsd.org" target=3D"_blank">l= uporl@freebsd.org</a>> wrote:<br><br> <blockquote type=3D"cite"> <div dir=3D"ltr">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.<div>So, besides the previous steps, you = may also want to try to use a -CURRENT kernel, or apply <a href=3D"https://= reviews.freebsd.org/D29000" rel=3D"noreferrer nofollow noopener" target=3D"= _blank">https://reviews.freebsd.org/D29000</a> and rebuild 13.1-RELEASE ker= nel.</div></div><br><div class=3D"gmail_quote"><div class=3D"gmail_attr" di= r=3D"ltr">On Fri, Jul 29, 2022 at 9:28 AM luporl <<a href=3D"mailto:lupo= rl@freebsd.org" rel=3D"noreferrer nofollow noopener" target=3D"_blank">lupo= rl@freebsd.org</a>> wrote:<br></div><blockquote style=3D"margin:0px 0px = 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class=3D= "gmail_quote"><div dir=3D"ltr">Hello Jasper,<div><br></div><div>I'm ass= uming colors are already ok on console, so that's a good start.</div><d= iv>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.</div><div><br></div><div>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.</div><div>AFAIK, this was tested = only with OFWFB kernel driver. Is this the one you're using? You can ch= eck that with:</div><div>dmesg | grep "VT(ofwfb)".</div><div><br>= </div><div>Next, make sure you are using xf86-video-scfb version 0.0.7, tha= t has the fix for the color issues.</div><div><br></div><div>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.</div><div>You&#= 39;ll need to get patch-hw_xfree86_common_xf86Helper.c and patch-render_pic= ture.c from <a href=3D"https://people.freebsd.org/~luporl/gfx_patches/xorg-= server/" rel=3D"noreferrer nofollow noopener" target=3D"_blank">https://peo= ple.freebsd.org/~luporl/gfx_patches/xorg-server/</a>, copy them the to '= ;files' directory of xorg-server in ports tree, rebuild and reinstall i= t.</div><div>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.</div><div><br></div><div>Cheers,</div><div>Leandro</div></div>= <br><div class=3D"gmail_quote"><div class=3D"gmail_attr" dir=3D"ltr">On Fri= , Jul 29, 2022 at 4:18 AM Jasper Vinkenvleugel <<a href=3D"mailto:j.t.vi= nkenvleugel@proton.me" rel=3D"noreferrer nofollow noopener" target=3D"_blan= k">j.t.vinkenvleugel@proton.me</a>> wrote:<br></div><blockquote style=3D= "margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le= ft:1ex" class=3D"gmail_quote"><div style=3D"font-family:Arial;font-size:14p= x;color:rgb(0,0,0)">Hello,</div><div style=3D"font-family:Arial;font-size:1= 4px;color:rgb(0,0,0)"><br></div><div style=3D"font-family:Arial;font-size:1= 4px;color:rgb(0,0,0)">Please excuse me if I'm using this mailing list i= ncorrectly.<br></div><div style=3D"font-family:Arial;font-size:14px;color:r= gb(0,0,0)"><br></div><div style=3D"font-family:Arial;font-size:14px;color:r= gb(0,0,0)">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.</di= v><div style=3D"font-family:Arial;font-size:14px;color:rgb(0,0,0)"><br></di= v><div style=3D"font-family:Arial;font-size:14px;color:rgb(0,0,0)">Kind reg= ards,</div><div style=3D"font-family:Arial;font-size:14px;color:rgb(0,0,0)"= ><br></div><div style=3D"font-family:Arial;font-size:14px;color:rgb(0,0,0)"= >Jasper Vinkenvleugel<br></div><div style=3D"font-family:Arial;font-size:14= px;color:rgb(0,0,0)"><br></div><div style=3D"font-family:Arial;font-size:14= px;color:rgb(0,0,0)"><br></div></blockquote></div> </blockquote></div> </blockquote><br> </div></blockquote></div></div> </blockquote><br> </div></blockquote></div> --000000000000ceb69c05e767f88f--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC7XEc%2BPSdtiefLCUuOcuCfnTEL_JK9Yf0BjJrHHcSshkkC8nw>