Open Bug 1701640 Opened 5 years ago Updated 5 years ago

Firefox fails to recognize my GPU's but other programs and browsers recognize it.

Categories

(Core :: Graphics, defect, P3)

Firefox 89
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: samuelms2612, Unassigned, NeedInfo)

References

(Depends on 1 open bug)

Details

Attachments

(3 files)

Attached image 2021-03-29_03-47.png —

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0

Steps to reproduce:

I'm invoking firefox on Kali Linux, using DRI_PRIME=1 environment variable because that's where my Radeon RX560 is located.

If it is relevant I use i3, xfce and lightdm.

Actual results:

Firefox opens with this warning on terminal:

[GFX1-]: More than 1 GPU from same vendor detected via PCI, cannot deduce device.

It defaults to the integrated GPU, not the dedicated one, it is totally functional but slower than other browsers that successfully use the dedicated GPU.

The attachment contains radeontop instances for both GPUs, and you can see there that firefox is running on the 4 BUS GPU.

Expected results:

Firefox should have recognized the difference between both GPU and used the one I selected.

I tried first the stable branch and them moved to nightly with the same results.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Graphics
Product: Firefox → Core

What does glxinfo print out when you run it?

Flags: needinfo?(samuelms2612)

(In reply to Robert Longson [:longsonr] from comment #3)

What does glxinfo print out when you run it?

name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_no_error,
GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness,
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_no_config_context,
GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_OML_swap_method,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
GLX_SGI_swap_control
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile,
GLX_EXT_create_context_es_profile, GLX_EXT_fbconfig_packed_float,
GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, GLX_EXT_swap_control,
GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_INTEL_swap_event,
GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent,
GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_OML_swap_method,
GLX_OML_sync_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
GLX_ARB_create_context, GLX_ARB_create_context_no_error,
GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness,
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB,
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_buffer_age,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
GLX_EXT_import_context, GLX_EXT_swap_control, GLX_EXT_swap_control_tear,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_INTEL_swap_event,
GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, GLX_MESA_swap_control,
GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync
Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD Radeon (TM) RX Graphics (POLARIS11, DRM 3.40.0, 5.10.0-kali5-amd64, LLVM 11.0.1) (0x67ef)
Version: 20.3.4
Accelerated: yes
Video memory: 4096MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 4082 MB, largest block: 4082 MB
VBO free aux. memory - total: 3558 MB, largest block: 3558 MB
Texture free memory - total: 4082 MB, largest block: 4082 MB
Texture free aux. memory - total: 3558 MB, largest block: 3558 MB
Renderbuffer free memory - total: 4082 MB, largest block: 4082 MB
Renderbuffer free aux. memory - total: 3558 MB, largest block: 3558 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 4096 MB
Total available memory: 8192 MB
Currently available dedicated video memory: 4082 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon (TM) RX Graphics (POLARIS11, DRM 3.40.0, 5.10.0-kali5-amd64, LLVM 11.0.1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.3.4
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
GL_AMD_conservative_depth, GL_AMD_depth_clamp_separate,
GL_AMD_draw_buffers_blend, GL_AMD_framebuffer_multisample_advanced,

Flags: needinfo?(samuelms2612)

Full out(In reply to Robert Longson [:longsonr] from comment #3)

What does glxinfo print out when you run it?

Full output here: https://pastebin.pl/view/5e58ee62

Looking at the reporting code, I can't understand how https://searchfox.org/mozilla-central/rev/9043e515e9608cc55b252a40cb2dfb6f767bcffd/widget/GfxInfoX11.cpp#417 is ever evaluated to false (leading to this error).

Severity: -- → S3
Priority: -- → P3
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Andrew, thanks for being willing to investigate.

Flags: needinfo?(aosmond)

Firefox doesn't actually do any explicit selection here with respect to the graphics card; glxtest is trying to figure out which card we are defaulted to use (and make WR/no WR decisions based on that). I would expect it to honour the DRI_PRIME envvar (which it does for me, fwiw). The code that looks at it is actually in Mesa:

https://github.com/mesa3d/mesa/blob/master/src/loader/loader.c#L337

Could you attach your about:support with and without DRI_PRIME=1? I'm curious because your screenshots doesn't show the warning without DRI_PRIME=1 which suggests it was able to get the device ID in that case strangely enough...

Flags: needinfo?(aosmond) → needinfo?(samuelms2612)

Same for me, but with iGPU. Only on Firefox 87 and up.

Attached file glxinfo output —
Attached file about:support page —
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: