Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation faults and low gpu usage. #9

Open
roninspin opened this issue Nov 3, 2024 · 6 comments
Open

Segmentation faults and low gpu usage. #9

roninspin opened this issue Nov 3, 2024 · 6 comments

Comments

@roninspin
Copy link

Hi! I use your ppa in Ubuntu noble (chroot) on my Red Magic 6 (android 12, adreno 660). Now I'm facing two problems with the Vulkan driver:

  • segmentation faults when android UI elements are shown (animations, soft keyboard, notification shade, etc.).
  • it doesn't use full gpu performance. My gpu runs at the minimum frequency all the time (gpu load is really low). But when I manually set the gpu to the max. freq. it gives me a significant performance boost. E.g, supertuxkart - 2x+ fps boost. Glxgears - from 1928 fps to 2377 fps. But this behavior does not apply to all programms/games. For example, Unigine Heaven does load the gpu so that it scales it's frequency normally. The same about games in Wine (with dxvk).
    P.S. I couldn't make a screen record as it also provokes a seg. fault.
@sunarowicz
Copy link

Hello, I second to this. I'm constantly getting segfault in glmark2 after installing drivers from this ppa in chroot running on Adreno 650. Sometimes it crashes immediately, sometimes after a while, but never reaches the test end. Supertuxkart crashes too. But glxmark seems to run fine.

To avoid any misconfiguration in the past I made a new chroot and installed drivers from this ppa right away. Still the same, see here:

tux@chroot-noble:~$ vblank_mode=0 MESA_NO_ERROR=1 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink ZINK_DESCRIPTORS=lazy ZINK_DEBUG=compact glmark2 
ATTENTION: default value of option vblank_mode overridden by environment.
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    zink Vulkan 1.3(Turnip Adreno (TM) 650 (MESA_TURNIP))
    GL_VERSION:     4.6 (Compatibility Profile) Mesa 25.0~git2412040600.2ade3e~oibaf-turnip-kgsl~n (git-2ade3ec 2024-12
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[build] use-vbo=false:Segmentation fault

tux@chroot-noble:~$ nala search mesa-vulkan
mesa-vulkan-drivers 25.0~git2412040600.2ade3e~oibaf-turnip-kgsl~n [mesa-turnip-kgsl/noble main]
├── is installed
└── Mesa Vulkan graphics drivers

As I was curious I made another chroot where I installed drivers from the
mesa-vulkan-kgsl_24.1.0-devel-20240324_arm64.deb package I got from this post: xDoge26/proot-setup#26 (comment). In this case nothing crashes and everything runs fine.

Is there anything I could check to help to resolve this issue?

BTW: I also realized the low GPU usage. I never saw it to be utilized more than approx 30%. But do apply for both scenarios, for drivers from this ppa as well as from the downloaded package. So I guess this is "a feature" now.:o)

@sunarowicz
Copy link

sunarowicz commented Dec 5, 2024

@roninspin:

My gpu runs at the minimum frequency all the time (gpu load is really low). But when I manually set the gpu to the max. freq. it gives me a significant performance boost. E.g, supertuxkart - 2x+ fps boost. Glxgears - from 1928 fps to 2377 fps.

Could you please tell me, how do you manually set the GPU max frequency?

@MastaG
Copy link
Owner

MastaG commented Dec 6, 2024

Hi, I didn't face any sefaults when I was testing on both the Adreno 640 (OnePlus 7T Pro) and Adreno 750 (Galaxy S24).
I did however drop the zink_fixes patch.
I'll restore it, perhaps it makes a difference.

For the GPU frequency problems I couldn't find a solution either.
It sucks.
When I open Chrome in Android and scroll on a random webpage, my glmark/vkmark scores get better.
It seems that the proot environment doesn't drive up the GPU frequency on its own.

@sunarowicz
Copy link

sunarowicz commented Dec 6, 2024

@MastaG:

I'll restore it, perhaps it makes a difference.

Great, thank you! I'll test it again then.

For the GPU frequency problems I couldn't find a solution either. It sucks. When I open Chrome in Android and scroll on a random webpage, my glmark/vkmark scores get better. It seems that the proot environment doesn't drive up the GPU frequency on its own.

Same here. If I run glxgears while constantly moving the mouse on the desktop, the score is about 100 FPS higher comparing when mouse remains steady. If I instead do some scrolling in any Android app, the score is about 150 - 200 FPS higher. I recall myself that I discovered this already some 2 years ago when I started to investigate chroot containers on Android. So, no improvement since then:-(

We should not forget, that our "playground" sits on top of Android kernel modified by every vendor to its taste which is a "black box" for us and outside of our control...:-(

@sunarowicz
Copy link

sunarowicz commented Dec 17, 2024

@MastaG

Update: still segfaulting even with the current version from ppa:

=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    zink Vulkan 1.3(Turnip Adreno (TM) 650 (MESA_TURNIP))
    GL_VERSION:     4.6 (Compatibility Profile) Mesa 25.0~git2412150600.93dfe5~oibaf-turnip-kgsl~n (git-93dfe50 2024-12
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[terrain] <default>:[1]    929 segmentation fault  glmark2 -b terrain

@sunarowicz
Copy link

BTW: This is the only test I found which stresses the GPU really high, up to ~70-99%:
https://www.shadertoy.com/view/lsVXRh

I run the browser with these parameters:
chromium --ignore-gpu-blocklist --use-gl=angle --use-angle=vulkan --enable-accelerated-video-decode --enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,UseMultiPlaneFormatForHardwareVideo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants