Search Unity

Why UI is so sluggish?

Discussion in 'Linux' started by turbanov, Jan 21, 2019.

  1. turbanov

    turbanov

    Joined:
    Dec 22, 2014
    Posts:
    59
    I wonder why Linux version's UI is so sluggish comparing to that on Windows. I can't really find any justification for that. Same hardware, but the difference is drastical.
     
    ma1onso and senkal_ like this.
  2. mageaster

    mageaster

    Joined:
    Sep 1, 2015
    Posts:
    85
    May we have some comparison... in video, maybe?
     
  3. turbanov

    turbanov

    Joined:
    Dec 22, 2014
    Posts:
    59
    Windows

    Linux

    Linux 18
     
    ma1onso and 2dgame like this.
  4. 2dgame

    2dgame

    Joined:
    Nov 24, 2014
    Posts:
    83
    I experience the same issues. Apart from the stuttering, the unity panels jump around like crazy when trying to dock them somewhere. It's downright unuseable for me right now. I experience this behavior on high end hardware on both linux mint cinnamon and kubuntu, each on current version. Windows no problems.
     
  5. ma1onso

    ma1onso

    Joined:
    Jun 17, 2014
    Posts:
    79
    Same here
     
  6. PixelJ

    PixelJ

    Unity Technologies

    Joined:
    Nov 1, 2018
    Posts:
    216
    This bug has been found and fixed internally! Yay! It's way smoother now. I'll let you know when a build with the fixes goes out.
     
    sfjohansson, varkxel, ma1onso and 3 others like this.
  7. turbanov

    turbanov

    Joined:
    Dec 22, 2014
    Posts:
    59
    Great news, team! Looking forward to it. Could you elaborate on what was wrong exactly? Maybe we can help to improve it event more.
     
  8. andrar

    andrar

    Joined:
    Sep 27, 2017
    Posts:
    18
    Please try the latest 2019.1.0b2 that is now available to install via the Hub. Many of the UI responsiveness issues should be fixed in that version.
     
    PixelJ likes this.
  9. septia

    septia

    Joined:
    Jan 19, 2019
    Posts:
    2
    Running Unity 2019.1.0b2 on my Kubuntu 18.04 now (using nvidia-driver-415), I can still feel the UI lagging behind i.e when you try to resize the panels (inside the Editor) around.

    Other than that, everything else seems to be working ok.
     
    Last edited: Feb 5, 2019
  10. Advis91

    Advis91

    Joined:
    Jun 20, 2017
    Posts:
    33
    Tried to move window to other position and got empty space with errors in first new empty project on it. Fixed it by reloading the default layout (This has happened almost everytime on new editors now).
    Code (CSharp):
    1. Socket: bind failed, error: Address already in use(98)
    2.  
    3. NullReferenceException: Object reference not set to an instance of an object
    4. UnityEditor.EditorWindow.GetRootElement[TMode] (System.Boolean createIfNull) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorWindow.cs:79)
    5. UnityEditor.EditorWindow.get_rootVisualElement () (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorWindow.cs:71)
    6. UnityEditor.SettingsWindow.SetupUI () (at /home/builduser/buildslave/unity/build/Editor/Mono/Settings/SettingsWindow.cs:228)
    7. UnityEditor.SettingsWindow.OnEnable () (at /home/builduser/buildslave/unity/build/Editor/Mono/Settings/SettingsWindow.cs:98)
    8. UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget()
    9. UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
    10.  
    11. NullReferenceException: Object reference not set to an instance of an object
    12. UnityEditor.EditorWindow.GetRootElement[TMode] (System.Boolean createIfNull) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorWindow.cs:79)
    13. Unity.Experimental.EditorMode.EditorModes.GetRootElement[TMode] (UnityEditor.EditorWindow window) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorMode/EditorModes.cs:455)
    14. Unity.Experimental.EditorMode.EditorModes+ModeGenericHelper`1[TMode].GetRoot (UnityEditor.EditorWindow window) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorMode/EditorModes.cs:28)
    15. Unity.Experimental.EditorMode.EditorModes.GetRootElement (UnityEditor.EditorWindow window) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorMode/EditorModes.cs:215)
    16. UnityEditor.HostView.RegisterSelectedPane (System.Boolean sendEvents) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:384)
    17. UnityEditor.HostView.SetActualViewInternal (UnityEditor.EditorWindow value, System.Boolean sendEvents) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:37)
    18. UnityEditor.DockArea.SetSelectedPrivate (System.Int32 value, System.Boolean sendEvents) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:96)
    19. UnityEditor.DockArea.set_selected (System.Int32 value) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:87)
    20. UnityEditor.DockArea.DragTab (UnityEngine.Rect tabAreaRect, System.Single scrollOffset, UnityEngine.GUIStyle tabStyle) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:798)
    21. UnityEditor.DockArea.DrawTabs (UnityEngine.Rect tabAreaRect) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:392)
    22. UnityEditor.DockArea.OldOnGUI () (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:347)
    23. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:292)
    24. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:478)
    25. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:461)
    26. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:441)
    27. UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at /home/builduser/buildslave/unity/build/Modules/UIElements/Events/IEventDispatchingStrategy.cs:64)
    28. UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /home/builduser/buildslave/unity/build/Modules/UIElements/Events/MouseEventDispatchingStrategy.cs:58)
    29. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /home/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
    30. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /home/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
    31. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /home/builduser/buildslave/unity/build/Modules/UIElements/Panel.cs:189)
    32. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /home/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:250)
    33. UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
    34. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    35.  
    36. NullReferenceException: Object reference not set to an instance of an object
    37. UnityEditor.EditorWindow.GetRootElement[TMode] (System.Boolean createIfNull) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorWindow.cs:79)
    38. Unity.Experimental.EditorMode.EditorModes.GetRootElement[TMode] (UnityEditor.EditorWindow window) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorMode/EditorModes.cs:455)
    39. Unity.Experimental.EditorMode.EditorModes+ModeGenericHelper`1[TMode].GetRoot (UnityEditor.EditorWindow window) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorMode/EditorModes.cs:28)
    40. Unity.Experimental.EditorMode.EditorModes.GetRootElement (UnityEditor.EditorWindow window) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorMode/EditorModes.cs:215)
    41. UnityEditor.HostView.UpdateViewMargins (UnityEditor.EditorWindow view) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:71)
    42. UnityEditor.HostView.SetActualViewPosition (UnityEngine.Rect newPos) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:91)
    43. UnityEditor.DockArea.SetActualViewPosition (UnityEngine.Rect newPos) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:621)
    44. UnityEditor.HostView.SetPosition (UnityEngine.Rect newPos) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:83)
    45. UnityEditor.View.set_position (UnityEngine.Rect value) (at /home/builduser/buildslave/unity/build/Editor/Mono/View.cs:119)
    46. UnityEditor.SplitView.MakeRoomForRect (UnityEngine.Rect r) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/SplitView.cs:473)
    47. UnityEditor.SplitView.PerformDrop (UnityEditor.EditorWindow dropWindow, UnityEditor.DropInfo dropInfo, UnityEngine.Vector2 screenPos) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/SplitView.cs:441)
    48. UnityEditor.DockArea.DragTab (UnityEngine.Rect tabAreaRect, System.Single scrollOffset, UnityEngine.GUIStyle tabStyle) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:920)
    49. UnityEditor.DockArea.DrawTabs (UnityEngine.Rect tabAreaRect) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:392)
    50. UnityEditor.DockArea.OldOnGUI () (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:347)
    51. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:292)
    52. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:478)
    53. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:461)
    54. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:441)
    55. UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /home/builduser/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:84)
    56. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /home/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
    57. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /home/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
    58. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /home/builduser/buildslave/unity/build/Modules/UIElements/Panel.cs:189)
    59. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /home/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:250)
    60. UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
    61. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    Now it works beautifully. I can see where window will be placed now! Earlier the window blocked the view and I just had to know where it goes.
    When I move my editor to other the new windows still seems to go to other display screen on top left corner though.

    As the windows work reliably this isn't really an issue, but update for rescaling windows requires some fixing as windows in windows scale at different times to follow the outer window size on their own updates.
    For example, put game window in bottom of hierarchy so they are in same layout. Then scale scene view from that side.

    View in beautiful minimalist ascii art with arrow to border (|--| <- | | )
    Obviously draw call for game and scene is already heavy and you don't really need it to rescale all the time.

    Heavy draw calls could be drawn again after resize is complete. Same happens on windows editor, but is less apparent as it updates slightly faster.

    Seems to be implemented like that on windows as it doesn't seem to drag the right side at all (On drag the size updates before next draw?). Switch achor points (presuming it uses canvas UI like classes) to other side when border goes to drag and when it ends just put it in middle of window?
     
  11. Advis91

    Advis91

    Joined:
    Jun 20, 2017
    Posts:
    33
    Oh and when selecting something in Project folder changes selection in Hierarchy.
    For example on Project folders, view Assets folder and select first item there (Scenes folder for me) when in list view (smallest icon view) the selection changes in hierarchy window aswell.
    This happens only on linux editor and been since 2018 version.
    I guess my earlier message was too big for edit... got spam warning...
     
  12. turbanov

    turbanov

    Joined:
    Dec 22, 2014
    Posts:
    59
    It's better, but still worse than Windows' version and nor on par of what other apps provide. Can you elaborate on your approach for windowing? Maybe, we could help with the ideas.
     
    AsciiRebellion likes this.
  13. turbanov

    turbanov

    Joined:
    Dec 22, 2014
    Posts:
    59
    Another suggestion is to merge the changes to current LTS and 2018 versions.
     
  14. mikaelK

    mikaelK

    Joined:
    Oct 2, 2013
    Posts:
    284
    Thank you for the 2019 fix! This made my day and fixed a lot of problems for me related to plugins and their editor UI
     
    PixelJ and senkal_ like this.
  15. Advis91

    Advis91

    Joined:
    Jun 20, 2017
    Posts:
    33
    I think updating mouse position on editor is slow or it may be delayed by the draw action when dragging sides.
     
    senkal_ likes this.
  16. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    Sorry to reply to an old post. But having this exact issue on Ubuntu 22.04. Im an experienced linux user, all drivers are up to date. Just UI really lags on resize, exactly like in the example video.
     
    SorceressLyra and ma1onso like this.
  17. larssonmartin1998

    larssonmartin1998

    Joined:
    Dec 12, 2017
    Posts:
    11
    Have the same issue on Ubuntu 22.04 with Unity 2022.3.4 LTS