How to setup Xorg and display drivers?

Post Reply
victorfeitosa
Posts: 7
Joined: Thu Jul 23, 2020 10:50 pm
languages_spoken: english
ODROIDs: xu4
Has thanked: 1 time
Been thanked: 0
Contact:

How to setup Xorg and display drivers?

Post by victorfeitosa »

Hey ODROID team. I'm using Ubuntu and Armbian with no graphical desktop. I'd like to properly configure the video drivers and Xorg without having to install a desktop distribution so I can run X11 apps with hardware acceleration with startx/xinit. Currently the performance is taking a huge hit with a default installation of Xorg but if I test OpenGL ES performance with the Mate image it works way better. Is there a guide or reference manual I could refer to so I could configure the drivers and display properly? I really would like to avoid having to install a desktop image just to get the apps running well.

Tldr; a default installation of Xorg in a terminal only image has an awful performance in graphical applications, but it runs well on a desktop image. I'd like to know how to properly configure Xorg and video drivers.

Thanks!

User avatar
odroid
Site Admin
Posts: 34947
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 960 times
Been thanked: 775 times
Contact:

Re: How to setup Xorg and display drivers?

Post by odroid »

Did you install "mali-x11" package and could you run "es2gears"?

User avatar
meveric
Posts: 11124
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4
Has thanked: 44 times
Been thanked: 390 times
Contact:

Re: How to setup Xorg and display drivers?

Post by meveric »

odroid wrote:
Mon Aug 03, 2020 11:34 am
Did you install "mali-x11" package and could you run "es2gears"?
There should be more steps involved.
GPU drivers is one part, but you also need the correct xorg.conf file, set the permissions for /dev/mali* correctly.
Have the correct X11 drivers installed (armsoc most likely), and in the end run everything with xinit if that's the goal.
Lots of steps to handle.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

victorfeitosa
Posts: 7
Joined: Thu Jul 23, 2020 10:50 pm
languages_spoken: english
ODROIDs: xu4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: How to setup Xorg and display drivers?

Post by victorfeitosa »

This is the package list I'm installing:

Code: Select all

xserver-xorg xinit xcompmgr xterm dbus-x11 xfonts-base x11-xserver-utils x11-utils libgl1-mesa-dri mesa-utils mesa-utils-extra libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libgles2-mesa-dev
The mali-x11 packages are either mali-t62 or mali-t76, which version should I use?

I'm using armsoc video drivers since that's the one dietpi seems to use, and I'm running a few custom OpenGL ES examples from the Raylib game programming library. Dietpi also installs the
If I run them on Ubuntu Mate or Dietpi they run perfectly at 60fps but I seem to get a huge performance hit if I do it in Armbian or Ubuntu Minimal probably because of poor configuration.

I'm also installing DRM libraries for exynos to try to bump the performance a little bit but still not as good as when running in the distros mentioned.

AreaScout
Posts: 1384
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4
Has thanked: 62 times
Been thanked: 202 times
Contact:

Re: How to setup Xorg and display drivers?

Post by AreaScout »

    Only the legacy kernel images do have mali gpu drivers compiled in the kernel, be careful what you are installing current and dev branch have panfrost driver enabled and mali disabled
    You should also add the odroid package servers to your apt source list, after that you can install the mali-x11 package and of course follow the hints from meveric's post

    Code: Select all

    odroid@odroid:~$ cat /etc/apt/sources.list.d/odroid.list
    deb http://deb.odroid.in/5422-s/ bionic main
    
    RG

    User avatar
    meveric
    Posts: 11124
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4
    Has thanked: 44 times
    Been thanked: 390 times
    Contact:

    Re: How to setup Xorg and display drivers?

    Post by meveric »

    This probably depends a lot of the OS you use.
    DietPi is normally based on my Debian images and not Ubuntu, therefor they normally use the drivers I provide in my repository.
    I don't have mali-x11 drivers, I have malit628-odroid as GPU drivers.

    Ubuntu from hardkernel uses the mali-x11 package instead.

    You should also not mix repos, so if you are using DietPi and Debian, you should NOT add the repo from HardKernel which is for Ubuntu, as you may damage the OS beyond repair.

    As AreaScout mentioned it also depends on the Kernel you're using. 3.10 and 4.14 are the "legacy" Kernel that he was referring to, and are currently best supported (especially Kernel 4.14).
    Other Kernel (e.g. 5.x) will be even harder to set up as they are not stable yet and may require totally different drivers and configurations.
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    victorfeitosa
    Posts: 7
    Joined: Thu Jul 23, 2020 10:50 pm
    languages_spoken: english
    ODROIDs: xu4
    Has thanked: 1 time
    Been thanked: 0
    Contact:

    Re: How to setup Xorg and display drivers?

    Post by victorfeitosa »

    @meveric got it. I'm currently installing things in Armbian with the 4.15 kernel. Dietpi works well but is a pain to get the audio working.
    I can attach my xorg.conf if you think that might help as well. I'll try to run the examples and see what I get out of the log.

    Thanks for the pointers everyone! I'll also use meveric's repos to see what I can add to armbian. I'm currently just brute forcing the solution right now I'll eventually try to get a clean image with everything installed properly and might even get a /sh out of it.

    victorfeitosa
    Posts: 7
    Joined: Thu Jul 23, 2020 10:50 pm
    languages_spoken: english
    ODROIDs: xu4
    Has thanked: 1 time
    Been thanked: 0
    Contact:

    Re: How to setup Xorg and display drivers?

    Post by victorfeitosa »

    Alright quick update
    I got the mali-t62x-x11-driver installed, libdrm-exynos1 and configured my Xorg with the following conf file:

    Code: Select all

    # X.Org X server configuration file for xf86-video-armsoc-odroid
    
    Section "Device"
            Identifier      "Mali-Fbdev"
            Driver          "armsoc"
            Option          "fbdev"                 "/dev/fb0"
            Option          "Debug"                 "false"
            Option          "DPMS"                  "false"
            Option          "NoFlip"                "true"
            Option          "NoHardwareMouse"       "true"
            Option          "NoG2D"                 "false"
    EndSection
    
    Section "Screen"
            Identifier      "Default Screen"
            Device          "Mali-Fbdev"
            DefaultDepth    24
    EndSection
    
    Section "DRI"
            Mode 0666
    EndSection
    
    Section "Monitor"
            Identifier      "Generic Monitor"
            Option          "DPMS"                  "Off"
    EndSection
    
    ## disable automatic HDMI turn off
    Section "ServerLayout"
            Identifier      "DefaultLayout"
            Option          "BlankTime"             "0"
            Option          "StandbyTime"           "0"
            Option          "SuspendTime"           "0"
            Option          "OffTime"               "0"
    

    Raylib examples seem to run way better, but I wonder if there would be something I'm missing that could further improve everything.
    This is working out of the Armbian buster image, I'll try it later with the Ubuntu Minimal 18. I'm hesitant to use the latest kernels and such so I won't fall into compatibility issues or stuff like that though.
    In another topic, alsa seems to be giving me trouble now, aplay outputs nothing but noise now but thats completely offtopic.

    Post Reply

    Return to “Ubuntu”

    Who is online

    Users browsing this forum: No registered users and 1 guest