Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Talking about OS and emulation core development
Post Reply
mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

Hello!

This is a reference image for those willing to start development with Vulkan on Go Ultra.

Kernel 6.1.y
Mali Drivers r40p0 with Vulkan Support
Wayland Support
GE2D enabled

This image is the first release, its considered in alpha state many issues will be addressed over time.

To start weston type:
weston --tty=1 &
glmark2-es2-wayland and vkcube demos can be found on /root/mali folder

Demo video of vkcube and glmark2-es2 on weston: https://www.youtube.com/watch?v=Ragvx_qOut8
Kernel sources: https://github.com/mdrjr/linux/tree/odroidg12-6.1.y
Download link: https://www.odroid.in/ubuntu_22.04lts/testing/

These users thanked the author mdrjr for the post (total 10):
patto618 (Mon Jan 30, 2023 7:53 am) • notime2d8 (Mon Jan 30, 2023 8:29 am) • Pyohwan (Mon Jan 30, 2023 10:00 am) • sigmich (Tue Jan 31, 2023 7:15 pm) • odjinan (Wed Feb 01, 2023 3:43 am) • cman122887 (Fri Feb 03, 2023 1:04 pm) • allanmac (Fri Feb 03, 2023 11:42 pm) • Slaminger (Sun Feb 12, 2023 1:17 am) • Beat96 (Mon Feb 13, 2023 2:40 am) • JohnnyonFlame (Wed Apr 05, 2023 12:04 pm)

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

I built a Wayland patched version of Dolphin to try out Vulkan. There is a very noticeable performance difference!
https://github.com/JustEnoughLinuxOS/di ... land.patch

The joystick driver from the old kernel needs to be ported. The current drivers split the gamepad into three different devices making it impossible to use..

I currently have no audio. I will need to further investigate this.

[edit]
Using the following configuration for proper screen rotation

Code: Select all

$ cat /etc/xdg/weston/weston.ini 
[core]
# Disable idle timeout
idle-time=0
backend=drm-backend.so


[output]
name=Unknown-1
mode=480x854@60.0
transform=rotate-90
[edit 2]
CPUs and GPU set to "performance"

Code: Select all

echo performance | sudo tee /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/governor
echo performance | sudo tee /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo performance | sudo tee /sys/devices/system/cpu/cpufreq/policy2/scaling_governor
Last edited by crashoverride on Mon Jan 30, 2023 10:57 am, edited 2 times in total.

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

Audio works on the image.
Joypad driver indeed splits in 3 devices.

User avatar
odroid
Site Admin
Posts: 41084
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3194 times
Been thanked: 1753 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by odroid »

mdrjr wrote:
Mon Jan 30, 2023 10:33 am
Audio works on the image.
Do you mean the speaker as well as the earphone jack both work fine?

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

odroid wrote:
Mon Jan 30, 2023 10:37 am
mdrjr wrote:
Mon Jan 30, 2023 10:33 am
Audio works on the image.
Do you mean the speaker as well as the earphone jack both work fine?
Correct. Both works.

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

I get the following error using speaker-test:

Code: Select all

# speaker-test -c 2

speaker-test 1.2.6

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 4 to 285326
Period size range from 2 to 142664
Using max buffer size 285324
Periods = 4
Unable to set hw params for playback: Invalid argument
Setting of hwparams failed: Invalid argument
The following errors appear in dmesg:

Code: Select all

[12853.465869]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[12853.467205]  fe.dai-link-0: ASoC: error at dpcm_fe_dai_prepare on fe.dai-link-0: -22

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

I compiled PPSSPP. The Vulkan backend fails in SDL2. This is likely a SDL2 issue:
https://github.com/libsdl-org/SDL/issues/4650

Using GLES, the performance is near perfect 60FPS in GoW Ghost of Sparta. The half framerate vsync issue no longer present and so far Mali performance is great!
These users thanked the author crashoverride for the post:
odroid (Mon Jan 30, 2023 2:08 pm)

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

crashoverride wrote:
Mon Jan 30, 2023 11:04 am
I get the following error using speaker-test:

Code: Select all

# speaker-test -c 2

speaker-test 1.2.6

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 4 to 285326
Period size range from 2 to 142664
Using max buffer size 285324
Periods = 4
Unable to set hw params for playback: Invalid argument
Setting of hwparams failed: Invalid argument
The following errors appear in dmesg:

Code: Select all

[12853.465869]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[12853.467205]  fe.dai-link-0: ASoC: error at dpcm_fe_dai_prepare on fe.dai-link-0: -22
Try this:

Code: Select all

wget deb.odroid.in/asound.gou
alsactl --file asound.gou restore
These users thanked the author mdrjr for the post:
odroid (Mon Jan 30, 2023 10:40 pm)

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

I replaced the /etc/asound.conf with the contents of that file and sound is now produced. However, it is very bad quality. I have not measured it, but my first thought was that its 8Khz sample rate with a 8bit DAC. I was previously using a USB audio adapter so the change was very noticeable.

Its worth mentioning that after connecting a USB audio DAC and XBOX360 gamepad, I was able to play test some Dolphin (GameCube) games, and the performance is GREAT!. Huge thank to @mdrjr and the HardKernel team for making this happen.

fewt
Posts: 2
Joined: Wed Feb 01, 2023 4:43 am
languages_spoken: english
ODROIDs: 1
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by fewt »

mdrjr wrote:
Mon Jan 30, 2023 3:32 am
Hello!

This is a reference image for those willing to start development with Vulkan on Go Ultra.

Kernel 6.1.y
Mali Drivers r40p0 with Vulkan Support
Wayland Support
GE2D enabled

