Jump to content

OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)


dimag0g

Recommended Posts

 

OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)

 

 

Hello. It it for sure this work on Orange Pi PC? I've tried it before and give up on missing SDL error, when compiling glshim. Now i decided to give it more serious try. First - mali driver can't be build for X11, before librdi2 and libump. And before build glshim i had to build and install SDL-1.2.15 first. After this glshim builds fine. I do this on CLI Armbian Jessie image. I've try it on Xenial but there is some mess there with mesa drivers or something else and i can't even run Xorg if i don't install whole desktop environment with tasksel. Anyway Jessie works well, but i can't get your OpenGL library to work. i've done all steps as you show, instead of this above. I remove sunxi memory restrictions from boot.scr, i have necessary modules loaded:

~$ lsmod
Module                  Size  Used by
sunxi_cir               1601  0
mali_drm                2732  1
drm                   178255  2 mali_drm
mali                  123216  0
ump                    29379  3 mali
8189es               1076034  0

i have all permissions needed - /etc/udev/rules.d/50-mali.rules :

KERNEL=="mali", MODE="0660", GROUP="video"
KERNEL=="ump", MODE="0660", GROUP="video"
KERNEL=="disp", MODE="0660", GROUP="video"
KERNEL=="fb*", MODE="0660", GROUP="video"
KERNEL=="cedar_dev", MODE="0660", GROUP="video"
KERNEL=="ion", MODE="0660", GROUP="video"

and i have Xorg configured this way - xorg.conf :

Section "Screen"
        Identifier      "My Screen"
        Device          "fbturbo device"
        Monitor         "My Monitor"
EndSection
 
Section "Device"
        Identifier      "fbturbo device"
        Driver          "fbturbo"
        Option          "fbdev" "/dev/fb0"
        Option          "HWCursor" "false"
        Option          "SwapbuffersWait" "true"
        Option          "AccelMethod" "CPU"
EndSection
 
Section "Monitor"
        Identifier        "My Monitor"
        Option          "DPMS" "false"
EndSection
 
Section "ServerFlags"
        Option          "BlankTime" "5"
        Option          "StandbyTime" "0"
        Option          "SuspendTime" "0"
        Option          "OffTime" "0"
EndSection

But when i execute glxgears i have the following:

:~$ glxgears
LibGL error: MESA-LOADER: malformed or no PCI ID
LibGL error: unable to load driver: mali_drm_dri.so
LibGL error: driver poiner missing
LibGL error: failed to load driver: mali_drm
381 frames in 5.0 seconds = 76.157 FPS
.
.
.

and 100% CPU load.

Also mali driver test (triangle) gives error for missing files when i try to create test:

cc -Wall -o test test.c -lEGL -lGLESv2 -lX11

but since you made some changes in source, perhaps this is normal?

Should this work on H3 as on A20, or there is something else has to be done?

This is my Xorg.0.log :

 

 

[    17.559]

X.Org X Server 1.16.4

Release Date: 2014-12-20

[    17.559] X Protocol Version 11, Revision 0

[    17.559] Build Operating System: Linux 3.16.0-0.bpo.4-armmp-lpae armv7l Debian

[    17.559] Current Operating System: Linux orangepipc 3.4.112-sun8i #4 SMP PREEMPT Wed Aug 17 18:11:46 EEST 2016 armv7l

[    17.559] Kernel command line: console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 cgroup_enable=memory swapaccount=1 panic=10 consoleblank=0 enforcing=0 loglevel=1

[    17.560] Build Date: 11 February 2015  01:18:06AM

