[Eee Pad Transformer Android Development] TravellingGuy:
[This thread is for support on getting hardware acceleration working on your brand new Linux installation on your Transformer. While not directly related to development, most of the "Linux on TF101" threads are in the TF101 development forum, so it makes sense that a help thread is here. If it should be in another forum, please move it.]

Update 2014-03-29!

-----------------------------------------------------------------------

Nvidia has updated the Ventana driver to 16.4 with some important fixes for us! Here's what I've noticed thus far:

You can now boot Linux on your Transformer without having to undock the keyboard! No more errors spamming the console, preventing normal boot. Woohoo!

Despite [MENTION=3753391]jrohwer[/MENTION]'s claims of getting 300+ fps with es2gears, I was never able to get over about 61 with the Nvidia driver (with mesa, I would get about 30 fps). This new driver fixes that, and es2gears can now achieve these great rates out of es2gears.

kwin_gles is much more stable

I've updated this thread for the new driver and also included updates/fixes based on [MENTION=3753391]jrohwer[/MENTION]'s comments and my own experiences since I posted the original thread.

----------------------------------------------------------------------

You're tired of Android on your TF101 and you decide you want a real OS. This thread is for support on getting hardware acceleration working with your favorite Linux distro.

I don't have all the answers but I do have video playback working on Debian unstable using the nvgstplayer app.

This post will be updated with better, more specific instructions as the process is honed.

Here's how (I think) I did it and what's required. Obviously, you need an already working Linux installation on your TF101, with a graphical interface of some sort working (LXDE, XFCE, Gnome, KDE, Enlightenment, whatever). If you've used one of the already existing images around, you may already have hardware acceleration.

Install the appropriate mesa packages.

libegl1-mesa

libegl1-mesa-drivers

libgl1-mesa-dri

libgl1-mesa-swx11

libglapi-mesa

libgles2-mesa

libosmesa6

mesa-utils-extra

