Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Problems with certain devices using Vulkan API

Discussion in 'Android' started by Driven, Jul 30, 2018.

  1. Driven

    Driven

    Joined:
    May 31, 2013
    Posts:
    77
    Anyone else has problems using Vulkan API? On several devices like xiaomi 4x, lg x venture, lg v 20 and even sometimes samsung galaxy s7, google pixel XL (probably even more) The game just shows a black screen and nothing gets rendered except some UI and then it just freezes. Changing the API order from vulkan first to vulkan last, makes everything normal.

    It's happening in All Untiy version from 2018.1 onwards.Unity 5 works fine with Vulkan except of some edgecases with multiple cameras where some sprites are just shown as a glitch desaster.
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,850
    Does it output any errors to the console?
     
  3. Driven

    Driven

    Joined:
    May 31, 2013
    Posts:
    77
    Unfortunately I don't have these devices by myself to catch the logs, it was always try and error with the users until it worked by removing Vulkan.

    What's funny is that sounds and game logic seem to work but the the game is visually not there.

    I have submitted a repro project some time ago but still no response so far except that the project was too big with first submit.
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,850
    Can you post the bug number here?
     
    Last edited: Jul 31, 2018
  5. Driven

    Driven

    Joined:
    May 31, 2013
    Posts:
    77
    Case 1044679
     
  6. Driven

    Driven

    Joined:
    May 31, 2013
    Posts:
    77
    @aleksandrk any news on this? It's still not working with 2018.2.8f. Game just does not start with Vulkan API, GLES3 and GLES2 work normally. Just use a LG X Venture. I can see you disable Vulkan for some Andreno 4xx devices in 2018.3 but this one has 505 anyway so it won't affect it.
     
  7. MildaGenius2

    MildaGenius2

    Joined:
    May 6, 2013
    Posts:
    19
    We have crash on two devices (Xiaomi Mi Mix 2s, Asus Zenfone 5z) when use Vulkan in our game. Unity 2018.3.8f1


    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 000000dc
    *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build type 'Development', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'
    Build fingerprint: 'Xiaomi/polaris/polaris:9/PKQ1.180729.001/V10.2.1.0.PDGMIXM:user/release-keys'
    Revision: '0'
    pid: 16945, tid: 17006, name: UnityGfxDeviceW >>> com.company.game_goo <<<
    r0 0236e800 r1 00000000 r2 00000000 r3 00008000
    r4 0236e800 r5 00008000 r6 b3a014d8 r7 e941cbcf
    r8 00000000 r9 b3a014d0 sl b3a01578 fp ba36e798
    ip b68ecd78 sp b3a013b0 lr b66e3f41 pc b6712324 cpsr e3d2bd10

    backtrace:
    #00 pc 00073324 /vendor/lib/hw/vulkan.sdm845.so (QglResource::BindObjectMemory(unsigned int, QglMemObj*, unsigned long long)+11)
    #01 pc 00044f3d /vendor/lib/hw/vulkan.sdm845.so (qglinternal::vkBindBufferMemory(VkDevice_T*, unsigned long long, unsigned long long, unsigned long long)+20)
    #02 pc 00d4b4ac /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (vk::AllocateBuffer(VkDevice_T*, VkPhysicalDeviceMemoryProperties const&, vk::MemoryAllocator&, unsigned long long, unsigned int)+556)
    #03 pc 00d6ebd8 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (vk::BufferManager::CreateBufferResource(unsigned int, unsigned int, unsigned int)+160)
    #04 pc 00d6fe98 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (vk::DataBuffer::RecreateResource()+532)
    #05 pc 00d6fc1c /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (vk::DataBuffer::Initialize(void const*, vk::CommandBuffer*, vk::ScratchBuffer*, unsigned long long)+48)
    #06 pc 00d35db0 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (GfxDeviceVK::InitializeBufferInternal(GfxBuffer*, void const*, GfxUpdateBufferFlags)+104)
    #07 pc 0060ffc0 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+14784)
    #08 pc 00613d3c /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)+68)
    #09 pc 00613ccc /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (GfxDeviceWorker::Run()+132)
    #10 pc 0060c318 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)+4)
    #11 pc 00ac9000 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (Thread::RunThreadWrapper(void*)+696)
    #12 pc 000637f5 /system/lib/libc.so (__pthread_start(void*)+22)
    #13 pc 0001e019 /system/lib/libc.so (__start_thread+24)
     
    Last edited: Mar 19, 2019
  8. cullen_unity

    cullen_unity

    Joined:
    Sep 19, 2018
    Posts:
    1
    @Driven Did you ever find a fix for this, I'm having the same problem in 2019.1.2
     
  9. Driven

    Driven

    Joined:
    May 31, 2013
    Posts:
    77
    @cullen_unity i didn't find a fix, the QA sent me a message that it is fixed in 2019.2+ ONLY which means every version below will have this error "forever", since no backport is planned as far as i know.
     
  10. Dadlord

    Dadlord

    Joined:
    May 19, 2015
    Posts:
    1
    I don't think it was fixed. Whatever the version you'll try. I have tried 2019.3 alpha and still it have black screen on my Nokia 6. Doesn't happen with UE4 Vulkan builds.
     
  11. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    2,984
    I ran into a black screen with Vulkan on Android. OpenGL ES3 works great, but Vulkan goes to a black screen. This was with Unity 2018.4.2f1 and a Samsung S10.
     
  12. unity_W3rLGozcKkUuGg

    unity_W3rLGozcKkUuGg

    Joined:
    Apr 25, 2019
    Posts:
    11
    I saw that Unity fixed that to >2019.1. I really hope that they can bring this fix to the 2018.4 LTS ASAP.
     
  13. tiagoandr

    tiagoandr

    Joined:
    Jun 30, 2019
    Posts:
    25
    No no, Unity didnt fix that. I just experienced the problem with Unity 2019.2.0f1! 2 days changing the setup of the whole S*** and I just found out after checking the logcat from Android Studio (and now with your comments)
    :mad::mad::mad::mad:

    Solution: remove vulkan from the player settings, keep only OpenGL ES3 or 2.
    my device: xiaomi mi9


    2019-08-12 20:29:55.783 7194-7247/com.xxx.xxx E/vulkan: invalid vkGetInstanceProcAddr(VK_NULL_HANDLE, "vkDestroyInstance") call
    2019-08-12 20:29:55.783 7194-7247/com.xxx.xxx E/vulkan: invalid vkGetInstanceProcAddr(VK_NULL_HANDLE, "vkEnumeratePhysicalDevices") call
    2019-08-12 20:29:55.783 7194-7247/com.xxx.xxxE/vulkan: invalid vkGetInstanceProcAddr(VK_NULL_HANDLE, "vkGetPhysicalDeviceProperties") call
     
    tuyh7845 and JesOb like this.
  14. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,850
    @tiagoandr it would be nice if you could report a bug.
     
  15. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,081
    Do we have bug report for this or I need to create additional one?
    How to report bug about Unity internals that is visible only in builds?
     
  16. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,850
    @Jes28 I don't think I've seen one. Please create a new bug report, QA will sort this out :)
    When you create one, you can describe, what's happening and how to get to this state.
     
  17. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,081
    I can not describe how to get to this satet I can link apk to bug report that is in this stet and only Unity Devs can know something.

    And because of this I have ask how to correct create bug report. Will linked apk will help?
     
  18. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,850
    It's preferable to have source code to debug this. So the best way would be to use the built-in bug reporter.
     
  19. Silentor666

    Silentor666

    Joined:
    Dec 14, 2013
    Posts:
    16
    Hello, Aleksandr.
    Ok, so I've submitted a bug report with minimal project, steps to reproduce included. It failed to render a Unity splash screen and an empty scene on Xiaomi Mi 9, but works as expected on Samsung Galaxy S8. Its just an empty scene with camera, URP + Vulkan, no source code at all :)
    Bug id 1193349
     
    Last edited: Oct 22, 2019
  20. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,850
    JesOb and Silentor666 like this.
  21. Thanatos_Psychopomp

    Thanatos_Psychopomp

    Joined:
    Mar 16, 2018
    Posts:
    8
    I just wanted to add that I am also facing this issue. OnePlus5 android 7.1.1 works perfect, OnePlus5 android 9 crashes while showing the unity logo. Galaxy S9 android 9 crashes while showing unity logo and Galaxy A6 android 9 works perfect.
     
  22. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,081
    Any News?
     
  23. Morgomir

    Morgomir

    Joined:
    Aug 17, 2018
    Posts:
    9
    Same problem here, working with Unity 2019.2.8f1 and both Tablet HUAWEI M5 lite10 and Fairphone 3.
    Removing Vulkan from the player settings or moving it below GLES3 fixes it but also makes it way slower !
    Especially when working with the device camera... framerate under 10/s
     
  24. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    223
    I confirm the problem with Xiaomi Mi9, Android 9 (MIUI Global 10.2.30) and latest Unity 2019.2.13f1. Empty project, empty scene -> black screen
     
  25. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,081
    Unity answered that it is driver bug and it now in "Wont Fix" state

    I have updated Drivers for Mi9 to latest November ones and now it works
     
    korzen303 likes this.
  26. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    223
    OK, It worked after I have updated Mi 9 to MIUI 11.0.5.0. Tip: If you haven't received the IMUI 11 update yet change your Settings/Region to India and then trigger update by going to Settings/About Phone/System Update.
     
    JesOb likes this.
  27. canyon_gyh

    canyon_gyh

    Joined:
    Aug 15, 2018
    Posts:
    47
    first vulkan,get the problem here, working with Unity 2019.3.7f1。
    error:
    Code (CSharp):
    1. 07-08 16:47:13.950  7635  7635 E AndroidRuntime: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xf0
    2. 07-08 16:47:13.950  7635  7635 E AndroidRuntime: Cause: null pointer dereference
    3. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:     x0  0000006ea21b2800  x1  00000000000013a3  x2  0000000000000000  x3  0000000000000002
    4. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:     x4  0000006f534439e0  x5  0000006f534439e0  x6  0000000000004200  x7  0000000000000000
    5. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:     x8  0000006e8df99080  x9  0000000000000002  x10 0000006e5a276ab0  x11 0000000000000000
    6. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:     x12 0000000000000001  x13 0000000000000068  x14 0000000000000002  x15 0000000000000075
    7. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:     x16 0000006e5a292000  x17 00000000ffffffff  x18 00000000ac3b7fa9  x19 0000000000000000
    8. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:     x20 0000000000000000  x21 0000006e5a292000  x22 0000006ea21b2800  x23 0000000000000000
    9. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:     x24 0000006e5a292000  x25 0000006e5a292000  x26 0000000000000000  x27 0000006ea21b2810
    10. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:     x28 00000000ffffffff  x29 0000006ea0efb9a0
    11. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:     sp  0000006ea0efb7b0  lr  0000006ea2f06a54  pc  0000006ea2f06a80
    12. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:
    13. 07-08 16:47:13.950  7635  7635 E AndroidRuntime: backtrace:
    14. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:       #00 pc 00000000000c5a80  /vendor/lib64/hw/vulkan.adreno.so (BuildId: 663114d97fbc9a552f7814467944bb11)
    15. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:       #01 pc 00000000000731d4  /vendor/lib64/hw/vulkan.adreno.so (qglinternal::vkEndCommandBuffer(VkCommandBuffer_T*)+388) (BuildId: 663114d97fbc9a552f7814467944bb11)
    16. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:       #02 pc 00000000007495d0  /data/app/~~wQXoYYTyC4ttjWWRaWRXGA==/com.dianyuegame.kesulu--784OVDvSmuS7wMvvP-t3w==/lib/arm64/libunity.so (BuildId: 14b8e251dbf5787f84afd8e222769dab16e9ad52)
    17. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:       #03 pc 0000000000739858  /data/app/~~wQXoYYTyC4ttjWWRaWRXGA==/com.dianyuegame.kesulu--784OVDvSmuS7wMvvP-t3w==/lib/arm64/libunity.so (BuildId: 14b8e251dbf5787f84afd8e222769dab16e9ad52)
    18. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:       #04 pc 000000000073889c  /data/app/~~wQXoYYTyC4ttjWWRaWRXGA==/com.dianyuegame.kesulu--784OVDvSmuS7wMvvP-t3w==/lib/arm64/libunity.so (BuildId: 14b8e251dbf5787f84afd8e222769dab16e9ad52)
    19. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:       #05 pc 0000000000737a2c  /data/app/~~wQXoYYTyC4ttjWWRaWRXGA==/com.dianyuegame.kesulu--784OVDvSmuS7wMvvP-t3w==/lib/arm64/libunity.so (BuildId: 14b8e251dbf5787f84afd8e222769dab16e9ad52)
    20. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:       #06 pc 0000000000581d1c  /data/app/~~wQXoYYTyC4ttjWWRaWRXGA==/com.dianyuegame.kesulu--784OVDvSmuS7wMvvP-t3w==/lib/arm64/libunity.so (BuildId: 14b8e251dbf5787f84afd8e222769dab16e9ad52)
    21. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:       #07 pc 00000000000da1b8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 43df7afeeed62339c206f194d0f2ac61)
    22. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:       #08 pc 000000000007a488  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 43df7afeeed62339c206f194d0f2ac61)
    23. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:
    24. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:        at vulkan.0xc5a80(Native Method)
    25. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:        at vulkan.qglinternal::vkEndCommandBuffer(VkCommandBuffer_T*)(vkEndCommandBuffer:388)
    26. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:        at libunity.0x7495d0(Native Method)
    27. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:        at libunity.0x739858(Native Method)
    28. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:        at libunity.0x73889c(Native Method)
    29. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:        at libunity.0x737a2c(Native Method)
    30. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:        at libunity.0x581d1c(Native Method)
    31. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:        at libc.__pthread_start(void*)(__pthread_start:64)
    32. 07-08 16:47:13.950  7635  7635 E AndroidRuntime:        at libc.__start_thread(__start_thread:64)
    33. 07-08 16:47:13.950  3326  3326 D Launcher.Quickstep-TouchInteractionService: onInputEvent: (x,y) = (1130.8594,737.49023), navmode = NO_BUTTON, offsetState = false, displayRotation = 1
    34.  
     
    Last edited: Jul 8, 2021
  28. shadireine

    shadireine

    Joined:
    Aug 12, 2022
    Posts:
    3
    I've build the project two times because of the black screen about 15 seconds after unity logo and i still face the same problem.
    debug.log didn't show any bug all my codes perfect
    i'm trying to find the solution on youtube but there's no video about that
    my unity editor is 2022.1.13
    there's any solution