Search Unity

Editor screen won't load in Elementary Juno (Ubuntu 18.04)

Discussion in 'Linux Editor' started by sterlingm, Feb 10, 2019.

  1. sterlingm

    sterlingm

    Joined:
    Jul 14, 2017
    Posts:
    3
    I am trying to run Unity3D on Elementary Juno which is (basically) Ubuntu 18.04 underneath with the Pantheon desktop environment as the UI. When I run Unity, I get the screen to open a project and everything seems normal. However, after selecting a project (or creating a new one), the Unity window appears, but the actual editor screen does not load in the window. The screenshot below shows what I am talking about. In the screenshot, I have opened a project in Unity, but instead of seeing the editor inside of the Unity window I see my desktop background. Inside the Unity window is like an image of my desktop when I launched Unity.

    https://imgur.com/xpgPvQI

    Has anyone experienced this or know what I can try to test? I'm not sure how to describe the error so I haven't been successful at finding a solution on Google. I think it's a...compositing issue? Or a redrawing issue? I think the issue could be with my gpu drivers, but I'm just not sure. I can interact with the top menu buttons (File, Edit, Window, etc). I can drag the window around, maximize it, and close it fine. But I cannot see or interact with anything in the area that the actual Unity editor should show.

    My GPU is a Nvidia GTX 960. I am using the proprietary drivers on Linux. I have gone into the Nvidia Powermizer settings and changed the performance to max performance.

    glxinfo | grep version
    returns:

    Code (csharp):
    1. server glx version string: 1.4
    2. client glx version string: 1.4
    3.  
    4. GLX version: 1.4
    5. OpenGL core profile version string: 4.6.0 NVIDIA 390.77
    6. OpenGL core profile shading language version string: 4.60 NVIDIA
    7. OpenGL version string: 4.6.0 NVIDIA 390.77
    8. OpenGL shading language version string: 4.60 NVIDIA
    9. OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 390.77
    10. OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
    11. GL_EXT_shader_implicit_conversions, GL_EXT_shader_integer_mix,

    Note that my OpenGL version is 4.6, but at the top of my Unity window it says OpenGL 4.5. Could it be something with that? If so, then is there a way to downgrade my OpenGL without breaking stuff in my system? Or can I downgrade and run the downgraded version only for this application?

    I checked all the dependencies listed in one of the sticky posts and I have all of them.

    I have this error using two methods of installing Unity:

    1) Installing Unity with the latest UnityHub AppImage.

    2) Installing Unity based on the instructions here: https://askubuntu.com/questions/1077816/how-to-install-unity3d-on-ubuntu-18-04. One interesting thing is that with this method, everything works if I run Unity as root 'sudo unity3d'. However, opening a project as root makes some of the files be owned by root so I can't open it as non-root again.

    Currently, I am using UnityHub. If I run UnityHub as root, then I still see the problem.

    Does anyone know what may be wrong or what I can test for? Any help is appreciated.
     
  2. sterlingm

    sterlingm

    Joined:
    Jul 14, 2017
    Posts:
    3
    Update: I am able to get the editor screen showing, but some issues still exist.

    I am able to get the editor screen going by doing 'export GTK_CSD=0' and then running the UnityHubSetup.AppImage file. This loads the editor screen pretty reliably.

    However, the file chooser does not load. I can select "Open scene" or "Open project", but the file chooser window never shows. An error message shows up when I run the app image that would explain this. When I run the AppImage, the first message is:

    Gtk-Message: 20:33:59.322: Failed to load module "pantheon-filechooser-module"


    When I run 'env | grep -i gtk' I see:

    GTK_CSD=0
    QT_QPA_PLATFORMTHEME=gtk3
    GTK_MODULES=:pantheon-filechooser-module:gail:atk-bridge


    So I guess the problem is that Pantheon runs GTK3, but Unity needs GTK2. Is there any work around for this? I can run Unity by setting GTK_CSD=0, but it is kind of a hassle to not be able to use a file chooser.
     
  3. SuperSteeeeeeeve

    SuperSteeeeeeeve

    Joined:
    Jan 12, 2018
    Posts:
    15
    Are you sure you installed all dependencies?

    Try this in a terminal.

    Code (CSharp):
    1. sudo apt-get install libgtk2.0-0 libsoup2.4-1 libarchive13 libgconf-2-4 libnspr4 p7zip-full tar gzip cpio zip gconf-service lib32gcc1 lib32stdc++6 libasound2 libc6 libc6-i386 libcairo2 libcap2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libfreetype6 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libgl1-mesa-glx libglib2.0-0 libglu1-mesa libgtk2.0-0 libnss3 libpango1.0-0 libstdc++6 libx11-6 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxtst6 zlib1g debconf npm
    To be sure try to reinstall unity as well and then it should work.
    I used elementary a while ago and had the same issues, after installing all dependencies it worked as expected, without any commandline arguments from the terminal. Try to use Unity Hub everytime for anything. :)

    Bildschirmfoto von 2019-02-14 04-23-39.png
     
  4. sterlingm

    sterlingm

    Joined:
    Jul 14, 2017
    Posts:
    3
    I copied your command into the terminal and everything was installed. I re-installed Unity via UnityHub. No changes though, same problems. I will probably just switch back to vanilla Ubuntu with Gnome installed.