Reboot (just to be sure you didn't break anything)

Download the latest Ventana driver package from here: https://developer.nvidia.com/linux-tegra-rel-16. You can find the download link under the "Additional Information" section.

Make a backup copy of your xorg.conf, as the installer will overwrite it:

cp /etc/X11/xorg.conf ~

Extract the package.

tar -xjf Tegra20_Linux_R16.4.0_armhf.tbz2

Figure out what ABI release you are using. On Debian, you can check like this (you are looking for xorg-video-abi-##) For current Debian stable, the ABI is 12. Note Debian testing/unstable are using ABI 15, which is not supported by the Nvidia driver.:

aptitude show xserver-xorg-core | grep abi

cd to the Tegra for Linux directory and run the install script:

cd Linux_for_Tegra
sudo ./apply_binaries.sh --root / --xabi ##

Patch the /etc/X11/xorg.conf with anything extra that's needed (check your backup)

Download the latest Ventana Codec Package from the same spot as the driver and get it installed:

tar -xjf Tegra20_Linux-codecs_R16.4.0_armhf.tbz2
tar -xjf restricted_codecs.tbz2
sudo cp lib/firmware/* /lib/firmware/

Ensure the linker reads the new Nvidia modules before the default mesa ones. You can follow [MENTION=3753391]jrohwer[/MENTION]'s instructions in post #4 below. Alternatively, create a file in /etc/ld.so.conf.d/ called 000-nvidia.conf and put this in it:

/usr/lib

Reboot (so the linker picks up the new path...alternatively run ldconfig and restart X)

The mesa-utils-extra package has some utilities to test EGL. Try running the es2_info. You should see NVIDIA Tegra as the GL_RENDERER:

EGL_VERSION: 1.4
EGL_VENDOR: NVIDIA
EGL_EXTENSIONS:
, EGL_NV_system_time, EGL_KHR_config_attribs,
EGL_KHR_surfaceless_context, EGL_KHR_image, EGL_KHR_image_base,
EGL_KHR_image_pixmap, EGL_KHR_gl_texture_2D_image,
EGL_KHR_gl_texture_cubemap_image, EGL_KHR_gl_renderbuffer_image,
EGL_ANDROID_blob_cache, EGL_KHR_vg_parent_image, EGL_NV_perfmon,
EGL_KHR_lock_surface, EGL_KHR_fence_sync, EGL_NV_sync,
EGL_NV_depth_nonlinear, EGL_NV_post_sub_buffer,
EGL_NV_post_convert_rounding, EGL_NV_native_query, EGL_KHR_stream,
EGL_KHR_stream_fifo, EGL_KHR_stream_producer_eglsurface,
EGL_KHR_stream_consumer_gltexture, EGL_KHR_stream_cross_process_fd,
EGL_EXT_create_context_robustness, EGL_IMG_context_priority,
EGL_NV_3dvision_surface, EGL_KHR_reusable_sync, EGL_NV_stream_sync,
EGL_NV_coverage_sample, EGL_NV_coverage_sample_resolve
EGL_CLIENT_APIS: OpenGL_ES2 OpenGL_ES OpenGL OpenVG
GL_VERSION: OpenGL ES 2.0 14.01002
GL_RENDERER: NVIDIA Tegra
GL_EXTENSIONS:
GL_OES_rgb8_rgba8, GL_OES_EGL_sync, GL_OES_surfaceless_context,
GL_OES_fbo_render_mipmap, GL_NV_depth_nonlinear, GL_NV_draw_path,
GL_NV_texture_npot_2D_mipmap, GL_OES_EGL_image, GL_OES_EGL_image_external,
GL_OES_vertex_half_float, GL_OES_mapbuffer, GL_NV_draw_buffers,
GL_NV_multiview_draw_buffers, GL_EXT_Cg_shader, GL_EXT_packed_float,
GL_OES_texture_half_float, GL_EXT_texture_array,
GL_OES_compressed_ETC1_RGB8_texture, GL_EXT_texture_compression_latc,
GL_NV_texture_compression_latc, GL_EXT_texture_compression_dxt1,
GL_EXT_texture_compression_s3tc, GL_NV_texture_compression_s3tc,
GL_EXT_texture_filter_anisotropic, GL_NV_get_tex_image, GL_NV_read_buffer,
GL_NV_shader_framebuffer_fetch, GL_NV_copy_image,
GL_NV_fbo_color_attachments, GL_EXT_bgra, GL_EXT_texture_format_BGRA8888,
GL_EXT_unpack_subimage, GL_NV_pack_subimage,
GL_NV_texture_compression_s3tc_update, GL_NV_read_depth,
GL_NV_read_stencil, GL_NV_uniform_buffer_object, GL_NV_map_buffer_range,
GL_EXT_robustness, GL_OES_standard_derivatives,
GL_NV_EGL_stream_consumer_external, GL_EXT_separate_shader_objects,
GL_NV_copy_buffer, GL_NV_3dvision_settings, GL_EXT_debug_marker,
GL_EXT_debug_label, GL_EXT_texture_storage, GL_NV_pixel_buffer_object,
GL_NV_framebuffer_blit, GL_NV_explicit_attrib_location,
GL_NV_coverage_sample

Run es2gears. For me, it starts out at over 600+fps and drops as it runs a fair bit. But, as long as you're not getting like 30fps, you're good!

Give the Nvidia video player a try. It was installed by the installer you ran above:

nvgstplayer --uri <path to video file>

Try the Simpsons trailer 720p mp4 here (http://www.dvdloc8.com/clip.php?movieid=12167&clipid=1) and see how it works.

Questions and Answers (mostly questions right now!)

As mentioned above, I don't have all the answers. In fact, I have more questions than I do answers:

How can I get accelerated video playback working with other video players (totem, vlc, etc.)?

How to get 3d working? More specifically, fancy animations in Gnome Shell or KDE, etc.?

kwin_gles seems to work ok now.

According to a message from steveeJ in another thread (http://xdaforums.com/showpost.php?p=44952355&postcount=117):

In Debian, there is a clutter-1.0-tests package. Whenever I try to any of the tests, they just all segfault on me.

As well, with new Debian releases (current testing and stable), the X ABI is too new and not supported by the Nvidia driver, so you can't get newer releases of Gnome going.

es2_info says "GL_RENDERER: Software Rasterizer". Doesn't say anything about hardware acceleration, but I assume that's fine in this scenario? If your GL_RENDERER says Software Rasterizer, you don't have hardware acceleration.

Comments/questions/answers/suggestions/etc. welcome! Let's make hardware acceleration on Linux great!