This image is the first release, its considered in alpha state many issues will be addressed over time.

To start weston type:
weston --tty=1 &
glmark2-es2-wayland and vkcube demos can be found on /root/mali folder

Demo video of vkcube and glmark2-es2 on weston: https://www.youtube.com/watch?v=Ragvx_qOut8
Kernel sources: https://github.com/mdrjr/linux/tree/odroidg12-6.1.y
Download link: https://www.odroid.in/go-ultra-testing/

It looks like it might be pretty simple to pull these changes out and apply them as a patch to the mainline kernel, are you planning on upstreaming this?

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

Not at this moment there are small things to be fixed
These users thanked the author mdrjr for the post:
fewt (Thu Feb 02, 2023 1:07 am)

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

It took me forever to accomplish getting weston to load as a systemd service using an ordinary user (not root). So, I will leave some notes here for others.

First, the user (odroid) needs to be in the "video" group. Then permission for the following files need to be set (owner=root:video, read/write for both):
/dev/mali0
/dev/dma_heap/linux,cma

The weston.service file is as follows:

Code: Select all

[Unit]
Description=Weston
Conflicts=plymouth-quit.service
After=plymouth-quit.service

[Service]
# the VT is cleared by TTYVTDisallocate
Environment="XDG_RUNTIME_DIR=/var/run/user/1000/"
ExecStartPre=-/bin/plymouth deactivate
ExecStart=-/usr/bin/weston-launch --user odroid --tty /dev/tty7
ExecStartPost=-/bin/sleep 5
WorkingDirectory=/home/odroid
Type=simple
UtmpIdentifier=%I
TTYPath=/dev/tty7
IgnoreSIGPIPE=no
#Restart=always
RestartSec=1

[Install]
Alias=multi-user.target.wants/weston@tty7.service
[edit]
For vulkan to work:

Code: Select all

chmod a+r /usr/share/vulkan/implicit_layer.d
These users thanked the author crashoverride for the post (total 2):
allanmac (Mon Feb 06, 2023 12:53 am) • odroid (Mon Feb 06, 2023 9:16 am)

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

I have built the most recent version of EmulationStation from the Retropie fork and got it working. I am currently able to launch both Dolphin and PPSSPP with it. I still need to add Wayland support to the other emulators, but things are progressing.

There only appears to be VP9 video decoding support (V4L2-M2M) and no video encoding support. Therefore, the planned game streaming feature can not be enabled on this kernel at this time.

User avatar
odroid
Site Admin
Posts: 41084
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3194 times
Been thanked: 1753 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by odroid »

Thank you for the updates.

We are fixing the PMIC issue to reduce the power consumption in the power-off state.
We also look into the I2S driver to improve the audio quality.

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

I added Wayland support to libgs0. The retrorun-gs0 frontend is now working and everything else should "just work" now. Testing with genesis for 2D and flycast for 3D libretro cores shows very good performance.

Of particular interesting is that everything using GLES has to be linked against libmali. This breaks the compilation of almost everything since programs typically link against EGL and GLESv2 only. I looked into the the stub files provided by ARM in the official mali driver and they appear to be correct. At this time, I do not know what is preventing linking from working properly.

[edit]
Also of interest to developers are the following:

There is no DRM render node (/dev/dri/renderD128). Programs attempting to use a render node will fail.

GBM buffers appear to only support "RENDER". Attempting to create a "SCANOUT" or "LINEAR" buffer failed for me. The fallback of using a DRM "dumb" buffer also fails since no DRM render nodes are present, and it is purposely disallowed on "card0" unless a program is the DRM "master" (a role which belongs to Wayland).

One of the libgs0 tests reveals a cache coherency issue. When updating a GBM buffer from the CPU and using it as a DMABUF texture source, occasionally "snow" will be seen. Since libgs0 uses explicit DMABUF synchronization, this almost certainly is a kernel/mali driver issue.
These users thanked the author crashoverride for the post:
notime2d8 (Wed Feb 08, 2023 8:39 am)

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

crashoverride wrote:
Wed Feb 08, 2023 3:02 am
Of particular interesting is that everything using GLES has to be linked against libmali.
I believe I have found the answer to this in the "Linking against the libbar.so shared library" section:
https://www.kaizou.org/2015/01/linux-libraries.html
if the linker output is a shared relocatable ELF object (ie a shared library), and the –copy-dt-needed-entries option is set (this is the legacy behavior) it will add all DT_NEEDED entries from the input library as new DT_NEEDED entries in the output,

if the linker output is a shared relocatable ELF object (ie a shared library), and if the –no-copy-dt-needed-entries option is set (this is the new default behavior for binutils, following a move initiated by major distros like Fedora ) it will simply ignore all DT_NEEDED entries from the input library,

if the linker ouput is a non-shared, non-relocatable link (our case), it will automatically add the libraries listed in the DT_NEEDED of the input library on the link command line, producing an error if it can’t locate them.
The libEGL.so.1.40 and libGLESv2.so.2.1.0 contain the proper DT_NEEDED reference to libmali.so.0. However, since they are a secondary dependency, the DT_NEEDED is now ignored creating unresolved symbols that cause the link the fail.

More details can be found at the link referenced in the article:
https://fedoraproject.org/wiki/Understa ... LinkChange

[edit]
The solution appears to be to remove the stub files provided and replace them with symlinks to libmali.so.0. I am still testing this.
These users thanked the author crashoverride for the post:
odroid (Wed Feb 08, 2023 9:16 am)

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

Running flycast with Crazy Taxi 2, I encountered the following error in dmesg causing it to crash:

Code: Select all

[695437.702382] mali ffe40000.gpu: Unhandled Page fault in AS2 at VA 0x000000100923B0C0
                Reason: Memory is not mapped on the GPU
                raw fault status: 0x5002C1
                exception type 0xC1: TRANSLATION_FAULT
                access type 0x2: READ
                source id 0x50
                pid: 47779
[695437.726683] mali ffe40000.gpu: error detected from slot 0, job status 0x00000004 (TERMINATED)
[695437.726719] mali ffe40000.gpu: t6xx: GPU fault 0x04 from job slot 0
I can't think of any reason a user space program could cause this. So, its likely a libmali driver issue.

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

I brought up mupen64plus (N64). It required fixes due to the updated GCC version in the test image. Since its been brought up before, this is the reason the reference image does not use "bleeding edge" versions of Ubuntu.

While playing Conkers Bad Fur Day, I was able to confirm that screen tearing is present. I had noticed it before in other emulators but wasn't 100% certain until the opening scene in the tavern where the camera pans from the fireplace. Since the GOU display is rotated, it appears vertically instead of horizontally near the right hand side of the display. Since "perfect frames" are entirely handled by Wayland, there is nothing I can do to resolve it.
These users thanked the author crashoverride for the post:
allanmac (Tue Feb 14, 2023 10:09 am)

allanmac
Posts: 22
Joined: Mon May 04, 2020 2:00 am
languages_spoken: english
ODROIDs: N2
Location: South Florida, USA
Has thanked: 12 times
Been thanked: 9 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by allanmac »

I have a repeatable set of userpatches working on Armbian "current" that enable the R40 driver.

The work in this thread by @mdrjr and @crashoverride has helped a lot. Thanks! 🙏

I need a reliable Mali G52 Vulkan device for testing applications and this now seems to be working.

I'll try to put up a blog post at some point.

Here's a full-screen 1080p capture of glmark2-es2-wayland --fullscreen --annotate:

These users thanked the author allanmac for the post:
odjinan (Tue Feb 14, 2023 6:07 am)

allanmac
Posts: 22
Joined: Mon May 04, 2020 2:00 am
languages_spoken: english
ODROIDs: N2
Location: South Florida, USA
Has thanked: 12 times
Been thanked: 9 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by allanmac »

crashoverride wrote:
Wed Feb 08, 2023 4:25 am
The solution appears to be to remove the stub files provided and replace them with symlinks to libmali.so.0. I am still testing this.
This is a good tip!

I'm also trying to discover why the Vulkan SDK's vulkanCapsViewer utility -- which depends on QT5 Wayland -- is failing with undefined symbol: eglGetPlatformDisplay unless the libEGL.* symlinks point to libmali.so.

Still digging.

Update:

I keep all the Mali binaries in /usr/local/lib/aarch64-linux-gnu and was prepending it to the search list instead of appending:

Code: Select all

root@odroidn2:~# cat /etc/ld.so.conf.d/aarch64-linux-gnu.conf
# Multiarch support
/lib/aarch64-linux-gnu
/usr/lib/aarch64-linux-gnu
/usr/local/lib/aarch64-linux-gnu <--- this works

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

I am in the processes of creating an updated reference image based on the new kernel and mali driver.

The libmali linking issue remains problematic. I put all the mali files "as-is" from the driver package into /usr/local/lib/aarch64-linux-gnu. This prevents them from being overwritten by an OS update of Mesa. It also has an additional advantage. Any program that attempts to compile against libEGL.so, libGLESv2.so, etc. all pick the Mesa libraries which contain all the proper symbols and results in a successful compilation. At runtime, the linker directs the library loading to libmali.so.0. While this works for most things, it breaks when a program attempts to explicitly link against /usr/local/lib/aarch64-linux-gnu/libEGL.so, etc. Currently EmulationStation does this. I did find an easy solution to it as follows:

For EmulationStation

Code: Select all

cmake . -DGLES=ON -DGLES_EXTRA_LIBRARIES=mali
As stated before, the kernel 6.x lacks features found in the vendor kernel. In addition to the video codecs, the MTP (USB file access) driver is also missing. I have selected a new package (umtp-responder) to provide MTP. It is slower than the kernel based solution.

Hopefully, if all goes well, I will have a new reference image preview in the next week!
These users thanked the author crashoverride for the post (total 3):
odroid (Thu Feb 16, 2023 9:10 am) • Andyyy (Thu Feb 16, 2023 11:04 am) • allanmac (Fri Feb 17, 2023 1:00 am)

allanmac
Posts: 22
Joined: Mon May 04, 2020 2:00 am
languages_spoken: english
ODROIDs: N2
Location: South Florida, USA
Has thanked: 12 times
Been thanked: 9 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by allanmac »

A Vulkan packaging tip!

The ARM r40 release has two archives:
  • mali.tar.xz
  • rootfs_additions.tar.xz
By default, the Linux Vulkan loader (libVulkan) will search several different paths for layer and ICD files. (See links)

If you unarchive these two archives into /usr/local then Vulkan won't find the layers and ICD.