[    17.560] xorg-server 2:1.16.4-1 (http://www.debian.org/support)

[    17.560] Current version of pixman: 0.32.6

[    17.560]     Before reporting problems, check http://wiki.x.org

    to make sure that you have the latest version.

[    17.560] Markers: (--) probed, (**) from config file, (==) default setting,

    (++) from command line, (!!) notice, (II) informational,

    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

[    17.561] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Aug 18 20:41:07 2016

[    17.570] (==) Using config file: "/etc/X11/xorg.conf"

[    17.570] (==) Using system config directory "/usr/share/X11/xorg.conf.d"

[    17.580] (==) No Layout section.  Using the first Screen section.

[    17.580] (**) |-->Screen "My Screen" (0)

[    17.580] (**) |   |-->Monitor "My Monitor"

[    17.581] (**) |   |-->Device "fbturbo device"

[    17.582] (**) Option "BlankTime" "5"

[    17.582] (**) Option "StandbyTime" "0"

[    17.582] (**) Option "SuspendTime" "0"

[    17.582] (**) Option "OffTime" "0"

[    17.582] (==) Automatically adding devices

[    17.582] (==) Automatically enabling devices

[    17.582] (==) Automatically adding GPU devices

[    17.613] (==) FontPath set to:

    /usr/share/fonts/X11/misc,

    /usr/share/fonts/X11/cyrillic,

    /usr/share/fonts/X11/100dpi/:unscaled,

    /usr/share/fonts/X11/75dpi/:unscaled,

    /usr/share/fonts/X11/Type1,

    /usr/share/fonts/X11/100dpi,

    /usr/share/fonts/X11/75dpi,

    built-ins

[    17.614] (==) ModulePath set to "/usr/lib/xorg/modules"

[    17.614] (II) The server relies on udev to provide the list of input devices.

    If no devices become available, reconfigure udev or disable AutoAddDevices.

[    17.614] (II) Loader magic: 0xb6f43f18

[    17.614] (II) Module ABI versions:

[    17.614]     X.Org ANSI C Emulation: 0.4

[    17.614]     X.Org Video Driver: 18.0

[    17.614]     X.Org XInput driver : 21.0

[    17.614]     X.Org Server Extension : 8.0

[    17.615] (II) xfree86: Adding drm device (/dev/dri/card0)

[    17.616] (II) xfree86: Adding drm device (/dev/dri/card1)

[    17.616] (II) no primary bus or device found

[    17.616]     falling back to /sys/devices/platform/mali_drm.0/drm/card0

[    17.616] (II) LoadModule: "glx"

[    17.621] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so

[    17.700] (II) Module glx: vendor="X.Org Foundation"

[    17.701]     compiled for 1.16.4, module version = 1.0.0

[    17.701]     ABI class: X.Org Server Extension, version 8.0

[    17.701] (==) AIGLX enabled

[    17.701] (II) LoadModule: "fbturbo"

[    17.704] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so

[    17.718] (II) Module fbturbo: vendor="X.Org Foundation"

[    17.719]     compiled for 1.16.4, module version = 0.5.1

[    17.719]     Module class: X.Org Video Driver

[    17.719]     ABI class: X.Org Video Driver, version 18.0

[    17.719] (II) FBTURBO: driver for framebuffer: fbturbo

[    17.719] (++) using VT number 7

 

[    17.757] (WW) Falling back to old probe method for fbturbo

[    17.757] (II) Loading sub module "fbdevhw"

[    17.757] (II) LoadModule: "fbdevhw"

[    17.758] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so

[    17.760] (II) Module fbdevhw: vendor="X.Org Foundation"

[    17.760]     compiled for 1.16.4, module version = 0.0.2

[    17.760]     ABI class: X.Org Video Driver, version 18.0

[    17.760] (II) FBTURBO(0): using /dev/fb0

[    17.760] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support

[    17.761] (II) FBTURBO(0): Creating default Display subsection in Screen section

    "My Screen" for depth/fbbpp 24/32

[    17.761] (==) FBTURBO(0): Depth 24, (==) framebuffer bpp 32

[    17.761] (==) FBTURBO(0): RGB weight 888

[    17.761] (==) FBTURBO(0): Default visual is TrueColor

[    17.761] (==) FBTURBO(0): Using gamma correction (1.0, 1.0, 1.0)

[    17.761] (II) FBTURBO(0): hardware:  (video memory: 16200kB)

[    17.761] (**) FBTURBO(0): Option "fbdev" "/dev/fb0"

[    17.761] (**) FBTURBO(0): Option "HWCursor" "false"

[    17.761] (**) FBTURBO(0): Option "SwapbuffersWait" "true"

[    17.761] (**) FBTURBO(0): Option "AccelMethod" "CPU"

[    17.762] (II) FBTURBO(0): processor: ARM Cortex-A7

[    17.762] (II) FBTURBO(0): checking modes against framebuffer device...

[    17.762] (II) FBTURBO(0): checking modes against monitor...

[    17.762] (--) FBTURBO(0): Virtual size is 1920x1080 (pitch 1920)

[    17.762] (**) FBTURBO(0):  Built-in mode "current"

[    17.762] (==) FBTURBO(0): DPI set to (96, 96)

[    17.762] (II) Loading sub module "fb"

[    17.762] (II) LoadModule: "fb"

[    17.762] (II) Loading /usr/lib/xorg/modules/libfb.so

[    17.769] (II) Module fb: vendor="X.Org Foundation"

[    17.769]     compiled for 1.16.4, module version = 1.0.0

[    17.769]     ABI class: X.Org ANSI C Emulation, version 0.4

[    17.769] (==) Depth 24 pixmap format is 32 bpp

[    17.776] (II) FBTURBO(0): using backing store heuristics

[    17.784] (II) FBTURBO(0): can't load 'g2d_23' kernel module

[    17.784] (II) FBTURBO(0): failed to enable the use of sunxi display controller

[    17.784] (II) FBTURBO(0): G2D acceleration is disabled via AccelMethod option

[    17.784] (II) FBTURBO(0): enabled VFP/NEON optimizations

[    17.785] (==) FBTURBO(0): Backing store enabled

[    17.813] (II) FBTURBO(0): can't load 'sunxi_cedar_mod' kernel module

[    17.814] (II) Loading sub module "dri2"

[    17.814] (II) LoadModule: "dri2"

[    17.814] (II) Module "dri2" already built-in

[    17.815] (II) FBTURBO(0): display controller hardware overlays can't be used for DRI2

[    17.815] (II) FBTURBO(0): Wait on SwapBuffers? enabled

[    17.815] (II) FBTURBO(0): [DRI2] Setup complete

[    17.815] (II) FBTURBO(0): [DRI2]   DRI driver: lima

[    17.815] (II) FBTURBO(0): using DRI2 integration for Mali GPU (UMP buffers)

[    17.815] (II) FBTURBO(0): Mali binary drivers can only accelerate EGL/GLES

[    17.815] (II) FBTURBO(0): so AIGLX/GLX is expected to fail or fallback to software

[    17.815] (==) RandR enabled

[    17.855] (II) SELinux: Disabled on system

[    17.861] (EE) AIGLX error: dlopen of /usr/lib/arm-linux-gnueabihf/dri/lima_dri.so failed (/usr/lib/arm-linux-gnueabihf/dri/lima_dri.so: cannot open shared object file: No such file or directory)

[    17.861] (EE) AIGLX: reverting to software rendering

[    17.976] (II) AIGLX: Loaded and initialized swrast

[    17.976] (II) GLX: Initialized DRISWRAST GL provider for screen 0

[    18.253] (II) config/udev: Adding input device Shenzhen LogoTech  2.4GHz receiver  (/dev/input/event3)

[    18.254] (**) Shenzhen LogoTech  2.4GHz receiver : Applying InputClass "evdev keyboard catchall"

[    18.254] (II) LoadModule: "evdev"

[    18.254] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so

[    18.265] (II) Module evdev: vendor="X.Org Foundation"

[    18.265]     compiled for 1.16.0, module version = 2.9.0

[    18.265]     Module class: X.Org XInput Driver

[    18.265]     ABI class: X.Org XInput driver, version 21.0

[    18.265] (II) Using input driver 'evdev' for 'Shenzhen LogoTech  2.4GHz receiver '

[    18.265] (**) Shenzhen LogoTech  2.4GHz receiver : always reports core events

[    18.265] (**) evdev: Shenzhen LogoTech  2.4GHz receiver : Device: "/dev/input/event3"

[    18.265] (--) evdev: Shenzhen LogoTech  2.4GHz receiver : Vendor 0x4d9 Product 0x2519

[    18.265] (--) evdev: Shenzhen LogoTech  2.4GHz receiver : Found keys

[    18.265] (II) evdev: Shenzhen LogoTech  2.4GHz receiver : Configuring as keyboard

[    18.265] (**) Option "config_info" "udev:/sys/devices/platform/sunxi-ohci.1/usb5/5-1/5-1:1.0/input/input3/event3"

[    18.266] (II) XINPUT: Adding extended input device "Shenzhen LogoTech  2.4GHz receiver " (type: KEYBOARD, id 6)

[    18.266] (**) Option "xkb_rules" "evdev"

[    18.266] (**) Option "xkb_model" "pc105"

[    18.266] (**) Option "xkb_layout" "us"

[    18.268] (II) config/udev: Adding input device Shenzhen LogoTech  2.4GHz receiver  (/dev/input/event4)

[    18.269] (**) Shenzhen LogoTech  2.4GHz receiver : Applying InputClass "evdev pointer catchall"

[    18.269] (**) Shenzhen LogoTech  2.4GHz receiver : Applying InputClass "evdev keyboard catchall"

[    18.269] (II) Using input driver 'evdev' for 'Shenzhen LogoTech  2.4GHz receiver '

[    18.269] (**) Shenzhen LogoTech  2.4GHz receiver : always reports core events

[    18.269] (**) evdev: Shenzhen LogoTech  2.4GHz receiver : Device: "/dev/input/event4"

[    18.269] (--) evdev: Shenzhen LogoTech  2.4GHz receiver : Vendor 0x4d9 Product 0x2519

[    18.269] (--) evdev: Shenzhen LogoTech  2.4GHz receiver : Found 9 mouse buttons

[    18.269] (--) evdev: Shenzhen LogoTech  2.4GHz receiver : Found scroll wheel(s)

[    18.269] (--) evdev: Shenzhen LogoTech  2.4GHz receiver : Found relative axes

[    18.269] (--) evdev: Shenzhen LogoTech  2.4GHz receiver : Found x and y relative axes

[    18.269] (--) evdev: Shenzhen LogoTech  2.4GHz receiver : Found absolute axes

[    18.269] (II) evdev: Shenzhen LogoTech  2.4GHz receiver : Forcing absolute x/y axes to exist.

[    18.269] (--) evdev: Shenzhen LogoTech  2.4GHz receiver : Found keys

[    18.269] (II) evdev: Shenzhen LogoTech  2.4GHz receiver : Configuring as mouse

[    18.269] (II) evdev: Shenzhen LogoTech  2.4GHz receiver : Configuring as keyboard

[    18.269] (II) evdev: Shenzhen LogoTech  2.4GHz receiver : Adding scrollwheel support

[    18.269] (**) evdev: Shenzhen LogoTech  2.4GHz receiver : YAxisMapping: buttons 4 and 5

[    18.270] (**) evdev: Shenzhen LogoTech  2.4GHz receiver : EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

[    18.270] (**) Option "config_info" "udev:/sys/devices/platform/sunxi-ohci.1/usb5/5-1/5-1:1.1/input/input4/event4"

[    18.270] (II) XINPUT: Adding extended input device "Shenzhen LogoTech  2.4GHz receiver " (type: KEYBOARD, id 7)

[    18.270] (**) Option "xkb_rules" "evdev"

[    18.270] (**) Option "xkb_model" "pc105"

[    18.270] (**) Option "xkb_layout" "us"

[    18.271] (II) evdev: Shenzhen LogoTech  2.4GHz receiver : initialized for relative axes.

[    18.271] (WW) evdev: Shenzhen LogoTech  2.4GHz receiver : ignoring absolute axes.

[    18.271] (**) Shenzhen LogoTech  2.4GHz receiver : (accel) keeping acceleration scheme 1

[    18.271] (**) Shenzhen LogoTech  2.4GHz receiver : (accel) acceleration profile 0

[    18.272] (**) Shenzhen LogoTech  2.4GHz receiver : (accel) acceleration factor: 2.000

[    18.272] (**) Shenzhen LogoTech  2.4GHz receiver : (accel) acceleration threshold: 4

[    18.273] (II) config/udev: Adding input device Shenzhen LogoTech  2.4GHz receiver  (/dev/input/mouse1)

[    18.273] (II) No input driver specified, ignoring this device.

[    18.273] (II) This device may have been added with another device file.

[    18.274] (II) config/udev: Adding input device vmouse (/dev/input/event0)

[    18.274] (**) vmouse: Applying InputClass "evdev pointer catchall"

[    18.274] (II) Using input driver 'evdev' for 'vmouse'

[    18.274] (**) vmouse: always reports core events

[    18.274] (**) evdev: vmouse: Device: "/dev/input/event0"

[    18.275] (--) evdev: vmouse: Vendor 0x2 Product 0x1

[    18.275] (--) evdev: vmouse: Found 15 mouse buttons

[    18.275] (--) evdev: vmouse: Found scroll wheel(s)

[    18.275] (--) evdev: vmouse: Found relative axes

[    18.275] (--) evdev: vmouse: Found x and y relative axes

[    18.275] (II) evdev: vmouse: Configuring as mouse

[    18.275] (II) evdev: vmouse: Adding scrollwheel support

[    18.275] (**) evdev: vmouse: YAxisMapping: buttons 4 and 5

[    18.275] (**) evdev: vmouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

[    18.275] (**) Option "config_info" "udev:/sys/devices/virtual/input/input0/event0"

[    18.275] (II) XINPUT: Adding extended input device "vmouse" (type: MOUSE, id 8)

[    18.275] (II) evdev: vmouse: initialized for relative axes.

[    18.276] (**) vmouse: (accel) keeping acceleration scheme 1

[    18.276] (**) vmouse: (accel) acceleration profile 0

[    18.276] (**) vmouse: (accel) acceleration factor: 2.000

[    18.276] (**) vmouse: (accel) acceleration threshold: 4

[    18.277] (II) config/udev: Adding input device vmouse (/dev/input/mouse0)

[    18.277] (II) No input driver specified, ignoring this device.

[    18.277] (II) This device may have been added with another device file.

[    18.277] (II) config/udev: Adding input device sunxi-gpiokey (/dev/input/event1)

[    18.278] (**) sunxi-gpiokey: Applying InputClass "evdev keyboard catchall"

[    18.278] (II) Using input driver 'evdev' for 'sunxi-gpiokey'

[    18.278] (**) sunxi-gpiokey: always reports core events

[    18.278] (**) evdev: sunxi-gpiokey: Device: "/dev/input/event1"

[    18.278] (--) evdev: sunxi-gpiokey: Vendor 0x1 Product 0x1

[    18.278] (--) evdev: sunxi-gpiokey: Found keys

[    18.278] (II) evdev: sunxi-gpiokey: Configuring as keyboard

[    18.278] (**) Option "config_info" "udev:/sys/devices/virtual/input/input1/event1"

[    18.278] (II) XINPUT: Adding extended input device "sunxi-gpiokey" (type: KEYBOARD, id 9)

[    18.278] (**) Option "xkb_rules" "evdev"

[    18.278] (**) Option "xkb_model" "pc105"

[    18.278] (**) Option "xkb_layout" "us"

[    18.280] (II) config/udev: Adding input device sunxi-ths (/dev/input/event2)

[    18.280] (II) No input driver specified, ignoring this device.

[    18.280] (II) This device may have been added with another device file.

[    18.281] (II) config/udev: Adding input device MCE IR Keyboard/Mouse (sunxi-ir) (/dev/input/event6)

[    18.281] (**) MCE IR Keyboard/Mouse (sunxi-ir): Applying InputClass "evdev pointer catchall"

[    18.281] (**) MCE IR Keyboard/Mouse (sunxi-ir): Applying InputClass "evdev keyboard catchall"

[    18.281] (II) Using input driver 'evdev' for 'MCE IR Keyboard/Mouse (sunxi-ir)'

[    18.281] (**) MCE IR Keyboard/Mouse (sunxi-ir): always reports core events

[    18.281] (**) evdev: MCE IR Keyboard/Mouse (sunxi-ir): Device: "/dev/input/event6"

[    18.282] (--) evdev: MCE IR Keyboard/Mouse (sunxi-ir): Vendor 0 Product 0

[    18.282] (--) evdev: MCE IR Keyboard/Mouse (sunxi-ir): Found 3 mouse buttons

[    18.282] (--) evdev: MCE IR Keyboard/Mouse (sunxi-ir): Found relative axes

[    18.282] (--) evdev: MCE IR Keyboard/Mouse (sunxi-ir): Found x and y relative axes

[    18.282] (--) evdev: MCE IR Keyboard/Mouse (sunxi-ir): Found keys

[    18.282] (II) evdev: MCE IR Keyboard/Mouse (sunxi-ir): Configuring as mouse

[    18.282] (II) evdev: MCE IR Keyboard/Mouse (sunxi-ir): Configuring as keyboard

[    18.282] (**) evdev: MCE IR Keyboard/Mouse (sunxi-ir): YAxisMapping: buttons 4 and 5

[    18.282] (**) evdev: MCE IR Keyboard/Mouse (sunxi-ir): EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

[    18.282] (**) Option "config_info" "udev:/sys/devices/virtual/input/input6/event6"

[    18.282] (II) XINPUT: Adding extended input device "MCE IR Keyboard/Mouse (sunxi-ir)" (type: KEYBOARD, id 10)

[    18.282] (**) Option "xkb_rules" "evdev"

[    18.282] (**) Option "xkb_model" "pc105"

[    18.282] (**) Option "xkb_layout" "us"

[    18.283] (II) evdev: MCE IR Keyboard/Mouse (sunxi-ir): initialized for relative axes.

[    18.283] (**) MCE IR Keyboard/Mouse (sunxi-ir): (accel) keeping acceleration scheme 1

[    18.284] (**) MCE IR Keyboard/Mouse (sunxi-ir): (accel) acceleration profile 0

[    18.284] (**) MCE IR Keyboard/Mouse (sunxi-ir): (accel) acceleration factor: 2.000

[    18.284] (**) MCE IR Keyboard/Mouse (sunxi-ir): (accel) acceleration threshold: 4

[    18.285] (II) config/udev: Adding input device MCE IR Keyboard/Mouse (sunxi-ir) (/dev/input/mouse2)

[    18.285] (II) No input driver specified, ignoring this device.

[    18.285] (II) This device may have been added with another device file.

[    18.286] (II) config/udev: Adding input device sunxi-ir (/dev/input/event5)

[    18.286] (**) sunxi-ir: Applying InputClass "evdev keyboard catchall"

[    18.286] (II) Using input driver 'evdev' for 'sunxi-ir'

[    18.286] (**) sunxi-ir: always reports core events

[    18.286] (**) evdev: sunxi-ir: Device: "/dev/input/event5"

[    18.286] (--) evdev: sunxi-ir: Vendor 0x1 Product 0x1

[    18.286] (--) evdev: sunxi-ir: Found keys

[    18.286] (II) evdev: sunxi-ir: Configuring as keyboard

[    18.286] (**) Option "config_info" "udev:/sys/devices/virtual/rc/rc0/input5/event5"

[    18.286] (II) XINPUT: Adding extended input device "sunxi-ir" (type: KEYBOARD, id 11)

[    18.286] (**) Option "xkb_rules" "evdev"

[    18.287] (**) Option "xkb_model" "pc105"

[    18.287] (**) Option "xkb_layout" "us"

 

 

 

Link to comment
Share on other sites

I have this problem after

 

~$ make

 

SDL/SDL.h: No such file or directory arm bien

 

thenk you .

To solve this build SDL v1.2 from source:

wget https://www.libsdl.org/release/SDL-1.2.15.tar.gz
tar -xzvf SDL-1.2.15.tar.gz
cd SDL-1.2.15
./autogen.sh
./configure --prefix=/usr
make
sudo make install

I had to edit my post because it will not work with SDL 2.0 . And about the rest i was wrote, maybe it was a little rashly, because i have some progress, but can't tell if it will work yet.

Link to comment
Share on other sites

I followed the same step but I have this error

 

$ glxgears

Error: could't get an RGB, Double-buffered visual

$/usr/lib/globs/benchmarks/GL_pointz/gl_pointz

Video mode set failed: Couldn't find matching GLX visual

 

help me!!!!

Link to comment
Share on other sites

I followed the same step but I have this error

 

$ glxgears

Error: could't get an RGB, Double-buffered visual

$/usr/lib/globs/benchmarks/GL_pointz/gl_pointz

Video mode set failed: Couldn't find matching GLX visual

 

help me!!!!

Sorry this is beyond my knowledge. Maybe the author of the topic can. If you are using Armbian Desktop Jessie image, you don't need to care about memory for GPU. If you are using CLI image, you have to edit boot.cmd, by removing all mali memory restrictions and generate new boot.scr. Or maybe you could have success by building Armbian image from dimag0g branch, what i am trying to do now. There has to be glshim support build in:

git clone https://github.com/dimag0g/lib.git
cp lib/compile.sh .
./compile.sh

But glshim build failed for Xenial Desktop with dependencies error, so i am trying jessie now...

 

About adding glshim the way it's showed here, i still can't get it to work. I managed to install mali driver finally, and triangle test succeeded. But i still can't get glshim to work. Some of the errors are gone, but i still have:

LibGL error: unable to load driver: mali_drm_dri.so
Link to comment
Share on other sites

I made it to work finally! Around 3 times faster in glxgears than software in Armbian Ubuntu Xenial.

First i noticed with es2_info that i don't use mali GLES at all, but use Mesa instead, as pointed at the end of page her - http://linux-sunxi.org/Mali_binary_driver . So as advised there, mesa-egl should be move aside:

sudo mv /usr/lib/arm-linux-gnueabihf/mesa-egl/ /usr/lib/arm-linux-gnueabihf/.mesa-egl/

But this is not enough, because the location of libGL.so.1 (software GL library) in my system (probably Armbian in major), is not in "/usr/lib/" , but in "/usr/lib/arm-linux-gnueabihf/mesa", as symlink to libGL.so.1.2.0 . So my solution is a little dirty but do the job. After successful build of glshim:

cd glshim                                                                       
cmake .                                                                         
make

we have to do this:

sudo mv /usr/lib/arm-linux-gnueabihf/mesa/libGL.so.1.2.0 /usr/lib/arm-linux-gnueabihf/mesa/libGL.so.1.2.0.bak
sudo cp lib/libGL.so.1 /usr/lib/arm-linux-gnueabihf/mesa/libGL.so.1.2.0

And it's work with regular built Mali driver, not the modified way it's installed here (but will check this too :) ). Maybe there is another way to get rid of Mesa GL pointers with symlink somewhere else, but this is good enough for me, for now.

