Jump to content
  • 0

CuBox-i4Pro and X11 GPU support


Guest

Question

Hi there,

is there a chance to have hardware acceleration for the armbian images for stretch?

I build the debian stretch default desktop version, but there is no xserver-xorg-video-imx-viv and thus the desktop feels really laggy.

 

Regards
   Georg

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

OK, so I build Armbian 5.35 Xenial Next Desktop out of the git repo with 24fbb01.

 

After I startup and configure the user X doesn't come up , see the attached Xorg.0.log :

 

[    68.024] (EE) modeset(0): Failed to initialize glamor at ScreenInit() time.
[    68.024] (EE)
Fatal server error:
[    68.024] (EE) AddScreen/ScreenInit failed for driver 0
[    68.025] (EE)
[    68.025] (EE)

 

Regards

  Georg

Xorg.0.log

Link to comment
Share on other sites

  • 0

Unfortunately, you hit another (known) Ubuntu Xenial bug.

Only Debian Stretch desktop is currently available to build for imx6 based boards. I didn't have time to get to the bottom of the issue so I don't know exactly where is the problem and how to solve it.

Link to comment
Share on other sites

  • 0

Well thanks to @Astralix at least I could start X now. :-) It was the X server setting for the fb device. With this setting X is starting up.

 

But unfortunately X is not accelerated and performance is very poor. I think there is some X/GLX driver missing. I tried glmark2-drm on the console using the framebuffer directly it was smooth (gave me a score of 20). glmark2 under X gave me a score of 8, because it was using software rendering (Gallium llvm pipe).

 

I will check more details next week.

 

@Astralix Did you manage to get an accelerated X?

 

Regards

  Georg

 

 

 

Link to comment
Share on other sites

  • 0

Hi @AnArmbianUser!

There are two acceleration systems, 2D/3D graphics and video. I did not focus on these, as I am using the desktop only for controlling the unit. I will investigate on the graphics system around end of January, as till then the most needed features of the project itself are implemented. As it is an amateur radio, there is no primary focus on graphics acceleration. But I really would appreciate, if all the GPU and VPU stuff would work in a modern kernel 4.1x.y more or less out of the box. It is so easy to get all the needed licenses for legal use of the CoDecs but it is so hard to get the licensed code from the company who manufactures the iMX SOC... Whichever company that might be tomorrow, or next week ;)

 

Regards

Ulrich

 

 

Link to comment
Share on other sites

  • 0

Hi @Astralix ,

 

in the meanwhile I was able to build the XF86 video driver for 2D and 3D acceleration follwing the instructions in this repo. It looks a bit strange, because the driver is developed in the unstable_devel branch and master hasn't been touched for a while plus it uses code from two other external repos. Nevertheless compilation worked out of the box (I followed the etnadrm path described at the bottom of the README file).

 

To enable the XF86 driver you have to add the following to the XF86 config:


 

    Section "Device"
        Identifier      "Driver0"
        Screen          0
        Driver          "armada"
    EndSection

With this I was able to get glmark2 and glxgears to show up and apparently both are running with hardware acceleration. For glmark2 I had to set "MESA_GL_VERSION_OVERRIDE=2.1", because the etnaviv mesa driver reported only 1.4 .

 

Also chromium reports support for hardware acceleration now. Please note that the chromium ubuntu armhf build by default uses the setting "enable-low-end-device-mode" which shows webpages and especially pictures in a distored way. To use standard rendering you have to override the default chromium flags (set in /etc/chromium-browser/default):

 

echo CHROMIUM_FLAGS=>~/.chromium-browser.init

Regards

   Georg

Link to comment
Share on other sites

  • 0

I was also able to get hardware acceleration going following the same howto. http://git.arm.linux.org.uk/cgit/xf86-video-armada.git/tree/README?h=unstable-devel The one thing I did different is that I used the Etnaviv GPU driver. Here is the steps I took.

cd Downloads
git clone git://git.armlinux.org.uk/~rmk/libdrm-armada.git/
cd armada/
ls -l
cd libdrm-armada/
ls
mkdir m4; autoreconf -f -i
./configure --prefix=/usr --enable-etnaviv
make
sudo make install
cd ..
ls
git clone https://github.com/laanwj/etna_viv.git
sudo git clone https://github.com/laanwj/etna_viv.git
ETNA_SRC=$PWD/etna_viv
git clone git://git.armlinux.org.uk/~rmk/xf86-video-armada.git/
sudo git clone git://git.armlinux.org.uk/~rmk/xf86-video-armada.git/
ls
cd xf86-video-armada/
ls
git checkout unstable-devel
echo $ETNA_SRC
# If make does not work the first time you can "make clean" after you have fixed the problems

./autogen.sh --prefix=/usr --disable-vivante --enable-etnaviv --with-etnaviv-source=$ETNA_SRC
make
sudo make install
ls
cd conf/
ls
vim xorg-sample.conf 
sudo cp xorg-sample.conf /etc/X11/xorg.conf
# We need to install a more recent version of libgl1-mesa-dri to get the Etnaviv GPU driver. 
# This will install version 13.0.6 which is not the latest. To get the latest we will have to compile it ourself.
# Use apt pinning for this.
# Create files /etc/apt/preferences if it does not already exist.
# Add this
Package: *
Pin: release a=stable
Pin-Priority: 1000

Package: *
Pin: release a=unstable
Pin-Priority: 2

Package: libgl1-mesa-dri
Pin: release a=unstable
Pin-Priority: 1001

# You may need to add all of libgl1-mesa-dri dependecies as well to this apt pinning preferences.


# Add this to /etc/apt/sources.list
deb http://ftp.it.debian.org/debian unstable main contrib non-free
# Then install libgl1-mesa-dri
apt-get update
apt-get -t unstable install libgl1-mesa-dri
reboot

glxgears -info

I am on Armbian Stretch with kernel 4.13.16.

Please correct me if I miss spoken.

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