Search Unity

UI not receiving mouse events? 5.6.0f1

Discussion in 'Linux' started by NathanWarden, Apr 2, 2017.

  1. Deccard

    Deccard

    Joined:
    Aug 1, 2016
    Posts:
    6
    This worked for me, too. Before (even using 5.6.2f1) the mouse got non-responsive when switching to full screen. With the patched player this is no longer the case :)
     
  2. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    980
    Ok, the additional fix is scheduled for 5.6.2p3. (There's also no problem with using the patched build for 5.6.2f1.)
     
  3. Sebioff

    Sebioff

    Joined:
    Dec 22, 2013
    Posts:
    189
    This fix is working for us as well. Thanks for providing it ahead of the official patch release! :)
     
  4. Necronomicron

    Necronomicron

    Joined:
    Mar 4, 2015
    Posts:
    107
    It seems it is still there, I'm using Unity 2017.1.0f3, everything works fine on Windows. I made a build for Linux and sent it to a friend, he tested it on 2 different systems. On both buttons didn't work in fullscreen mode. On 1st one he hadn't pre-game settings window at all and couldn't switch to windowed mode using Alt+Enter. On 2nd one he had pre-game window and in windowed mode buttons worked fine.
     
  5. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    980
    Necronomicron and mysticfall like this.
  6. vladzh

    vladzh

    Joined:
    May 6, 2015
    Posts:
    1
    Tried unity 2017.1.0p3 from 11 August 2017. On build for Linux buttons didn't work in fullscreen mode. On unity 2017.1.0p4 the same problem.
     
    Last edited: Aug 21, 2017
  7. etaxi341

    etaxi341

    Joined:
    Oct 4, 2013
    Posts:
    60
    Same Problem here. It does work on my Linux machine but not on the Linux machine steam tested it for me so they did not allow me to release the game in this state. Cannot experience this bug on any of my Linux builds. But Steam staffs seem to have the bug...
     
  8. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    980
    Do you have a build I can test?
     
  9. BugbyteSupport

    BugbyteSupport

    Joined:
    Oct 6, 2016
    Posts:
    5
    I have this problem using Unity 2017.1.0p4

    It works if I code the game to start first in windowed mode. Although I have noticed that pretty much on any platform
    if you use Screen.SetResolution(maxResolution.width, maxResolution.height, false). Meaning you try to put the game in max resolution windowed mode it will not work. On windows the whole game window simply vanishes.

    So I have to use Screen.SetResolution(maxResolution.width - 1, maxResolution.height - 1, false)

    Anyway. I have fixed the issue on linux by forcing the game to start in windowed mode first, then waiting two frames and making the game full screen again. For some reason there needs to be a wait for two frames or otherwise the game screen starts blinking really fast. When the game is started this way the mouse will register input.
     
  10. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    980
    For those of you reporting the issue with 2017.1.0p4 - are you very sure that you don't have existing, corrupted preferences from an older build?
     
  11. wowau

    wowau

    Joined:
    Jul 5, 2012
    Posts:
    1
    Sorry for the stupid question, but how can i use is in my project? I tried to find some explanation how to install hotfixes like that, but couldn't find anything useful.

    Update:
    Ok, solved. Thanks a lot for this fix. I had just to put it in the right folder ..\Unity\Editor\Data\ and not ..\Unity\Editor\Data\UnityExtensions\Unity\
     
    Last edited: Feb 6, 2018
  12. Ilithios

    Ilithios

    Joined:
    Mar 30, 2015
    Posts:
    4
    This issue is still not fixed? Running 2017.3.1f1 and when it opens full screen in the Linux build, no input of any kind works, not mouse or keyboard. Should I try that hotfix above? What do you do with it? Just unzip the whole thing into the \Unity\Editor\Data\ folder?
     
  13. Ilithios

    Ilithios

    Joined:
    Mar 30, 2015
    Posts:
    4
    applied the Hotfix and it just makes a bunch of errors pop up in the console and then Unity crashes
     
  14. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    980
    That hotfix won't work with Unity 2017.4.
    We'll triple-check Unity 2017.4 again...
     
  15. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    988
    @Ilithios can you try https://files.unity3d.com/stefan/linux/mousetest17.4.zip and link the player log if you can repro the issue you are seeing with this build? Thanks!

    Otherwise can you add some mouse position logging to your project and link the log? Or even better make a repro project and send it via the bug reporter and link us the case number here. Thanks!
     
  16. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,179
    So... my game ran fine (2017.1 universal linux build) on 16.04, but Steam doesn't work on 16.04 so I upgraded to 18.04, now mouse clicks don't do anything. I've placed the 2017.1.0 patch in the Editor/Data folder, though I don't see where it says I'm supposed to do that other than woau's post.

    Could we get a little more organization here? Is this not as wide-spread as it sounds? I really am not enjoying Linux thus far, but there are players waiting for it. Building now, I guess if this works no biggie.

    http://files.unity3d.com/levi/LinuxStandaloneSupport-5.6.2f1+inputfix.zip
    or
    http://files.unity3d.com/levi/LinuxStandaloneSupport-2017.1.0f3+input-hotfix.zip

    go into the Unity/Editor/Data folder prior to building and that fixes it? And you're out of luck for other versions?
    I tried launching mousetest17.4 in Ubuntu and it said no application was available to run it?

    On a side note... I assume related to that patch? My x86 and x86_64 files are now listed as last modified August 8th, 2017, even though they're listed as created June 18th, 2018??

    additional: the 2017.1.0 patch did fix the problem for me in Ubuntu 18.04. Game seems to be running without problems now.
     
    Last edited: Jun 25, 2018
  17. mystman12

    mystman12

    Joined:
    Jul 20, 2017
    Posts:
    3
    I am having the same exact issue. None of my GUI buttons work when my game is full screen on Linux. I've tried triggering then unsing a couple different techniques to no avail. I'm using 2018.2 beta 11.

    Edit: Okay, now I've also found that Input.KeyDown also doesn't work on Linux while the game runs in full screen, so I don't think it's just the GUI. (I tried adding key commands for the menu options as a workaround, thinking that would be a decent solution...) For whatever reason, Input.GetMouseButtonDown does work.

    Edit edit: Okay, so I set the fullscreen mode setting in player settings to exclusive fullscreen, which seems to have fixed the issue!
     
    Last edited: Jul 5, 2018
    malkere likes this.
  18. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,839
    On 2018.1
    upload_2018-7-6_20-57-19.png
    Any ideas what's up?
     
  19. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,179
    That's the thing. I just so happened to still be running on 2017.1 which one of the two patches I found in this thread was for... what about the rest of, everyone? I'm not going to upgrade Unity if I can't publish to Linux anymore after I do...?
    @Tak
     
  20. etaxi341

    etaxi341

    Joined:
    Oct 4, 2013
    Posts:
    60
    Running on 2018 now and looks like the Linux UI bug is fixed
     
    malkere likes this.
  21. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,179
    Seems to still be popping up for some people in some instances. What version are you running @etaxi341 ?

    I only had the problem on Ubuntu 18.04 and not 16.04 as well, which is troubling.
     
  22. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    125
    Our game has the same problem, built with Unity 2017.4.7, occuring on major linux distros like Ubuntu 18.04. It can be worked around by most users either by running the game in window mode or by switching to another app and switching back to the game.

    Still, this issue keeps popping up in multiple threads across our forum and it would be very nice of Unity to get this fixed on the LTS stream.
     
    malkere likes this.
  23. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    125
    Also, could a dev from Unity give us a status quo/update on this how unity wants to deal with this matter?
    @Tak ?
     
  24. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    125
    This is still occuring with Linux builds using Unity 2017.4.9 - please Unity devs fix this on the LTS stream. Our linux users were all complaining about this.

    We may found something to help understand the issue. For our users, this seems to be related with the "Application not responding" dialogue, which is triggered very aggressively on most Linux distros nowadays (especially Ubuntu 18.04). In window mode, you see that dialogue and as long as you don't click that dialogue away, the game does not get any mouse input. What happens when your start the game in fullscreen though is that you do not get to see that message but it is still there. This can be easily demonstrated as the UI elements do not respond to your mouse but the game gets closed instantly when you press enter (which triggers the not responding dialogue to kill the app). So that seems to be the cause of this.
     
  25. PJayB

    PJayB

    Unity Technologies

    Joined:
    Apr 24, 2017
    Posts:
    105
    Hi all. Fixing this issue is important to us, but it may take some time as this is not necessarily a Unity issue, but rather a bug in the way that dialog is presented by the OS. Logically, the OS should never pop that dialog behind other windows in any program, not just a Unity standalone player. In fact, a quick internet search reveals other games are suffering from the same issue. We'll reach out the relevant parties to push for a fix sooner.

    There are things we could do to improve this situation on our side, but the situation is complicated. We could fix this by decoupling the game-loop thread from the windowing thread, but this is a large body of work that is not yet on our roadmap. The reason this work has not been prioritized is because this would break Unity customers who rely on being able to safely PInvoke system APIs from the main thread from their C# code. As such we would need to not only do the threading work, but also implement a substitute system for those customers. Additionally, there may be situations out of our control that force the windowing thread to block, so this threading refactor may not entirely eliminate the issue in any case. TL;DR, this is would be a high risk change that wouldn't necessarily eliminate the issue (although I admit it would be a lot better). Overall, this means that fixing the issue upstream would be a better fix.

    In the meantime we'll investigate possible workarounds that you can message to your customers.

    Edit: @ReaktorDave, in this case, the "Not Responding" window should disappear automatically eventually. If this is the case, does the input start working again?
     
    Last edited: Aug 20, 2018
    ReaktorDave likes this.
  26. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    125
    Thank you for the detailed response.

    Is there something we can do on our side? We are already loading scene files asynchronously, but that still seems to stall the main thread.
     
  27. PJayB

    PJayB

    Unity Technologies

    Joined:
    Apr 24, 2017
    Posts:
    105
    I'm not sure there is, but perhaps you can find out more via profiling.

    This dialog theoretically goes away once the app begins "responding" again. Are you finding this not to be the case?
     
  28. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    125
    On Ubuntu 18.04, it doesn't.
     
unityunity