Link to comment
Share on other sites

I made it to work finally! Around 3 times faster in glxgears than software in Armbian Ubuntu Xenial.

First i noticed with es2_info that i don't use mali GLES at all, but use Mesa instead, as pointed at the end of page her - http://linux-sunxi.org/Mali_binary_driver . So as advised there, mesa-egl should be move aside:

...

And it's work with regular built Mali driver, not the modified way it's installed here (but will check this too :) ). Maybe there is another way to get rid of Mesa GL pointers with symlink somewhere else, but this is good enough for me, for now.

Locations for GL and GLES libraries are different for Debian and Ubuntu, in addition in Ubuntu there is a way to switch those libraries without overwriting and deleting files.

All this should work out of the box in new desktop Armbian builds.

Link to comment
Share on other sites

in addition in Ubuntu there is a way to switch those libraries without overwriting and deleting files.

All this should work out of the box in new desktop Armbian builds.

Would you explain this way of switch those libraries, without overwriting and deleting files? Because override /usr/lib/arm-linux-gnueabihf/mesa/libGL.so.1.2.0 is the only way i found so far, to make it work. But i already found an issue in Xorg0.log :

[    26.058] (EE) AIGLX error: dlopen of /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so failed (/usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so: undefined symbol: _glapi_tls_Dispatch)
[    26.058] (EE) GLX: could not load software renderer
[    26.058] (II) GLX: no usable GL providers found for screen 0

