ValveSoftware / Dota-2

Tracker for issues specific to Linux and Mac in the Reborn client. If you have a general issue or non-system-specific feature request please go to dev.dota2.com
470 stars 38 forks source link

[LINUX] Dota 2 vulkan starts on wrong monitor #962

Open Celexi opened 8 years ago

Celexi commented 8 years ago

With vulkan i am unable to start dota 2 on right monitor, there are two workarounds, none great and sometimes don't work. I am using Fedora 24 with gnome 3.20.2 and dota 2 by default will open on my left monitor, or right, never the main monitor. Sometimes i am able to move it with the gnome hotkey to the right monitor, sometimes doing that makes the game crash or the mouse act as if it was in the original window, with -phased_window_create it starts as a really tiny window surrounded by black that i have to somehow be able to change the resolution back to normal, after changing and relaunching it resets itself and goes back to a tiny window. This is the only game doing this and it has been going for sometime now since Reborn, now quite a lot worse!

System info:

Computer Information: Manufacturer: Unknown Model: Unknown Form Factor: Desktop No Touch Input Detected

Processor Information: CPU Vendor: AuthenticAMD CPU Family: 0x15 CPU Model: 0x1 CPU Stepping: 0x2 CPU Type: 0x0 Speed: 3100 Mhz 8 logical processors 4 physical processors HyperThreading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Supported SSE41: Supported SSE42: Supported AES: Supported AVX: Supported CMPXCHG16B: Supported LAHF/SAHF: Supported PrefetchW: Unsupported

Network Information: Network Speed:

Operating System Version: "Fedora release 24 (Twenty Four)" (64 bit) Kernel Name: Linux Kernel Version: 4.6.4-301.fc24.x86_64 X Server Vendor: Fedora Project X Server Release: 11804000 X Window Manager: GNOME Shell Steam Runtime Version: steam-runtime-beta-release_2016-06-15

Video Card: Driver: NVIDIA Corporation GeForce GTX 960/PCIe/SSE2

Driver Version:  4.5.0 NVIDIA 367.35
OpenGL Version: 4.5
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 60 Hz
VendorID:  0x10de
DeviceID:  0x1401
Revision Not Detected
Number of Monitors:  2
Number of Logical Video Cards:  1
Primary Display Resolution:  1920 x 1080
Desktop Resolution: 3840 x 1080
Primary Display Size: 20.91" x 11.77"  (23.98" diag)
                                        53.1cm x 29.9cm  (60.9cm diag)
Primary Bus: PCI Express 16x
Primary VRAM: 2048 MB
Supported MSAA Modes:  2x 4x 8x 16x 

Sound card: Audio device: Realtek ALC887-VD

Memory: RAM: 24122 Mb

Miscellaneous: UI Language: English LANG: en_US.utf8 Microphone: Not set Total Hard Disk Space Available: 879807 Mb Largest Free Hard Disk Block: 85969 Mb VR Headset: None detected

Recent Failure Reports:

gdrewb-valve commented 8 years ago

This only happens with vulkan? If you use the default OpenGL renderer it opens properly?

Celexi commented 8 years ago

I just tested and with the OpenGL renderer it opens in wrong monitor but can be moved to right one by switching it to windowed, placing the window in the right monitor and using " use my monitor settings" with vulkan, doing that something weird like:

screenshot from 2016-07-30 00-06-13

happens,

with the -phased_window_create

this happens:

screenshot from 2016-07-30 00-07-31

gdrewb-valve commented 8 years ago

Let's set aside Vulkan for the moment (as it's new and may have its own bugs) and moving the window manually (since the game does not handle being moved particularly gracefully on any renderer or platform). Does -phased_window_create cause the window to get created on the correct monitor if you're using OpenGL?

What size and mode (fullscreen/windowed/borderless) are you using? What size are your monitors? If you use borderless settings that are smaller than the desired monitor does the window get created on the right monitor? Does -sdl_displayindex 1 change which monitor things start on?

Celexi commented 8 years ago

-phased_window_create does make it launch in the correct monitor in OpenGL, I am using Fullscreen, my monitors resolution is 1920x 1080(Both) , both my monitors are 22 inch.

gdrewb-valve commented 8 years ago

OK, it must be something with Vulkan not properly handling the window changes that -phased_window_create makes.

danginsburg commented 8 years ago

