Is there a tutorial for setting up GPU drivers for X11?

Discussion in 'Linux Ubuntu' started by lhl, Dec 12, 2013.

  1. lhl

    lhl New Member

    Joined:
    Jul 8, 2013
    Messages:
    24
    Likes Received:
    0
    So, with the help of some guides, I've built a custom Ubuntu 12.04 armhf system (using ubuntu-core as the start of the rootfs http://cdimage.ubuntu.com/ubuntu-core/r ... 4/release/ ).

    I've been able to get X11 up and running w/ the default fbdev drivers, but have been unable to get the vivante drivers to load. Performance, even for basic screen refreshes/scrolling is pretty terrible.

    I've grabbed the latest GPU drivers from Timesys: http://repository.timesys.com/buildsour ... -bin-mx6q/
    Which includes both sf and hf versions (I'm using the hf of course) and I've installed them, but I get segfaults when trying to run the samples.

    I also checked out the UDOO wheezy drivers, but that didn't seem to work: http://sourceforge.net/projects/udooboa ... es/Debian/

    I haven't poked around w/ X stuff in a long time, I've been looking at some of the recent posts http://jas-hacks.blogspot.com/ has been doing and some discussions at the Freescale Community (like https://community.freescale.com/thread/307061 )

    Anyway, to make a long story short, since the UDOO kernel is compiled w/ the GPU stubs and 12.04 runs w/ X11 v1.11, there shouldn't be anything insurmountable for getting this set up right? What are the actual drivers/steps to install and activate the user-space GPU drivers in X11? Does someone from SECO/UDOO or whoever built their 12.04 image mind jumping in?
     
  2. miousername

    miousername New Member

    Joined:
    Jun 23, 2013
    Messages:
    73
    Likes Received:
    0
    Hi lhl,

    Udoo team is working to port gstreamer driver and x11 graphics acceleration on ubuntu 12.04.
    I'm waiting too! :)
     
  3. lhl

    lhl New Member

    Joined:
    Jul 8, 2013
    Messages:
    24
    Likes Received:
    0
  4. pizthewiz

    pizthewiz New Member

    Joined:
    Nov 30, 2013
    Messages:
    8
    Likes Received:
    0
    Except it doesn't appear to have vivante drivers, from glxinfo's output it reports to be using Mesa's software renderer:

    Code:
    […]
    direct rendering: Yes
    […]
    OpenGL vendor string: Mesa Project
    OpenGL renderer string: Software Rasterizer
    OpenGL version string: 2.1 Mesa 8.0.5
    OpenGL shading language version string: 1.20
    […]
    
     
  5. lhl

    lhl New Member

    Joined:
    Jul 8, 2013
    Messages:
    24
    Likes Received:
    0
    Hmm, well, I don't know about UDOO's image, but I did manage to get things running for my custom Ubuntu setup. My glxinfo:

    Code:
    GLX version: 1.4
    GLX extensions:
        GLX_SGI_make_current_read, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer
    OpenGL vendor string: Vivante Corporation
    OpenGL renderer string: GC2000 Graphics Engine
    OpenGL version string: 2.1 2.0.1
    OpenGL shading language version string: 1.20
    I also have accelerated 2D working, although I've run into an seemingly insurmountable problem (it doesn't seem to support any sort of screen rotation):

    Code:
    [  8049.051] (II) Loading /usr/lib/xorg/modules/drivers/vivante_drv.so
    [  8049.051] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
    [  8049.052] (II) VIVANTE(0): using default device
    [  8049.052] (II) VIVANTE(0): Creating default Display subsection in Screen section
            "Default Screen" for depth/fbbpp 24/32
    [  8049.052] (**) VIVANTE(0): Depth 24, (--) framebuffer bpp 32
    [  8049.052] (==) VIVANTE(0): RGB weight 888
    [  8049.053] (==) VIVANTE(0): Default visual is TrueColor
    [  8049.053] (==) VIVANTE(0): Using gamma correction (1.0, 1.0, 1.0)
    [  8049.053] (II) VIVANTE(0): hardware: DISP3 BG (video memory: 5120kB)
    [  8049.053] (II) VIVANTE(0): checking modes against framebuffer device...
    [  8049.053] (II) VIVANTE(0): checking modes against monitor...
    [  8049.053] (--) VIVANTE(0): Virtual size is 1024x768 (pitch 1024)
    [  8049.053] (**) VIVANTE(0):  Built-in mode "current": 65.0 MHz, 48.4 kHz, 60.0 Hz
    [  8049.054] (II) VIVANTE(0): Modeline "current"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync -csync (48.4 kHz)
    [  8049.054] (==) VIVANTE(0): DPI set to (96, 96)
    The piece I was missing was that I not only had to install the gpu-viv-x11-bin-mx6q package, but also the xf86-video-imx-viv package.

    Hope this helps anyone looking to setup their own GPU drivers.
     
  6. firehopper

    firehopper Member

    Joined:
    Jun 10, 2013
    Messages:
    154
    Likes Received:
    1
    can someone post a howtoo on how to do this on say the new debian wheezy hard float? or the debian soft float that was posted in the forums?

    it would be quite helpfull for us linux noobs :)
     
  7. lhl

    lhl New Member

    Joined:
    Jul 8, 2013
    Messages:
    24
    Likes Received:
    0
    @firehopper - it should be pretty simple. Grab the two tarballs I linked and extract. For the first one, make sure to specify whether you want hardfp or softfp and run the makefile. For the second, read the Install.txt carefully and run the build and install scripts and follow the instructions in the txt file.
     
  8. firehopper

    firehopper Member

    Joined:
    Jun 10, 2013
    Messages:
    154
    Likes Received:
    1

    and I got stuck trying to do the install..

    It says sudo dpkg -i blah blah blah. kernel ver#_release number. and I dont know what to put there..

    .

    help!
     
  9. firehopper

    firehopper Member

    Joined:
    Jun 10, 2013
    Messages:
    154
    Likes Received:
    1
    I'm stuck at step 2.1 in the instructions_to_setup_x11 instructions.

    heelllllpp!
     
  10. lhl

    lhl New Member

    Joined:
    Jul 8, 2013
    Messages:
    24
    Likes Received:
    0
    You should ignore step 2 because you're installing the packages directly from the tarballs using the build/install scripts. That's what those packages are.

    You can notice that gpu-viv-bin-mx6q_<KERNEL VERSION>-<RELEASE VESRION> is the same name as the first package you installed.

    The kernel module driver is already built into the default UDOO kernel.
     
  11. firehopper

    firehopper Member

    Joined:
    Jun 10, 2013
    Messages:
    154
    Likes Received:
    1
    okay.. I tried to do the step 3, and apparently I didnt do something right.. build.sh reports drm.h cant be found..
     
  12. lhl

    lhl New Member

    Joined:
    Jul 8, 2013
    Messages:
    24
    Likes Received:
    0
    You'll need to install libdrm-dev. You probably also need to install xserver-xorg-dev.

    firehopper, I feel for you, but at the same time, I won't be answering any more questions if you can't at least spend 2 seconds to do a search: https://www.google.com/?#q=drm.h+debian+package

    It's literally the first result. IMO, that's incredibly rude/poor form.
     
  13. firehopper

    firehopper Member

    Joined:
    Jun 10, 2013
    Messages:
    154
    Likes Received:
    1
    I did search, but apparently my googlefu isnt up to scratch.

    I do have libdrm-dev and xserver-xorg-dev installed.. but it still cant find it for some reason.. and You are the one jumping all over me, thats kinda rude. I already said I am a noob when it comes to linux.. no need to rub it in..
     
  14. rafalsw

    rafalsw New Member

    Joined:
    Dec 13, 2013
    Messages:
    8
    Likes Received:
    0
    firehopper,
    try this:
    sudo -i
    cd /usr/include/
    ln -s libdrm drm

    Compiler searches for sources in the /usr/include/drm but libdrm-dev package creates a directory /usr/include/libdrm

    Regards
     
  15. black_toad

    black_toad New Member

    Joined:
    Jan 2, 2014
    Messages:
    1
    Likes Received:
    0
    Hi guys & thank-you for sharing your experiences here. I have been following your guidance (thanks for the links) with the hope of getting HW acceleration working on the HF Debian wheezy binaries. I applied the patches to source code in the xserver-xorg-video-imx-viv package, checked thoroughly all of the steps here & in the instructions (omitting step 2), but cannot get a sucessful compile.

    The initial errors concerned invalid arguments for xf86VGAarbiter.. So I removed the include line and the if arg concerning the arbiter around line 340 of DRI_1.10.4/src/dri.c, after noting some recent proposals at x-org to patch the arbiter...

    running ./build.sh now fails with:
    xf86dri.c: In function 'ProcXF86DRIQueryVersion':
    xf86dri.c:102:34: error: macro "swaps" passed 2 arguments, but takes just 1
    xf86dri.c:102:6: error: 'swaps' undeclared (first use in this function)
    .... etc etc..

    I'm absolutely no expert in these matters, but rather a determined noob who has spend a huge amount of time trying to figure out how to get DRI working on this board to no avail. Just a thought, but do these errors relate in any way to the floating-point (hard vs soft) & the compiler?

    Any help with this would be great..

    Thanks in advance,

    Markus
     

Share This Page