So i guess i have no GL acceleration for desktop, even if it could work with some aps. This is not a big problem for now, but i originally notice it when i failed to build mpv with some GL errors. It's better to do it the right way. When will Armbian 5.18 be released :)?

Link to comment
Share on other sites

When will Armbian 5.18 be released :)?

https://github.com/igorpecovnik/lib/issues/457#issuecomment-247080406

 

I wanted to say that I could build you an image for testing, but there is no need (Unless you want Xenial desktop instead of Jessie)

 

Would you explain this way of switch those libraries, without overwriting and deleting files? Because override /usr/lib/arm-linux-gnueabihf/mesa/libGL.so.1.2.0 is the only way i found so far, to make it work.

This works only on Ubuntu since it installs GL and EGL drivers to private directories: https://wiki.ubuntu.com/X/EGLDriverPackagingHOWTO

GL drivers (i.e. glshim) can be packaged in similar way.

 

I don't want to write detailed instructions now since I hope that provided packages will work.

Link to comment
Share on other sites

This works only on Ubuntu since it installs GL and EGL drivers to private directories: https://wiki.ubuntu.com/X/EGLDriverPackagingHOWTO

GL drivers (i.e. glshim) can be packaged in similar way.

 

I don't want to write detailed instructions now since I hope that provided packages will work.