I am not able to repro the screenshot above of Vulkan drawing to the corner of the screen using -phased_window_create. I have two monitors 1920x1080 and I have tried launching in bordered window mode then moving the window and switching to desktop-friendly fullscreen. It seems to handle the resize properly, with or without -phased_window_create. Can you please explain the repro steps for the issue you see with vulkan.

Celexi commented 8 years ago

It seems to handle now resizing fine and moving, as long i don't use "use my monitor settings" , but it still starts in a corner in Vulkan for me( with -phased_window_create ), and if i set it windowed in vulkan, close and relaunch it with -phased_window_create , it just freezes.

I forgot to mention earlier that Borderless works fine as long its not the same size as my monitor, if it is it gets dragged to another monitor.

Tele42 commented 7 years ago

Just to add to this, I am unable to use -phased_window_create with -vulkan. The window spawns, shows a still image of what was in the area the window spawned, and starts with 3 loaded threads that drops down to 2 threads in an endless loop.

I am using Cinnamon 3.0 with a pair of 1920x1080 monitors, primary monitor to the right, secondary to the left. There is no serviceable solution to run Dota 2 with vulkan and get it to run over the panel / task bar on my primary monitor. System information: https://gist.github.com/Tele42/df0616588883d9fa7ea926421226ad00

Something potentially affected this behavior in the steam client beta cycle, as the behavior of the Dota 2 client with the steam stable client changed from acting like it forgot how to do swap buffers with X to failing to finishing initialization of the window. I am unable to confirm this last curiosity as the steam stable client was recently version bumped.

The console log gives me

ERROR! VK call failed! result = VK_ERROR_DEVICE_LOST ( vkQueueSubmit( VulkanQueue(), 1, &submitInfo, pFence->Get() ) )
ERROR! VK call failed! result = VK_ERROR_DEVICE_LOST ( vkQueueSubmit( VulkanQueue(), 1, &submitInfo, pFence->Get() ) )
ERROR! VK call failed! result = VK_ERROR_DEVICE_LOST ( vkQueueSubmit( VulkanQueue(), 1, &submitInfo, presentFence.m_pFence ) )
Bailing out of vkWaitForFences() after 0.000001 seconds
DispatchAsyncEvent backlog, failed to dispatch all this frame. Queue depth: 3106 (7346 input number was)
ERROR! VK call failed! result = VK_ERROR_DEVICE_LOST ( vkQueueSubmit( VulkanQueue(), 1, &submitInfo, pFence->Get() ) )
ERROR! VK call failed! result = VK_ERROR_DEVICE_LOST ( vkQueueSubmit( VulkanQueue(), 1, &submitInfo, presentFence.m_pFence ) )
Bailing out of vkWaitForFences() after 0.000002 seconds
DispatchAsyncEvent backlog, failed to dispatch all this frame. Queue depth: 87 (3356 input number was)
ERROR! VK call failed! result = VK_ERROR_DEVICE_LOST ( vkQueueSubmit( VulkanQueue(), 1, &submitInfo, pFence->Get() ) )
ERROR! VK call failed! result = VK_ERROR_DEVICE_LOST ( vkQueueSubmit( VulkanQueue(), 1, &submitInfo, presentFence.m_pFence ) )
Bailing out of vkWaitForFences() after 0.000001 seconds
ERROR! VK call failed! result = VK_ERROR_DEVICE_LOST ( vkQueueSubmit( VulkanQueue(), 1, &submitInfo, pFence->Get() ) )
CSwapChainBase::QueuePresentAndWait() looped for 21 iterations without a present event.
Attempting to purge m_fencedResourceList.Count() = 8, m_pendingFencedResourceQueue.Count() = 2, nCurrentCmdBuffersAvailable = 0, nAllocatedCommandBuffers = 1500

with the last line on endless repeat.

vmavromatis commented 7 years ago

Can confirm on Manjaro 17 / GNOME 3.22. -phased_window_create and -vulkan are still incompatible. There is plenty of us who want to use Vulkan on a multimonitor setup. Is there any update on this one or at least a workaround?

materemias commented 7 years ago

same happens to me, do you need anything to help in debugging?

ChrisLauinger77 commented 7 years ago

same here -phased_window_create and -vulkan not working:

Computer Information: Manufacturer: Unknown Model: Unknown Form Factor: Desktop No Touch Input Detected

Processor Information: CPU Vendor: GenuineIntel CPU Brand: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz CPU Family: 0x6 CPU Model: 0x3a CPU Stepping: 0x9 CPU Type: 0x0 Speed: 3900 Mhz 8 logical processors 4 physical processors HyperThreading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Unsupported SSE41: Supported SSE42: Supported AES: Supported AVX: Supported CMPXCHG16B: Supported LAHF/SAHF: Supported PrefetchW: Unsupported

