PDA

View Full Version : Firefox 4 - GPU acceleration and akmod-nvidia


puntarenas
13th April 2011, 04:19 PM
Has anyone got GPU acceleration working within Firefox 4 using akmod-nvidia 270.30 from rpmfusion.org?

Blacklisting seems to be disabled on Fedora 15by default and of course "Use hardware acceleration when available" ist activated under preferences. Unfortunately "about:support" states that hardware acceleration is not working.

/usr/bin/xulrunner

...

##
## Enable WebGL
##
MOZ_GLX_IGNORE_BLACKLIST=1
export MOZ_GLX_IGNORE_BLACKLIST

exec $XUL_PROGRAM "$@"


glxinfo

name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_EXT_swap_control, GLX_EXT_texture_from_pixmap, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_EXT_create_context_es2_profile,
GLX_ARB_create_context_robustness, GLX_ARB_multisample,
GLX_NV_float_buffer, GLX_ARB_fbconfig_float, GLX_EXT_framebuffer_sRGB
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGI_swap_control, GLX_EXT_swap_control, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_NV_float_buffer,
GLX_ARB_fbconfig_float, GLX_EXT_fbconfig_packed_float,
GLX_EXT_texture_from_pixmap, GLX_EXT_framebuffer_sRGB,
GLX_NV_present_video, GLX_NV_copy_image, GLX_NV_multisample_coverage,
GLX_NV_video_capture, GLX_EXT_create_context_es2_profile,
GLX_ARB_create_context_robustness
GLX version: 1.4
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_EXT_swap_control, GLX_EXT_texture_from_pixmap, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_EXT_create_context_es2_profile,
GLX_ARB_create_context_robustness, GLX_ARB_multisample,
GLX_NV_float_buffer, GLX_ARB_fbconfig_float, GLX_EXT_framebuffer_sRGB,
GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 460/PCI/SSE2
OpenGL version string: 4.1.0 NVIDIA 270.30
OpenGL shading language version string: 4.10 NVIDIA via Cg compiler
OpenGL extensions:

...


about:support

...

User Agent
Mozilla/5.0 (X11; Linux i686; rv:2.0) Gecko/20100101 Firefox/4.0

...

browser.startup.homepage_override.buildID
20110404082804
...

Graphics

GPU Accelerated Windows 0/1



Font rendering is utterly slow that way and far from being as smooth as accelerated 2D rendering under Windows 7. :(

is977
13th April 2011, 07:03 PM
Its a linux, bro

puntarenas
14th April 2011, 12:19 PM

That doesn't mean 2D rendering has to be utterly slow. Of course there is no DirectX (Direct2D/Direct3D) availiable, but Firefox can use OpenGL bindings instead. Gnome-Shell for example utilizes GPU acceleration that way and that works fine.

Now google wasn't very helpful to find information about Firefox 4 hardware acceleration under Linux (lots of confusion around hardware accelerated 2D rendering and WegGL, count me in), but at least I found some reports claiming that it is already implemented and working. That is why I am asking here, as for now 2D rendering menus and website content in Firefox 4 under F15 makes me sad.

puntarenas
7th May 2011, 06:54 AM
Hardware acceleration is availiable under Fedora15 and works pretty well together with akmod-nvidia. It can be forced in about:config:
layers.acceleration.force-enabled true

From time to time gnome-shell crashes and restarts itself without doing any harm to open applications. I am not sure if this is due to forced hardware acceleration as I did not notice any problems in Firefox itself so far.

Now that gives me a highly improved websurfing experience. :)