I think i got the idea, thank's for the link. Will try to create the right paths and links tomorrow.

Link to comment
Share on other sites

@RagnerBG


But when i execute glxgears i have the following:

:~$ glxgears
LibGL error: MESA-LOADER: malformed or no PCI ID
LibGL error: unable to load driver: mali_drm_dri.so
LibGL error: driver poiner missing
LibGL error: failed to load driver: mali_drm
381 frames in 5.0 seconds = 76.157 FPS
.
.
.

 

I also have the same situation. Can you please, explain step by step what you did to solve the problem? I am new to Linux and not everything is clear, even if it may seem to be so at the first glance. :)

 

Also, I saw you used:

cc -Wall -o test test.c -lEGL -lGLESv2 -lX11

Does it mean, you use X11, not framebuffer?

 

I would be grateful for your answer as I have tried multiple thinks and nothing worked so far.

Link to comment
Share on other sites

 

@RagnerBG

 

I also have the same situation. Can you please, explain step by step what you did to solve the problem? I am new to Linux and not everything is clear, even if it may seem to be so at the first glance. :)

 

Also, I saw you used:

cc -Wall -o test test.c -lEGL -lGLESv2 -lX11

Does it mean, you use X11, not framebuffer?

 

I would be grateful for your answer as I have tried multiple thinks and nothing worked so far.

 

 