Operating System Version: Debian GNU/Linux testing (buster) (64 bit) Kernel Name: Linux Kernel Version: 4.12.0-2-amd64 X Server Vendor: The X.Org Foundation X Server Release: 11903000 X Window Manager: GNOME Shell Steam Runtime Version: steam-runtime-beta-release_2017-07-24

Video Card: Driver: NVIDIA Corporation GeForce GTX 1070/PCIe/SSE2 Driver Version: 4.5.0 NVIDIA 384.69 OpenGL Version: 4.5 Desktop Color Depth: 24 bits per pixel Monitor Refresh Rate: 60 Hz VendorID: 0x10de DeviceID: 0x1b81 Revision Not Detected Number of Monitors: 2 Number of Logical Video Cards: 1 Primary Display Resolution: 1920 x 1080 Desktop Resolution: 3840 x 1080 Primary Display Size: 20,91" x 11,77" (23,98" diag) 53,1cm x 29,9cm (60,9cm diag) Primary Bus: PCI Express 16x Primary VRAM: 8192 MB Supported MSAA Modes: 2x 4x 8x 16x

Sound card: Audio device: Nvidia GPU 83 HDMI/DP

Memory: RAM: 32143 Mb

Miscellaneous: UI Language: English LANG: de_DE.UTF-8 Total Hard Disk Space Available: 53884 Mb Largest Free Hard Disk Block: 20581 Mb VR Headset: None detected

Recent Failure Reports:

epatpol commented 6 years ago

Same thing happens here, I can somehow move it on the main display with GNOME but as soon as I alt-tab out of the game it minimizes and when maximized go back to the other display. Same thing happens with Vulkan/OpenGL.

irandms commented 6 years ago

I have this issue as well on Fedora 28/GNOME 3. I can't get the game to launch properly on the primary monitor without -phased_window_create, and using that causes the game to appear very tiny in the upper-left portion of the display, per other comments here. If I alt-tab or otherwise have the game lose focus, it will crash. OpenGL works fine however.

babelshift commented 6 years ago

Until the other day, I was able to launch Dota 2 to the primary monitor set in the Gnome display settings. Now it only launches on a single monitor regardless of what is set at the Gnome level. Stranger yet, if I set my primary to the 1080p monitor, the game will launch on my 1440p but locked to 1080p resolution.

Using OpenGL and Vulkan make no difference.

However, using -phased_window_create launch option with OpenGL does fix the issue. I never had to use this launch option until earlier this week, so I'm not sure what's changed.

Computer Information:
    Manufacturer:  Unknown
    Model:  Unknown
    Form Factor: Desktop
    No Touch Input Detected

Processor Information:
    CPU Vendor:  AuthenticAMD
    CPU Brand:  AMD Ryzen 5 1600 Six-Core Processor            
    CPU Family:  0x17
    CPU Model:  0x1
    CPU Stepping:  0x1
    CPU Type:  0x0
    Speed:  3739 Mhz
    12 logical processors
    6 physical processors
    HyperThreading:  Supported
    FCMOV:  Supported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Supported
    SSE41:  Supported
    SSE42:  Supported
    AES:  Supported
    AVX:  Supported
    CMPXCHG16B:  Supported
    LAHF/SAHF:  Supported
    PrefetchW:  Unsupported

Operating System Version:
    Ubuntu 18.04.1 LTS (64 bit)
    Kernel Name:  Linux
    Kernel Version:  4.15.0-33-generic
    X Server Vendor:  The X.Org Foundation
    X Server Release:  11906000
    X Window Manager:  GNOME Shell
    Steam Runtime Version:  steam-runtime-beta-release_2018-06-14

Video Card:
    Driver:  NVIDIA Corporation GeForce GTX 970/PCIe/SSE2
    Driver Version:  4.6.0 NVIDIA 396.54
    OpenGL Version: 4.6
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 143 Hz
    VendorID:  0x10de
    DeviceID:  0x13c2
    Revision Not Detected
    Number of Monitors:  2
    Number of Logical Video Cards:  1
    Primary Display Resolution:  1920 x 1080
    Desktop Resolution: 4480 x 1440
    Primary Display Size: 20.91" x 11.77" (23.98" diag)
                                            53.1cm x 29.9cm (60.9cm diag)
    Primary Bus: PCI Express 16x
    Primary VRAM: 4096 MB
    Supported MSAA Modes:  2x 4x 8x 16x 

Sound card:
    Audio device: Nvidia GPU 71 HDMI/DP

Memory:
    RAM:  16049 Mb

Miscellaneous:
    UI Language:  English
    LANG:  en_US.UTF-8
    Total Hard Disk Space Available:  32725 Mb
    Largest Free Hard Disk Block:  16881 Mb
    VR Headset: None detected

Recent Failure Reports:
rastating commented 6 years ago

Much like @babelshift, I've not had this issue before using OpenGL, but using -phased_window_create allows it to start on the correct monitor (which is assigned as the primary monitor).

dan-dr commented 5 years ago

Same here. Vulkan and OpenGL open in secondary monitor, -phased_window_create works only with OpenGL, with Vulkan it freezes my desktop and I have to jiggle to kill it.

I'm on Solus distro

Frankstar commented 5 years ago

since last patch ist working without a problem. didnt change anything.

ChrisLauinger77 commented 5 years ago

since last patch ist working without a problem. didnt change anything.

what exactly does work for you ? please explain ? for me, -phased_window_create does not work with vulkan and without it its on wrong screen.

Frankstar commented 5 years ago

there is nothing to explain. i start Dota only with -vulkan Before the patch - it always started on the wrong monitor. since the patch it starts on the Primary Monitor -> so it seems fixed to me.

ChrisLauinger77 commented 5 years ago

there is nothing to explain. i start Dota only with -vulkan Before the patch - it always started on the wrong monitor. since the patch it starts on the Primary Monitor -> so it seems fixed to me.

What gfx card are you on ? What are your dota video settings ?

buxxi commented 5 years ago

Having this problem when running Ubuntu 18.10/Gnome 3.30.1/Nvidia GTX 970 410.78, want it to start on my right screen but it starts on my left.

My launchoptions: -sdl_displayindex 0 -w 1920 -h 1080 -freq 144 -vulkan

But I found out it seems to be affected if the panel is shown or not (using dash to panel if that may affect anything).

So it seems like it doesn't think the whole screen is available to use and prefers another where it can utilize the whole screen instead.

naanlizard commented 5 years ago

With dash to panel installed, and intellihide / autohide disabled, dota always starts on the wrong monitor (ie non-primary). Vulkan or opengl makes no difference, neither does the sdl monitor index command.

Turning on intellihide/autohide in dash to panel settings does make dota start on the proper screen, and if I disable intellihide after dota launches, everything is fine until I want to start dota again.

playaz87 commented 5 years ago

My game was opening on right when I wanted it to open on the left. I solved it by using the -x parameter. So in my case -x 0. If you want the game to open on the right you would use -x <horizontal resolution of left monitor +1>

ChrisLauinger77 commented 3 years ago

after todays update it looks like -phased_window_create does not work any more. With -phased_window_create the dota window is only 10 % on the screen on the upper left. without it it always opens on the wrong (not primary) screen with no way to move it https://gist.github.com/ChrisLauinger77/ac3f8a7cf89c1499688617bbad1d0cdb

vmavromatis commented 3 years ago

Same here -phased_window_create stopped working (game/system freezes, I need to use alt tab and kill the app). It was working fine for some years but not any more.... Nvidia/manjaro/vulkan

PS: Fixed by complete Dota reinstall

ChrisLauinger77 commented 3 years ago

@vmavromatis: So you reinstalled Dota and -phased_window_create works again ?

vmavromatis commented 3 years ago

@ChrisLauinger77 yes this is correct. I don't know what broke it before.

ChrisLauinger77 commented 3 years ago

@vmavromatis thats intresting I tried verify integrity of the game files. this did not find anything. I wonder what reinstall would do different. Maybe somebody from valve knows ? @alexvalve @jeffmvalve @VivekValve @EricS-Valve @cboyd-valve @gdrewb-valve

I reinstalled as well, but the issue remains

ChrisLauinger77 commented 3 years ago

It works again - it was an update to mutter or gnome-shell I think.

YellowOnion commented 3 years ago

It literally starts the game on he wrong Monitor, with the incorrect resolution, and the out of bounds data flickers like crap, why can't Valve get this right? what's so hard about multi-monitor support? maybe they should just look at how Wine does it, because it has no problems getting my games on the correct monitor.

Mouse cursor dosen't even click the correct location!