https://bugs.freedesktop.org/show_bug.cgi?id=71789
Priority: medium Bug ID: 71789 Assignee: dri-devel@lists.freedesktop.org Summary: [r300g] Visuals not found in (default) depth = 24 Severity: normal Classification: Unclassified OS: OpenBSD Reporter: mpi@openbsd.org Hardware: PowerPC Status: NEW Version: 9.2 Component: Drivers/Gallium/r300 Product: Mesa
Created attachment 89467 --> https://bugs.freedesktop.org/attachment.cgi?id=89467&action=edit Xorg.log without configuration file
Without xorg.conf or with a pixel depth of 24 bits, any application linked to libGL will fails to load the "r300" driver and after it the "swarst" driver with the following message:
libGL error: failed to load driver: r300 libGL error: Try again with LIBGL_DEBUG=verbose for more details. libGL error: failed to load driver: swrast libGL error: Try again with LIBGL_DEBUG=verbose for more details.
This problem is present in all the Mesa 9.x release up to 9.2.3. But it is not in the 8 (which segfault at some point), 7.11 was working without config file.
After a bit of investigation, I found that driConvertConfigs() returns NULL in dri2CreateScreen() when trying to find matching visuals (src/glx/dri_glx.c:450). However if I specify a depth of 16 bits in my xorg.conf I cannot reproduce this problem.
This problem is present on OpenBSD -current (future 5.5) which has the drm drivers synced with Ubuntu's linux 3.8 kernel.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #1 from Martin Pieuchot mpi@openbsd.org --- Created attachment 89468 --> https://bugs.freedesktop.org/attachment.cgi?id=89468&action=edit Xorg.log with 16 bits depth in xorg.conf
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #2 from Martin Pieuchot mpi@openbsd.org --- FWIW the patches mentionned in http://lists.freedesktop.org/archives/mesa-dev/2013-December/050218.html work for me.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
herminio.hernandezjr@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OS|OpenBSD |Linux (All)
--- Comment #3 from herminio.hernandezjr@gmail.com --- I am seeing the same thing in Debian Testing. Those patches woorked all the way up to mesa 10.5.5 then they began to fail.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #4 from herminio.hernandezjr@gmail.com --- Created attachment 116274 --> https://bugs.freedesktop.org/attachment.cgi?id=116274&action=edit glxinfo output
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #5 from herminio.hernandezjr@gmail.com --- I noticed in the 11.0.3 release notes that this issue was fix. However I am running Lubuntu 16.04 (development) on my iBook G4 and I am still. Getting the same issue. When I change to Defaul Depth 16 I get 3D acceleration. I ran strace under both conditions and am post them plus my Xorg.0.log
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #6 from herminio.hernandezjr@gmail.com --- Created attachment 119753 --> https://bugs.freedesktop.org/attachment.cgi?id=119753&action=edit strace default depth 24
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #7 from herminio.hernandezjr@gmail.com --- Created attachment 119754 --> https://bugs.freedesktop.org/attachment.cgi?id=119754&action=edit strace default depth 16
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #8 from herminio.hernandezjr@gmail.com --- Created attachment 119755 --> https://bugs.freedesktop.org/attachment.cgi?id=119755&action=edit xorg log
https://bugs.freedesktop.org/show_bug.cgi?id=71789
Martin Pieuchot mpi@openbsd.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|9.2 |11.0
--- Comment #9 from Martin Pieuchot mpi@openbsd.org --- I confirm that this bug is still present with Mesa 11.0.6.
Without forcing "DefaultDepth" to 16, I get:
$ glxgears libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: r300 libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast
https://bugs.freedesktop.org/show_bug.cgi?id=71789
Max May lowtech@live.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|11.0 |11.1
--- Comment #10 from Max May lowtech@live.de --- With Ubuntu Mate 16.04a2 on a G4 PowerBook5,8 I have to confirm, that this bug is still present with Mesa 11.1.1.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #11 from erhard_f@mailbox.org --- Can confirm this bug on Ubuntu MATE 16.04 daily, Mesa 11.1.1. On a PowerBook 5,6.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
erhard_f@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|11.1 |11.2
--- Comment #12 from erhard_f@mailbox.org --- Still here on mesa 11.2 (Ubuntu MATE 16.04 daily). Tested on a PowerMac G5 7,3.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
Mathieu Malaterre mathieu.malaterre@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mathieu.malaterre@gmail.com
--- Comment #13 from Mathieu Malaterre mathieu.malaterre@gmail.com --- An updated patch is now available from:
https://lists.freedesktop.org/archives/mesa-dev/2016-April/114409.html
As mentioned over here:
https://lists.freedesktop.org/archives/mesa-dev/2016-April/114412.html
we'are actively looking forward for feedback.
I've also attached the patch directly to this bug tracker for convenience: r300g_be.patch
--- Comment #14 from herminio.hernandezjr@gmail.com --- I also see in apitrace that GLXChooseVisual returns with NULL when I to run glxgears.
--- Comment #15 from herminio.hernandezjr@gmail.com --- I also see in apitrace that GLXChooseVisual returns with NULL when I to run glxgears.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #16 from Mathieu Malaterre mathieu.malaterre@gmail.com --- Created attachment 123267 --> https://bugs.freedesktop.org/attachment.cgi?id=123267&action=edit proposed patch
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #17 from Elimar Riesebieter riesebie@lxtec.de --- Patched r300g_be.patch against mesa 11.1.3. -> No acceleration at Depth 24.This is Debian sid.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #18 from Dan DeVoto dand1972@yahoo.com --- Same here. Glxinfo says r300 fails to load.
dan@powerbook2:~$ glxinfo name of display: :0.0 libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: r300 libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast Error: couldn't find RGB GLX visual or fbconfig
...
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #19 from Nathan-J. Hirschauer nathanhi@deepserve.info --- Applied the patch on top of 43f46caf769b0a6d661850ce2fa64b6f4b085b9f, but unfortunately it didn't work. Tested on a PowerBook G4 5,6 with Linux 4.6-rc4 (5f44abd041c5f3be76d57579ab254d78e601315b) / Debian Sid.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
Marek Olšák maraeo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #123267|0 |1 is obsolete| |
--- Comment #20 from Marek Olšák maraeo@gmail.com --- Created attachment 123370 --> https://bugs.freedesktop.org/attachment.cgi?id=123370&action=edit final fix?
Could you please test this patch?
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #21 from Nathan-J. Hirschauer nathanhi@deepserve.info --- Created attachment 123385 --> https://bugs.freedesktop.org/attachment.cgi?id=123385&action=edit glxinfo output with final fix
Patched it on top of cbcd7b60f573d027337a2390e67f6010e9992aaa and that one did actually work! I've attached the full glxinfo output in case someone is interested.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #22 from Elimar Riesebieter riesebie@lxtec.de --- Applied against Debian 11.1.3-1. 3-D acceleration at depth=24 works. Power consumption running foobillardplus is very high. Colors at the Cairo Dock are looking pastel shaded.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #23 from Michel Dänzer michel@daenzer.net --- Elimar, Nathan or anyone else, can you try if the piglit sanity tests pass with this patch?
Also, do OpenGL compositing managers such as gnome-shell show correct colours?
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #24 from Nathan-J. Hirschauer nathanhi@deepserve.info --- Created attachment 123420 --> https://bugs.freedesktop.org/attachment.cgi?id=123420&action=edit Piglit Sanity Check Results
I've attached the Piglit result of the sanity check to this issue, GNOME Shell also has a discolouration (the title bar and activity screen is red) and after using it for a couple of minutes it crashed (SIGSEGV):
[ 6088.876306] gnome-shell[8144]: unhandled signal 11 at 095b44c0 nip 095b44c0 lr 0de343b4 code 30001 [ 6112.441094] gnome-shell[8701]: unhandled signal 11 at 095b44c0 nip 095b44c0 lr 0de343b4 code 30001
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #25 from erhard_f@mailbox.org --- Patched on top on 79b0e13913b5189bb8629e80439fea746f99fe79 and it works! Many thanks!
Machine used is a PowerMac G5 7,3 with an AGP Radeon 9600 Pro (Mac edition). Running Compton composting manager (Ubuntu MATE 16.04) and it runs without glitches so far, colours look good. Only thing I noticed is the desktop gets unresponsive and the mouse pointer very jerky during youtube video playback.
Will try Piglit tests the next days.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #26 from Mathieu Malaterre mathieu.malaterre@gmail.com --- I believe that the testers should also make sure to use PCI instead of AGP during there testing. See bug: https://bugs.freedesktop.org/show_bug.cgi?id=95017.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #27 from erhard_f@mailbox.org --- Built piglit from svn on Ubuntu MATE 16.04 ppc. Already the sanity test fails, specifically: root@T800:~/build/piglit# /root/build/piglit/bin/gl-1.0-readpixsanity -auto -fbo RGB(A) worst-case error was 6.641274 bits at (32, 80) expected (0.840188, 0.394383, 0.783099, 0.798440) got (0.799995, 0.784309, 0.396076, 0.839211) Depth worst-case error was 23.862089 bits at (107, 6) expected 0.911647; got 0.002813. Stencil failed at (0, 1). Expected 255; got 233. PIGLIT: {"result": "fail" }
But I must admit that I've no experience with piglit, built and used it for the first time.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #28 from Marek Olšák maraeo@gmail.com --- At this stage I just need a confirmation that more than 60% of apps work and show correct colors (mainly games). I don't expect all apps to be perfect right now.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #29 from Michel Dänzer michel@daenzer.net --- That piglit sanity is failing with the patch may confirm my suspicion that something doesn't add up yet I'm afraid: Since the kernel driver and xf86-video-ati EXA code are using the same hardware formats for display/rendering with BE & LE, I was wondering how the patch could result in both display and glReadPixels working correctly for winsys buffers. Looks like indeed only display works correctly, which indicates that the GPU is effectively writing/reading PIPE_FORMAT_x8R8G8B8_* pixels like PIPE_FORMAT_B8G8R8x8_* (which is what the kernel driver and EXA code are using).
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #30 from Marek Olšák maraeo@gmail.com --- (In reply to Michel Dänzer from comment #29)
That piglit sanity is failing with the patch may confirm my suspicion that something doesn't add up yet I'm afraid: Since the kernel driver and xf86-video-ati EXA code are using the same hardware formats for display/rendering with BE & LE, I was wondering how the patch could result in both display and glReadPixels working correctly for winsys buffers. Looks like indeed only display works correctly, which indicates that the GPU is effectively writing/reading PIPE_FORMAT_x8R8G8B8_* pixels like PIPE_FORMAT_B8G8R8x8_* (which is what the kernel driver and EXA code are using).
The patch is correct from the LE perspective. It simply adds ARGB support and was tested thoroughly on LE. The side effect is that BE can use the format now too, but there may be other issues with BE.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #31 from herminio.hernandezjr@gmail.com --- I can verify the patch works. However there are some issues
1. I see my colors are off when I use compiz as my WM and try to rotate the cube.
2.piglit samity tests fail with this error: spec/!opengl 1.0/gl-1.0-readpixsanity/gl-1.0-readpixsanity: fail
3. games like alien-arean and supertuxkart crash my system when trying to load the game.
4. I can play video in mpv using opengl but get the following error: [vo/opengl] Could not create EGL context!
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #32 from Michel Dänzer michel@daenzer.net --- (In reply to Marek Olšák from comment #30)
The patch is correct from the LE perspective. It simply adds ARGB support and was tested thoroughly on LE. The side effect is that BE can use the format now too, but there may be other issues with BE.
Makes sense. Maybe we can use bug 43698 to track the remaining issues.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
Marek Olšák maraeo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #33 from Marek Olšák maraeo@gmail.com --- Fixed by 172bfdaa9e80342ade3f023f72d455d76713b866. Closing.
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #34 from cosiekvfj@o2.pl --- Fix for this bug result in regression: https://bugs.freedesktop.org/show_bug.cgi?id=98869
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #35 from richard richard.kuenz@web.de --- Hello ,
how can i apply this patch? I am using Powermac G5 7,3 with Radeon9650, Debian Wheezy, kernel 3.2.6 it gives
dmesg | grep -E 'drm|radeon' | grep -iE 'firmware|microcode' [ 1.137001] radeonfb: Found Open Firmware ROM Image [ 1.137015] radeonfb: Retrieved PLL infos from Open Firmware [ 25.042791] [drm] Loading R300 Microcode [ 25.111223] platform radeon_cp.0: firmware: agent loaded radeon/R300_cp.bin into memory
after installing firmware-linux-nonfree. Video playback is blue (no video shown) when using mplayer, mpv, vlc .. but html5 playback on youtube works normal (bit slow, though).
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #36 from richard richard.kuenz@web.de --- wheezy only have mesa 8 available, but videoplayback would be very nice please. don't know how to change colour depth as there is no xorg.conf. thank you very much
https://bugs.freedesktop.org/show_bug.cgi?id=71789
--- Comment #37 from Marek Olšák maraeo@gmail.com --- You can try "git am -3 ...". If that doesn't help, then I don't know.
dri-devel@lists.freedesktop.org