It's been a while and honestly, i forgot. Last time i remember, i made it to work by simply relink software mesa drivers, to glshim library. I had best results (fps in glxgears) only at first run, after reboot or something like ldconfig, fps dropped a lot for no reason. I will advice you what i did. I notice in latest Armbian 5.24 Desktop, everything work perfect, it's even a little boring because there is almost nothing i can tweak without making things only worst. And glshim give the highest fps i ever be able to reach. So don't bother yourself to discover the hot water, @zador.blood.stained and Armbian team are done great job with latest Desktop version. Not only glshim, things like subtitles from samba share, i never manage to make work from file manager (double click), they just work and i feel dumb. If you are so curious how they make it work, better ask @zador.blood.stained, i think he is behind this, not me :).

Link to comment
Share on other sites

@copytco

 

Since your other post is about Kodi please note that the best way to get Kodi is to use OpenELEC, otherwise I have no idea whether any Kodi fork can work with provided X11 Mali acceleration and cedrus/VDPAU API without using external player (mpv), AFAIK Kodi in OpenELEC works with framebuffer Mali and CedarX VE library.

 

As for GL acceleration - in Armbian 5.20 there were some issues with GLshim crashing the browsers, so now it's installed to a private directory and needs modifying LD_LIBRARY_PATH per application to use it.

Link to comment
Share on other sites

It's been a while and honestly, i forgot. Last time i remember, i made it to work by simply relink software mesa drivers, to glshim library. I had best results (fps in glxgears) only at first run, after reboot or something like ldconfig, fps dropped a lot for no reason. I will advice you what i did. I notice in latest Armbian 5.24 Desktop, everything work perfect, it's even a little boring because there is almost nothing i can tweak without making things only worst. And glshim give the highest fps i ever be able to reach. So don't bother yourself to discover the hot water, @zador.blood.stained and Armbian team are done great job with latest Desktop version. Not only glshim, things like subtitles from samba share, i never manage to make work from file manager (double click), they just work and i feel dumb. If you are so curious how they make it work, better ask @zador.blood.stained, i think he is behind this, not me :).

 

Hm, I cannot find any of those folders:

 

/usr/lib/arm-linux-gnueabihf/mesa-egl/
/usr/lib/arm-linux-gnueabihf/mesa/

 

As I am running server version of Armbian (headless) - maybe this is the issue? I have installed xorg and lightdm and run eveything using xinit, as I thought it might be a low resource draining solution to have everything working.

 

@copytco

 

Since your other post is about Kodi please note that the best way to get Kodi is to use OpenELEC, otherwise I have no idea whether any Kodi fork can work with provided X11 Mali acceleration and cedrus/VDPAU API without using external player (mpv), AFAIK Kodi in OpenELEC works with framebuffer Mali and CedarX VE library.

 

As for GL acceleration - in Armbian 5.20 there were some issues with GLshim crashing the browsers, so now it's installed to a private directory and needs modifying LD_LIBRARY_PATH per application to use it.

 

Thanks for reading my other post! Yes, indeed this is my main goal to achieve, but apart from Kodi as I also want to have Open Media Vault working is it possible to be done?

 

 

As for GL acceleration - in Armbian 5.20 there were some issues with GLshim crashing the browsers, so now it's installed to a private directory and needs modifying LD_LIBRARY_PATH per application to use it.

 

This might also be interesting thing to try, but I compledely do not know how to to that, honestly.

 

In the mean time I have modified kernel's booting options to reserve 32 MB of ram for Mali and 80 MB for 3D, but no change.

 

Also, I have discovered that

 

cc -Wall -o test test.c -lEGL -lGLESv2 -lX11

works for me without any problem. I only have issues with Kodi and

 

/usr/lib/globs/benchmarks/GL_pointz/gl_pointz 

and the terminal says

LibGL error: MESA-LOADER: malformed or no PCI ID
LibGL error: unable to load driver: mali_drm_dri.so
LibGL error: driver poiner missing
LibGL error: failed to load driver: mali_drm
fps 9.7
Link to comment
Share on other sites

Thanks for reading my other post! Yes, indeed this is my main goal to achieve, but apart from Kodi as I also want to have Open Media Vault working is it possible to be done?

If you search a little bit, you'll find these posts:

https://forum.armbian.com/index.php/topic/2104-kodi-armbian-520/

https://forum.armbian.com/index.php/topic/1161-armbian-orangepi-pc-and-kodi/

https://forum.armbian.com/index.php/topic/728-kodixbmc-on-armbian-with-hw-accleration-possible/

 

For some people older version of Kodi from jessie-backports works fine in some setups, and others switched to OpenELEC

 

As I am running server version of Armbian (headless) - maybe this is the issue? I have installed xorg and lightdm and run eveything using xinit, as I thought it might be a low resource draining solution to have everything working.

Sorry, no idea what dependencies are needed for Kodi, it's possible that you are missing something if you compiled it instead of installing a package on top of a desktop image...

Link to comment
Share on other sites

For some people older version of Kodi from jessie-backports works fine in some setups, and others switched to OpenELEC

 

Sorry, no idea what dependencies are needed for Kodi, it's possible that you are missing something if you compiled it instead of installing a package on top of a desktop image...

 

Sorry, I did not understand much from the other topics, that is why I asked for help here.

 

Hm, so it seems like maybe I could try to install Armbian desktop image and then Kodi and OMV.

Link to comment
Share on other sites

 

Hm, I cannot find any of those folders:

/usr/lib/arm-linux-gnueabihf/mesa-egl/
/usr/lib/arm-linux-gnueabihf/mesa/
In the mean time I have modified kernel's booting options to reserve 32 MB of ram for Mali and 80 MB for 3D, but no change.

 

Ok, seems you have some free time. glshim im Desktop Armbian works better and there is no mesa there, but if you want to try, if i remember, mesa will be installed along with va-driver-all :

sudo apt-get install va-driver-all

Or separately:

sudo apt-get install libegl1-mesa-drivers libegl1-mesa-dev libgles2-mesa-dev

For testing (glxgears), you need mesa-utils. It's good that mali test works for you, that's mean you will not have a problems with software mesa gles used instead of hardware mali. But you can check also with es2_info. If it reports something different than rel ES2.0 (or something like this), you need to move mesa folder aside:

sudo mv /usr/lib/arm-linux-gnueabihf/mesa-egl/ /usr/lib/arm-linux-gnueabihf/.mesa-egl/

I think, at least in Xenial, there were a way to put glshim in separate folder and to point GL/EGL there, instead of mesa, but i totally forgot the steps. There is a very useful link above, about this.

About memory reservations, just do it as in Armbian Desktop. Remove all memory restrictions and reservations and let it be auto allocated. No matter what you put in there sunxi_fb_mem_reserve will remain 16Mb and maybe other values have no meaning too (only restrictions). The only thing you can do is to activate CMA (Contiguous memory allocator) in kernel, if you are with A10/20 device, for H3 have no meaning. This will increase sunxi_fb_mem_reserve to 24Mb and will remove some annoying message in Xorg_0.log for double buffering, but with no real sensible purpose and again - A10/20 only.

Link to comment
Share on other sites

For testing (glxgears), you need mesa-utils. It's good that mali test works for you, that's mean you will not have a problems with software mesa gles used instead of hardware mali. But you can check also with es2_info. If it reports something different than rel ES2.0 (or something like this), you need to move mesa folder aside:

sudo mv /usr/lib/arm-linux-gnueabihf/mesa-egl/ /usr/lib/arm-linux-gnueabihf/.mesa-egl/

 

Thanks, but where can I find this es2_info? Also, as I said before, there is no folder as /usr/lib/arm-linux-gnueabihf/mesa-egl/ at my machine, I suppose it would appear if I have installed libegl1-mesa-drivers and libegl1-mesa-dev.

 

Also, sorry, for my maybe weird questions, but what is really Mali and what is Mesa? After the tutorial that is in the first post it seems that we are getting Mali driver to work, but finally it ends up that we would also require Mesa to work for GL only, while Mali takes care of GL ES?

Link to comment
Share on other sites

es2_info have to be installed. I think:

sudo apt-get install es2_info

