Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Ubuntu 18.04 + HDRP + Vulkan = black screen

Discussion in 'Linux' started by MACHIN3, Apr 15, 2020.

  1. MACHIN3

    MACHIN3

    Joined:
    May 25, 2016
    Posts:
    61
    I've recently updated to Ubuntu 18.04 and have encountered issues with Vulkan, preventing me from using the HD render pipeline.

    The issue presented itself with a black screen for a few seconds once Unity loads a scene, followed by being logged out of my window manager (tested in awesomewm + the default gnome), so it seems the x session crashes.

    I'm posting this to share the solution in case anybody else is encountering this, and I haven't seen it mentioned here.
    The problem is actually not with Unity, but GDM, you can find more details about it here: https://bugs.launchpad.net/nvidia-drivers-ubuntu/+bug/1800465

    A solution is to curiously run "sudo vulkaninfo" first, as there seems to be a vulkan permission issue. Once per session is enough.
    Ubuntu 19.10 is also affected and it works there as well.

    Hope it helps somebody.
     
    senkal_ likes this.
  2. tatsuuuuuuu

    tatsuuuuuuu

    Joined:
    May 12, 2020
    Posts:
    35

    New

    i am in ubuntu 20.04 and when I create an HDRP unity project or switch a 3D project from the OpenGL render pipeline to the Vulkan render pipeline, the entire unity window goes black and unresponsive. (it's imposible to switch back at this point since the full UI is black and unresponsive)

    I am on nvidia with driver : 440

    the "sudo vulkaninfo" trick does not work for me. how can this be fixed? I want to use vulkan not OpenGl

    also this issue does not happen under Unity 2020 alpha, but I don't want to use the alpha I want to use LTS.
     
    Last edited: May 12, 2020
  3. jkim2718

    jkim2718

    Joined:
    Jul 5, 2020
    Posts:
    1
    @tatsuuuuuuu
    I've been having very similar issues. Did you happen to find a workaround?
     
    SamuelKeller likes this.
  4. AwesomeAlexx

    AwesomeAlexx

    Joined:
    Jan 30, 2016
    Posts:
    18
    hi,
    facing the same issue too, does someone found another solution ?
     
    SamuelKeller likes this.
  5. KevinWelton

    KevinWelton

    Joined:
    Jul 26, 2018
    Posts:
    239
    MACHIN3 likes this.
  6. epikhighdrifter

    epikhighdrifter

    Joined:
    Feb 7, 2019
    Posts:
    1
  7. MACHIN3

    MACHIN3

    Joined:
    May 25, 2016
    Posts:
    61
    I'm happy to see people care about the linux editor. I've reported a number of linux issues over the past week or so and hope to see them get resolved.

    Some of these are simple UI things, that should be obious to anybody using the editor.
    Or how about the HDRP sample scene being named samplescene instead of SampleScene, causing lightmap/probe issues?

    There are also HDRP performance issues, perhaps related to Vulkan, which cause more GPU ram usage than on windows, leading to scene load or asset import crashes(usually silent), much slower lightbakes compared to windows(factor 10+), constant high GPU use even for simple HDRP scenes maxing out gpu and cpu temps, etc.

    There are also odd memory leaks (I think), causing the entire system to almost freeze, sometimes triggered by increasing the scene view's sizem, but also after package imports, which can only be recovered from by killing the unity process. To be able to do this while the system almost hangs, I have that now assigned to a shortcut, otherwise it would be impossible to do (or take half an hour to open a terminal and type it out).

    On the topic of reporting bugs, there's the issue of the bug report failing in like 80% of my attempts. Either the progress bar just stops, often around the 50% mark, or it finishes but the final confirmation never comes. The entire report including the packed project will then also stick around in /tmp, but there is no way to actually resume a previous report using it.

    These issues have been present since 2018 or so AFAIK, so I got the impression not many unity devs are actually using the linux builds much, if at all. I've finally reported them and will report more, as I'm starting to use Unity more again now.
     
    Last edited: Aug 11, 2020
  8. KevinWelton

    KevinWelton

    Joined:
    Jul 26, 2018
    Posts:
    239
    @epikhighdrifter, @MACHIN3

    I spend most of my time in the Linux editor, mostly working on UI bugs and functionality issues. One of my co-workers works on Linux Vulkan graphical issues. HDRP is owned by another team. Which is not to make an excuse, but to give you some context on the scope of the effort here. I want your issues resolved as well. The things I can more directly affect are issues with the editor itself. But we triage every bug report we get. Given that there's only a handful of us, we can't necessarily get to all of them right away. But if you have a bug that blocks usage on a supported configuration, we want to know. And the bug reporter is the best place to do that.

    Regarding memory leaks, @MACHIN3, have you been able to see the memory consumption steadily increasing over time? What kind of time spans and sizes are we talking?
     
  9. AwesomeAlexx

    AwesomeAlexx

    Joined:
    Jan 30, 2016
    Posts:
    18
    KevinWelton likes this.
  10. umarali_43

    umarali_43

    Joined:
    Mar 6, 2020
    Posts:
    6
    Hey, I am having an issue after shifting to HDRP on Linux. I have set the graphics API for Linux to Vulkan. But my meshes are still not visible in inspector or scene. On reimporting meshes, it says:
    "ImportFBX Errors:
    Couldn't read file /home/Projects/Assets/Meshes/Player.FBX.
    Unexpected file type"

    However, I can see the same mesh correctly, if downloaded from somewhere and dragged into the Unity on Linux. But can't see the meshes coming from git. I always commit meta files. Everything is working fine on Windows on same branch.
     
  11. KevinWelton

    KevinWelton

    Joined:
    Jul 26, 2018
    Posts:
    239
    Is the path it's printing there the right path? The /home/Projects folder seems strange since I doubt you have a user named Projects. And I'd think that your Assets folder would be a subfolder of a specific project in Projects. Please log a bug using the "Help > Report a Bug" menu option on a machine where this repros. It will help us with investigation.
     
  12. umarali_43

    umarali_43

    Joined:
    Mar 6, 2020
    Posts:
    6
    Hey,
    Thanks for answering. I solved the issue. The issues was that I had to do "git lfs pull" instead of "git pull".
    Project path is correct. I deliberately didn't put the username here.
     
    KevinWelton likes this.