The transformations to make it work are:
  • For the mali.tar.xz archive: move usr/vulkan/* to share/vulkan to avoid creating a meaningless /usr/local/usr/... path.
  • For the rootfs_additions.tar.xz archive: move etc/vulkan/* to share/vulkan.
The entire /usr/local/ relative tree should look like this:

Code: Select all

etc/modules-load.d/ibb_load.conf  <-- unnecessary if not a module?

share/vulkan/icd.d/mali.json
share/vulkan/implicit_layer.d/libVkLayer_window_system_integration.so
share/vulkan/implicit_layer.d/VkLayer_window_system_integration.json

lib/aarch64-linux-gnu/libmali.so.0.40.0
lib/aarch64-linux-gnu/libGLESv2.so -> libGLESv2.so.2
lib/aarch64-linux-gnu/libgbm.so.1.0.0
lib/aarch64-linux-gnu/libgbm.so -> libgbm.so.1
lib/aarch64-linux-gnu/libgbm.so.1 -> libgbm.so.1.0.0
lib/aarch64-linux-gnu/libOpenCL.so.2.1.0
lib/aarch64-linux-gnu/libGLESv2.so.2.1.0
lib/aarch64-linux-gnu/libwayland-egl.so.1 -> libwayland-egl.so.1.0.0
lib/aarch64-linux-gnu/libmali.so -> libmali.so.0
lib/aarch64-linux-gnu/libGLESv2.so.2 -> libGLESv2.so.2.1.0
lib/aarch64-linux-gnu/libOpenCL.so.2 -> libOpenCL.so.2.1.0
lib/aarch64-linux-gnu/libEGL.so -> libEGL.so.1
lib/aarch64-linux-gnu/libwayland-egl.so.1.0.0
lib/aarch64-linux-gnu/libGLESv1_CM.so.1.1.0
lib/aarch64-linux-gnu/libwayland-egl.so -> libwayland-egl.so.1
lib/aarch64-linux-gnu/libEGL.so.1 -> libEGL.so.1.4.0
lib/aarch64-linux-gnu/libmali.so.0 -> libmali.so.0.40.0
lib/aarch64-linux-gnu/libOpenCL.so -> libOpenCL.so.2
lib/aarch64-linux-gnu/libGLESv1_CM.so -> libGLESv1_CM.so.1
lib/aarch64-linux-gnu/libEGL.so.1.4.0
lib/aarch64-linux-gnu/libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1.0
This doesn't include any symbolic link changes to /usr/local/lib/aarch64-linux-gnu/* libraries that @crashoverride has noted.

notime2d8
Posts: 350
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 106 times
Been thanked: 158 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by notime2d8 »

Does suspend/resume work with this build? What's missing to support it? 🤔

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

crashoverride wrote:
Wed Feb 08, 2023 5:29 am
While playing Conkers Bad Fur Day, I was able to confirm that screen tearing is present. I had noticed it before in other emulators but wasn't 100% certain until the opening scene in the tavern where the camera pans from the fireplace. Since the GOU display is rotated, it appears vertically instead of horizontally near the right hand side of the display. Since "perfect frames" are entirely handled by Wayland, there is nothing I can do to resolve it.
I isolated the issue to the kernel KMS/DRM video driver. It does not appear to have vblank working. Calling drmWaitVBlank does nothing useful.
These users thanked the author crashoverride for the post:
odroid (Mon Feb 20, 2023 2:15 pm)

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

The tearing issue is indeed due to the video driver. It puzzled me at first because the meson DRM driver has vblank support. As it turns out, the meson video driver is not actually used! The video driver is "simple-framebuffer":
https://github.com/mdrjr/linux/blob/6bd ... ts#L32-L47
https://github.com/torvalds/linux/blob/ ... simplefb.c
https://www.kernel.org/doc/Documentatio ... buffer.txt

Proper MIPI-DSI support will need to be added to the meson display driver to get vsync, multiple planes, and video (YUV) features.

allanmac
Posts: 22
Joined: Mon May 04, 2020 2:00 am
languages_spoken: english
ODROIDs: N2
Location: South Florida, USA
Has thanked: 12 times
Been thanked: 9 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by allanmac »

FYI, I've pinged ARM and they're working through some issues before updating the Mali R40 binaries for N2+ to their latest (R42/43?).

crashoverride
Posts: 5798
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 613 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by crashoverride »

crashoverride wrote:
Thu Feb 16, 2023 5:14 am
Hopefully, if all goes well, I will have a new reference image preview in the next week!
A developer preview is now available at the following location:
https://wiki.odroid.com/odroid_go_ultra ... s_20230223

Note that there are many issues remaining. Therefore, the image is only recommended for developers and advanced users.
These users thanked the author crashoverride for the post:
allanmac (Sat Feb 25, 2023 10:54 pm)

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

I have pushed some changes to GO Ultra on 6.1, including some missing frequencies.
Bumped to 6.1.15
I did some work on the Audio side, only a magical kernel panic is still ongoing to be fixed, hopefully this week a patch will appear on my github!
These users thanked the author mdrjr for the post (total 3):
Andyyy (Wed Mar 22, 2023 10:34 am) • odjinan (Wed Mar 22, 2023 1:06 pm) • allanmac (Fri Mar 24, 2023 10:30 am)

brooksytech
Posts: 67
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 60 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by brooksytech »

So I have been using your kernel and these mali drivers to build Jelos for the OGU. I finally everything botting (on mainline u-boot) and I believe vulkan is running. I can successfully run glmark2-es2-wayland --fullscreen --annotate from ssh. I grabbed the kernel config from the OGU 6.1 test image and made a few changes needed to boot into JELOS.

However I can't get the panel to turn on. I think its a backlight issue but not sure. Here is the log of the kernel booting. I noticed there were some errors but sure if its just noise. Any help would be appreciated.

Code: Select all

U-Boot 2023.04-rc4-00032-ge37be8484f (Mar 25 2023 - 20:17:02 +0000) odroid-go-ultra

Model: Hardkernel ODROID-GO-Ultra
SoC:   Amlogic Meson G12B (S922X) Revision 29:c (40:2)
DRAM:  1 GiB (effective 2 GiB)
Core:  421 devices, 25 uclasses, devicetree: separate
MMC:   sd@ffe05000: 0, mmc@ffe07000: 1
Loading Environment from nowhere... OK
In:    serial@3000
Out:   serial@3000
Err:   serial@3000
Net:   No ethernet found.
Hit any key to stop autoboot:  0
PMIC:  RK8180 (on=0x80, off=0x04)
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
No EFI system partition
No EFI system partition
Failed to persist EFI variables
BootOrder not defined
EFI boot manager: Cannot load any image
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
1:      JELOS
Retrieving file: /KERNEL
append: boot=UUID=2603-4657 disk=UUID=50ebb712-4fc1-464a-9053-3f821a4e38ad rootwait rw console=ttyAML0,115200n8 no_console_suspend fsck.repair=yes net.ifnames=0 consoleblank=0 fbcon=rotate:3
Retrieving file: /meson-g12b-odroid-go-ultra.dtb
Moving Image from 0x8080000 to 0x8200000, end=a800000
## Flattened Device Tree blob at 08008000
   Booting using the fdt blob at 0x8008000
Working FDT set to 8008000
   Loading Device Tree to 000000003ffe8000, end 000000003ffffc94 ... OK
Working FDT set to 3ffe8000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.1.15+ (mason@jmake) (aarch64-libreelec-linux-gnueabi-gcc-12.2.0 (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39) #1 SMP PREEMPT Sun Mar 26 14:10:47 UTC 2023
[    0.000000] Machine model: Hardkernel ODROID-GO-Ultra
[    0.000000] OF: fdt: Reserved memory: failed to reserve memory for node 'secmon@5000000': base 0x0000000005000000, size 3 MiB
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000070000000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000007fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x00000000052fffff]
[    0.000000]   node   0: [mem 0x0000000005300000-0x00000000072fffff]
[    0.000000]   node   0: [mem 0x0000000007300000-0x000000003d7fffff]
[    0.000000]   node   0: [mem 0x000000003d800000-0x000000003d98ffff]
[    0.000000]   node   0: [mem 0x000000003d991000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[    0.000000] On node 0, zone DMA: 1 pages in unavailable ranges
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.1
[    0.000000] percpu: Embedded 20 pages/cpu s42720 r8192 d31008 u81920
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516095
[    0.000000] Kernel command line: boot=UUID=2603-4657 disk=UUID=50ebb712-4fc1-464a-9053-3f821a4e38ad rootwait rw console=ttyAML0,115200n8 no_console_suspend fsck.repair=yes net.ifnames=0 consoleblank=0 fbcon=rotate:3
[    0.000000] Unknown kernel command line parameters "boot=UUID=2603-4657 disk=UUID=50ebb712-4fc1-464a-9053-3f821a4e38ad", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1717648K/2097148K available (11072K kernel code, 1976K rwdata, 4076K rodata, 17024K init, 4536K bss, 117356K reserved, 262144K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=6.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000351] Console: colour dummy device 80x25
[    0.000370] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000374] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000379] ... MAX_LOCK_DEPTH:          48
[    0.000383] ... MAX_LOCKDEP_KEYS:        8192
[    0.000387] ... CLASSHASH_SIZE:          4096
[    0.000392] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.000396] ... MAX_LOCKDEP_CHAINS:      65536
[    0.000400] ... CHAINHASH_SIZE:          32768
[    0.000404]  memory used by lock dependency info: 3637 kB
[    0.000409]  per task-struct memory footprint: 1920 bytes
[    0.000455] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.000469] pid_max: default: 32768 minimum: 301
[    0.000761] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000779] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.004749] cblist_init_generic: Setting adjustable number of callback queues.
[    0.004783] cblist_init_generic: Setting shift to 3 and lim to 1.
[    0.004985] cblist_init_generic: Setting shift to 3 and lim to 1.
[    0.005380] rcu: Hierarchical SRCU implementation.
[    0.005387] rcu:     Max phase no-delay instances is 1000.
[    0.008082] smp: Bringing up secondary CPUs ...
[    0.009386] Detected VIPT I-cache on CPU1
[    0.009560] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.011537] CPU features: detected: Spectre-v2
[    0.011550] CPU features: detected: Spectre-v4
[    0.011555] CPU features: detected: Spectre-BHB
[    0.011560] CPU features: detected: ARM erratum 858921
[    0.011566] Detected VIPT I-cache on CPU2
[    0.011674] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.011697] arch_timer: CPU2: Trapping CNTVCT access
[    0.011709] CPU2: Booted secondary processor 0x0000000100 [0x410fd092]
[    0.013068] Detected VIPT I-cache on CPU3
[    0.013147] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.013159] arch_timer: CPU3: Trapping CNTVCT access
[    0.013169] CPU3: Booted secondary processor 0x0000000101 [0x410fd092]
[    0.014440] Detected VIPT I-cache on CPU4
[    0.014524] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.014536] arch_timer: CPU4: Trapping CNTVCT access
[    0.014546] CPU4: Booted secondary processor 0x0000000102 [0x410fd092]
[    0.015806] Detected VIPT I-cache on CPU5
[    0.015893] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.015906] arch_timer: CPU5: Trapping CNTVCT access
[    0.015916] CPU5: Booted secondary processor 0x0000000103 [0x410fd092]
[    0.016086] smp: Brought up 1 node, 6 CPUs
[    0.016099] SMP: Total of 6 processors activated.
[    0.016107] CPU features: detected: 32-bit EL0 Support
[    0.016114] CPU features: detected: CRC32 instructions
[    0.016260] CPU: All CPU(s) started at EL2
[    0.016265] alternatives: applying system-wide alternatives
[    0.018265] devtmpfs: initialized
[    0.045313] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.045337] futex hash table entries: 2048 (order: 6, 262144 bytes, linear)
[    0.049392] pinctrl core: initialized pinctrl subsystem
[    0.051037] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.053359] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[    0.053777] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.054037] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.054789] thermal_sys: Registered thermal governor 'step_wise'
[    0.054859] cpuidle: using governor menu
[    0.054970] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.055163] ASID allocator initialised with 65536 entries
[    0.091940] KASLR disabled due to lack of seed
[    0.104400] cryptd: max_cpu_qlen set to 1000
[    0.106338] iommu: Default domain type: Translated
[    0.106345] iommu: DMA domain TLB invalidation policy: strict mode
[    0.106823] SCSI subsystem initialized
[    0.107095] usbcore: registered new interface driver usbfs
[    0.107169] usbcore: registered new interface driver hub
[    0.107224] usbcore: registered new device driver usb
[    0.107648] mc: Linux media interface: v0.10
[    0.107690] videodev: Linux video capture interface: v2.00
[    0.107849] pps_core: LinuxPPS API ver. 1 registered
[    0.107853] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.108481] Advanced Linux Sound Architecture Driver Initialized.
[    0.109483] vgaarb: loaded
[    0.109900] clocksource: Switched to clocksource arch_sys_counter
[    0.110366] FS-Cache: Loaded
[    0.121965] NET: Registered PF_INET protocol family
[    0.122237] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.124084] tcp_listen_portaddr_hash hash table entries: 1024 (order: 4, 73728 bytes, linear)
[    0.124276] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.124293] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.124788] TCP bind hash table entries: 16384 (order: 9, 2359296 bytes, linear)
[    0.127786] TCP: Hash tables configured (established 16384 bind 16384)
[    0.128037] UDP hash table entries: 1024 (order: 5, 163840 bytes, linear)
[    0.128271] UDP-Lite hash table entries: 1024 (order: 5, 163840 bytes, linear)
[    0.128728] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.128819] PCI: CLS 0 bytes, default 64
[    0.131212] Initialise system trusted keyrings
[    0.131639] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    0.145775] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.174206] NET: Registered PF_ALG protocol family
[    0.174251] Key type asymmetric registered
[    0.174271] Asymmetric key parser 'x509' registered
[    0.211260] alg: self-tests for CTR-KDF (hmac(sha256)) passed
[    0.211355] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    0.211624] io scheduler mq-deadline registered
[    0.211631] io scheduler kyber registered
[    0.212827] irq_meson_gpio: 100 to 8 gpio interrupt mux initialized
[    0.222232] pwm-backlight backlight: supply power not found, using dummy regulator
[    0.232733] soc soc0: Amlogic Meson G12B (S922X) Revision 29:c (40:2) Detected
[    0.235323] ff803000.serial: ttyAML0 at MMIO 0xff803000 (irq = 14, base_baud = 1500000) is a meson_uart
[    1.129383] printk: console [ttyAML0] enabled
[   16.039563] meson_clk_pll_wait_lock: pll gp0_pll_dco did not lock
[   16.040085] simple-framebuffer 3d800000.framebuffer: [drm] *ERROR* failed to enable clock 0: -5
[   16.048817] Stack Depot allocating hash table of 131072 entries with kvcalloc
[   16.056880] [drm] Initialized simpledrm 1.0.0 20200625 for 3d800000.framebuffer on minor 0
[   16.075093] Console: switching to colour frame buffer device 106x30
[   16.079908] simple-framebuffer 3d800000.framebuffer: [drm] fb0: simpledrmdrmfb frame buffer device
[   16.089845] mali ffe40000.gpu: Kernel DDK version r40p0-01eac0
[   16.098343] mali ffe40000.gpu: GPU identified as 0x2 arch 7.2.1 r0p0 status 0
[   16.101999] mali ffe40000.gpu: No priority control manager is configured
[   16.108581] mali ffe40000.gpu: No memory group manager is configured
[   16.108773] brd: module loaded
[   16.114689] mali ffe40000.gpu: Using coherency mode 0 set from dtb
[   16.117762] loop: module loaded
[   16.124920] mali ffe40000.gpu: Couldn't find power_model DT node matching 'arm,mali-simple-power-model'
[   16.136157] mali ffe40000.gpu: Error -22, no DT entry: mali-simple-power-model.static-coefficient = 1*[0]
[   16.145719] mali ffe40000.gpu: Error -22, no DT entry: mali-simple-power-model.dynamic-coefficient = 1*[0]
[   16.155291] mali ffe40000.gpu: Error -22, no DT entry: mali-simple-power-model.ts = 4*[0]
[   16.163014] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   16.163407] mali ffe40000.gpu: Error -22, no DT entry: mali-simple-power-model.thermal-zone = ''
[   16.171085] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   16.181076] mali ffe40000.gpu: Using configured power model mali-g52-power-model, and fallback mali-simple-power-model
[   16.191220] tun: Universal TUN/TAP device driver, 1.6
[   16.201556] mali ffe40000.gpu: Probed as mali0
[   16.205818] usbcore: registered new interface driver rtl8150
[   16.214955] usbcore: registered new interface driver r8152

Welcome to Linux!

brooksytech
Posts: 67
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 60 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by brooksytech »

Wondering if something in the legacy harkdkernel u-boot is turning the panel on that’s missing in the upstream u-boot.

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

hello @brooksytech

You are indeed correct.
The current kernel driver is simpledrm, its as the name states a simple driver that expects the display to be ready to go, all setup and we just pass the memory address where the framebuffer is to it.

That's why it doesn't work with upstream u-boot, as the display controller isn't initialized.

There is a DSI driver for Amlogic, its buggy but some of the developers aren't ready to share code yet.
I'm waiting on this as well in order to implement some features like VSYNC

So yes, current, only with vendor u-boot is possible
These users thanked the author mdrjr for the post:
brooksytech (Mon Mar 27, 2023 2:42 am)

brooksytech
Posts: 67
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 60 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by brooksytech »

Ok thanks for the confirmation. I’ll keep poking at the legacy u-boot then. It doesn’t seem to like the way we traditionally boot Jelos but I should be able to figure it out.

brooksytech
Posts: 67
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 60 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by brooksytech »

Got it!
1.PNG
1.PNG (1.32 MiB) Viewed 3044 times
2.PNG
2.PNG (291.62 KiB) Viewed 3044 times
These users thanked the author brooksytech for the post (total 2):
Andyyy (Mon Mar 27, 2023 4:27 pm) • odjinan (Tue Mar 28, 2023 1:43 pm)

brooksytech
Posts: 67
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 60 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by brooksytech »

EDIT: Ive updated my patch. This now has the controller show up natively as an xbox 360 controller and the correct x360 buttons. Thanks to the work JohhnyOnFlame helped me with on a previous project. The F5 button does not appear to work but might be an easy fix. We wont be using F2 or F5 w/ JELOS. The inner bottom buttons are thumb L and thumb R. This felt more natural to press.

Here is my patch if anyone wants to try and get these buttons working. Also free to merge in the 6.1 kernel branch if you would like.

Your config will need:
CONFIG_INPUT_POLLDEV=y
CONFIG_JOYSTICK_ODROID_GOU=y
Attachments
000-ogu-x360-joypad.patch.txt
(48.92 KiB) Downloaded 20 times
Last edited by brooksytech on Tue Mar 28, 2023 1:58 pm, edited 1 time in total.
These users thanked the author brooksytech for the post (total 2):
mdrjr (Wed Mar 29, 2023 3:14 am) • JohnnyonFlame (Thu Mar 30, 2023 8:41 pm)

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

Hey, nice changes, I will try this tomorrow.

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

@crashoverride

Joypad driver is now is like kernel 4.9

@brooksytech
Thanks for the patchs!
These users thanked the author mdrjr for the post:
brooksytech (Wed Mar 29, 2023 6:09 am)

brooksytech
Posts: 67
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 60 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by brooksytech »

Does anyone have issues with the sd card not mounting after the initial boot with this kernel?

If I do a clean flash of the emmc my sd card is detected on initial boot, sometimes the second. But after that it is not recognized again until another clean flash.

User avatar
odroid
Site Admin
Posts: 41084
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3194 times
Been thanked: 1753 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by odroid »

The SD-card detection in reboot process problem could be improved by these patches on stock kernel 4.9 and uboot. But I remember a couple of SilliconPower and some other SD cards still have the issue.
https://github.com/hardkernel/linux/com ... 9dbc6d4897
https://github.com/hardkernel/linux/com ... 526c2bd145
https://github.com/hardkernel/u-boot/co ... b25951c21e

JohnnyonFlame
Posts: 21
Joined: Tue Dec 07, 2021 4:07 am
languages_spoken: english
ODROIDs: N2+, OGA, OGU
Has thanked: 15 times
Been thanked: 10 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by JohnnyonFlame »

odroid wrote:
Thu Mar 30, 2023 9:31 am
The SD-card detection in reboot process problem could be improved by these patches on stock kernel 4.9 and uboot. But I remember a couple of SilliconPower and some other SD cards still have the issue.
https://github.com/hardkernel/linux/com ... 9dbc6d4897
https://github.com/hardkernel/linux/com ... 526c2bd145
https://github.com/hardkernel/u-boot/co ... b25951c21e
Hi, is there any chance ARM could be pinged to also provide armhf libmali?
brooksytech wrote:
Tue Mar 28, 2023 5:39 am
EDIT: Ive updated my patch. This now has the controller show up natively as an xbox 360 controller and the correct x360 buttons. Thanks to the work JohhnyOnFlame helped me with on a previous project. The F5 button does not appear to work but might be an easy fix. We wont be using F2 or F5 w/ JELOS. The inner bottom buttons are thumb L and thumb R. This felt more natural to press.

Here is my patch if anyone wants to try and get these buttons working. Also free to merge in the 6.1 kernel branch if you would like.

Your config will need:
CONFIG_INPUT_POLLDEV=y
CONFIG_JOYSTICK_ODROID_GOU=y
Neat to see this come back, great job!

User avatar
odroid
Site Admin
Posts: 41084
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3194 times
Been thanked: 1753 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by odroid »

JohnnyonFlame wrote:
Thu Mar 30, 2023 9:28 pm
Hi, is there any chance ARM could be pinged to also provide armhf libmali?
Unfortunately, we do not have an official connection channel with the Mali GPU division.
BTW, why do you need a 32bit Mali library?

JohnnyonFlame
Posts: 21
Joined: Tue Dec 07, 2021 4:07 am
languages_spoken: english
ODROIDs: N2+, OGA, OGU
Has thanked: 15 times
Been thanked: 10 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by JohnnyonFlame »

odroid wrote:
Fri Mar 31, 2023 9:28 am
Unfortunately, we do not have an official connection channel with the Mali GPU division.
BTW, why do you need a 32bit Mali library?
There are plenty of legacy applications I'd love to continue support for that require armhf binaries, such as box86 (thankfully on the way out in favor of box32, hopefully sooner rather than later) and GameMaker:Studio games using gmloader.
These users thanked the author JohnnyonFlame for the post:
odroid (Fri Mar 31, 2023 3:16 pm)

brooksytech
Posts: 67
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 60 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by brooksytech »

Any leads on the kernel panic issue?

Here is the error we see from time to time at startup:

Code: Select all

Starting kernel ...

uboot time: 4298007 us
[    6.356756] SError Interrupt on CPU3, code 0x00000000bf000002 -- SError
[    6.356769] CPU: 3 PID: 596 Comm: weston Tainted: G           O       6.1.15 #1
[    6.356773] Hardware name: Hardkernel ODROID-GO-Ultra (DT)
[    6.356775] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    6.356779] pc : kbase_reg_read+0x28/0xd0
[    6.356790] lr : kbase_is_gpu_removed+0x14/0x30
[    6.356794] sp : ffff80000becb860
[    6.356795] x29: ffff80000becb860 x28: ffff000003790000 x27: 0000000000000000
[    6.356800] x26: ffff80000c13d000 x25: ffff800009fb2340 x24: ffff000003793b18
[    6.356803] x23: ffff000003793000 x22: 0000000000000000 x21: 0000000000000000
[    6.356806] x20: ffff000003790000 x19: ffff80000aec0000 x18: 0000000000000000
[    6.356809] x17: 0000000000000000 x16: 0000000000000000 x15: 000000001adebb90
[    6.356812] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[    6.356815] x11: 00000000000001cc x10: 0000000000001290 x9 : 0000000000000001
[    6.356818] x8 : ffff800009fb2000 x7 : 0000000000000000 x6 : ffff80000809d38c
[    6.356821] x5 : 00000000000001fb x4 : 0000000000000001 x3 : ffff800009db1008
[    6.356824] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000001
[    6.356828] Kernel panic - not syncing: Asynchronous SError Interrupt
[    6.356829] SMP: stopping secondary CPUs
[    6.356837] Kernel Offset: disabled
[    6.356837] CPU features: 0x00000,01834080,0000420b
[    6.356840] Memory Limit: none
[    6.481400] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---

notime2d8
Posts: 350
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 106 times
Been thanked: 158 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by notime2d8 »

brooksytech wrote:
Wed Apr 05, 2023 9:53 am
Any leads on the kernel panic issue?

Here is the error we see from time to time at startup:

Code: Select all

Starting kernel ...

uboot time: 4298007 us
[    6.356756] SError Interrupt on CPU3, code 0x00000000bf000002 -- SError
[    6.356769] CPU: 3 PID: 596 Comm: weston Tainted: G           O       6.1.15 #1
[    6.356773] Hardware name: Hardkernel ODROID-GO-Ultra (DT)
[    6.356775] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    6.356779] pc : kbase_reg_read+0x28/0xd0
[    6.356790] lr : kbase_is_gpu_removed+0x14/0x30
[    6.356794] sp : ffff80000becb860
[    6.356795] x29: ffff80000becb860 x28: ffff000003790000 x27: 0000000000000000
[    6.356800] x26: ffff80000c13d000 x25: ffff800009fb2340 x24: ffff000003793b18
[    6.356803] x23: ffff000003793000 x22: 0000000000000000 x21: 0000000000000000
[    6.356806] x20: ffff000003790000 x19: ffff80000aec0000 x18: 0000000000000000
[    6.356809] x17: 0000000000000000 x16: 0000000000000000 x15: 000000001adebb90
[    6.356812] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[    6.356815] x11: 00000000000001cc x10: 0000000000001290 x9 : 0000000000000001
[    6.356818] x8 : ffff800009fb2000 x7 : 0000000000000000 x6 : ffff80000809d38c
[    6.356821] x5 : 00000000000001fb x4 : 0000000000000001 x3 : ffff800009db1008
[    6.356824] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000001
[    6.356828] Kernel panic - not syncing: Asynchronous SError Interrupt
[    6.356829] SMP: stopping secondary CPUs
[    6.356837] Kernel Offset: disabled
[    6.356837] CPU features: 0x00000,01834080,0000420b
[    6.356840] Memory Limit: none
[    6.481400] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---

It looks like a known issue and maybe not fixable according to the bottom of the wiki:

https://wiki.odroid.com/odroid_go_ultra ... /ubuntu_es

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

It is fixable, just a bug on the Mali kernel driver.
We will address it once some other issues goes by.

brooksytech
Posts: 67
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 60 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by brooksytech »

Have any of you looked at Mesa Zink at all?

Wondering if we can get OpenGL support with it. I was able to build it but anytime I try running glxgears i get the following error: "Error: couldn't get an RGB, Double-buffered visual"

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

I think it should work with panfrost instead of vendor Mali driver

brooksytech
Posts: 67
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 60 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by brooksytech »

Yes panfrost will enable native GL but Zink mesa enables OpenGL through the vulkan api.

mdrjr
Site Admin
Posts: 11852
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 2 times
Been thanked: 77 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by mdrjr »

I'm not 100% sure, would need to debug why this is happening

brooksytech
Posts: 67
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 60 times
Contact:

Re: Ubuntu 22.04 + Kernel 6.1 + Mali Vulkan Support

Post by brooksytech »

Sorry not expecting it to work of the box. Just floating the idea out there due to panfrost currently not working.

I will keep poking at it and post if I make any progress.

Post Reply

Return to “Platform development”

Who is online

Users browsing this forum: No registered users and 1 guest