will be enough. And yes - mesa folders will appear, after you install mesa drivers. Not that i am a huge specialist, but Mali400MP2(450) is 3D engine, can accelerate Gles2.0 only. Mesa is software emulation and can be used for GL, but is slow of course. glshim try to emulate GL through EGL2.0, hardware engine of Mali, but in some cases (most in my experience), if mesa is installed system will prefer software EGL through it, instead of hardware, so workaround is, as is noted in sunxi wiki, to rename mesa folder.

Link to comment
Share on other sites

After installing

 

sudo apt-get install libegl1-mesa-drivers libegl1-mesa-dev libgles2-mesa-dev

only mesa folder appeard, still no mesa-egl.

 

 

sudo apt-get install es2_info

is unable to find package with that name.

 

I think I would really need to try with desktop version to get it working.

Link to comment
Share on other sites

That's strange. I was sure i installed es2_info, this way. Did you install mesa-utils? Maybe you need mesa-utils-extra too:

sudo apt-get install mesa-utils mesa-utils-extra

maybe the last was the one, added mesa-egl. But why you need mesa-egl anyway? This is what you actually don't need and have to move aside if prevent Mali egl. If you have mali driver installed you already have hardware Gl ES2.0. I tried this on Ubuntu Xenial CLI, with Lubuntu/LXDE added manually, lastly and both folders was in /usr/lib/arm-linux-gnueabihf.

Link to comment
Share on other sites

maybe the last was the one, added mesa-egl. But why you need mesa-egl anyway? This is what you actually don't need and have to move aside if prevent Mali egl. If you have mali driver installed you already have hardware Gl ES2.0. I tried this on Ubuntu Xenial CLI, with Lubuntu/LXDE added manually, lastly and both folders was in /usr/lib/arm-linux-gnueabihf

 

Honestly, I do not know if I need mesa-egl, I just want to solve the problem, that GL is not working for globs and Kodi. Also, isn't it strange that x server is looking for mesa-loader, when I use mali driver?

Link to comment
Share on other sites

RagnerBG,

slight correction - mesa is not only SW implementation of OpenGL (ES). It can be also HW accelerated, but unfortunatelly not with Mali400 GPU. There is a stalled project to do that.

 

Thank's for clarification. I am not very familiar, just go through sunxi wiki and for some reason i left with impression, something called Lima is about 3D. But i guess it's ARM only and not for all platforms.

@copytco, if Kodi is your goal, i don't think glshim will be of much help for you. It's not for video, but for 3D gaming. I saw Doom2 and HalLife running on ARM devices with it, which is cool. For Kodi you can try to make it use external player with vdpau support, like built in mpv in Desktop Armbian. Still on my to-do list. glshim will be kind of help only for navigation and menus. But the way i made it to work is to relink GL engine to glshim library instead of /usr/lib/arm-linux-gnueabihf/mesa/ (that's why you don't need mesa-egl, but mesa only). This could be useful for games, but i tested it only with glxgers, not in real game and i already wrote about the problems. In applications like Kodi and web browsers as mentioned, this will probably, only lead to crashes and instability, since this is not real GL and don't support most of the futures, needed by those apps. I don't know what is OMW, maybe there is useful, but i think this is not what you need.

Link to comment
Share on other sites

Maybe OpenMorroWind, game?

 

Thank you both for your input. I have ment OMV, that is Open Media Vault - it can go as an image on Bananian, but it is also possible to be installed on fresh Armbian.

 

glshim will be kind of help only for navigation and menus. But the way i made it to work is to relink GL engine to glshim library instead of /usr/lib/arm-linux-gnueabihf/mesa/ (that's why you don't need mesa-egl, but mesa only).

 

Still, I would not play any videos if I will not get through the menus, right? :)

 

 

But the way i made it to work is to relink GL engine to glshim library instead of /usr/lib/arm-linux-gnueabihf/mesa/ (that's why you don't need mesa-egl, but mesa only).

 

So you made it work using that:

 

sudo cp lib/libGL.so.1 /usr/lib/arm-linux-gnueabihf/mesa/libGL.so.1.2.0

but it did not solve the issue for me.

 

One thing before switching to desktop - would it somehow be possible to run OpenELEC on Armbian not by burning it on SD card? If not - jernej, would your OpenELEC distribution support installation of OMV by any chance? If everything fails, I would try that.

Link to comment
Share on other sites

So you made it work using that:
sudo cp lib/libGL.so.1 /usr/lib/arm-linux-gnueabihf/mesa/libGL.so.1.2.0

but it did not solve the issue for me.

Oh, this is in this topic, right :). It was for Debian Jessie and i forgot about it. In Ubuntu Xenial i was creating some folders, copied some files, make some links, based on this - https://wiki.ubuntu....rPackagingHOWTO. But the results are pretty much the same. Maybe you still have to check with es2_info (try to install mesa-utils-extra, if it is there) and check the links in /usr/lib/arm-linux-gnueabihf/mesa/ after you replace library, if they point to newer libGL.so.1.2.0. But for the last time - you will have no use of glshim in Kodi or other program. For Kodi just install libegl1-mesa-drivers, software or not, you will have menus. And maybe you have to try Xenial. For some reason i got 30% more fps in glxgears, software rendering, compared to Jessie, glshim have the same fps for both.

Link to comment
Share on other sites

For Kodi just install libegl1-mesa-drivers, software or not, you will have menus. And maybe you have to try Xenial. For some reason i got 30% more fps in glxgears, software rendering, compared to Jessie, glshim have the same fps for both.

 

I installed that, but nothing changed, unfortunately. I will try to experiment with Desktop. I guess, legacy would be better for this purpose, right?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines