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] Reborn Starts up on wrong monitor #13

Closed Disk1of5 closed 8 years ago

Disk1of5 commented 9 years ago

It seems that Dota 2 - Reborn doesn't use the main monitor initially, original Dota 2 works correctly. I had to change to bordered window, move to the primary screen and then re-enable full screen. It would be nice to choose what display to use in a multi display setup.

My setup is mint 17.1 with Cinnamon as as my windows manager.

malmrose commented 9 years ago

Similar issue here. I have a laptop display 1366x768 and an external 1920x1080. External monitor is set as primary in Mint 17.1 Cinnamon. Steam is running on external monitor. The game opens on the laptop monitor, and is the size of the external monitor.

diegogmx commented 9 years ago

same here, wont start up on primary display

malmrose commented 9 years ago

My primary monitor is on the right side. If I switch the configuration so that my primary is on the left side, then DOTA starts in the right place.

Kirov123 commented 9 years ago

My main display is 1920_1080, while my secondary is 1024_1280 and portrait. I have my main monitor set as primary in Nvidia settings, but the game would start in the other monitor. I tried to fix this by setting my window manager to start dota in my main monitor, but this caused my HUD to look like this: http://steamcommunity.com/sharedfiles/filedetails/?id=467210735

dubcanada commented 9 years ago

Also happens to me.

Processor Information: Vendor: GenuineIntel CPU Family: 0x6 CPU Model: 0x1a CPU Stepping: 0x5 CPU Type: 0x0 Speed: 2668 Mhz 8 logical processors 4 physical processors HyperThreading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Unsupported SSE41: Supported SSE42: Supported

Network Information: Network Speed:

Operating System Version: elementary OS Freya (64 bit) Kernel Name: Linux Kernel Version: 3.16.0-41-generic X Server Vendor: The X.Org Foundation X Server Release: 11600000 X Window Manager: Mutter(Gala) Steam Runtime Version: steam-runtime-release_2015-01-06

Video Card: Driver: ATI Technologies Inc. AMD Radeon R9 200 Series

Driver Version:  4.4.13372 Compatibility Profile Context 15.101.1001
OpenGL Version: 4.4
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 60 Hz
VendorID:  0x1002
DeviceID:  0x67b1
Number of Monitors:  2
Number of Logical Video Cards:  1
Primary Display Resolution:  1920 x 1080
Desktop Resolution: 3600 x 1080
Primary Display Size: 20.91" x 11.77"  (23.98" diag)
                                        53.1cm x 29.9cm  (60.9cm diag)
Primary VRAM Not Detected

Sound card: Audio device: Analog Devices AD1989B

Memory: RAM: 5959 Mb

Miscellaneous: UI Language: English LANG: en_CA.UTF-8 Microphone: Not set Total Hard Disk Space Available: 112546 Mb Largest Free Hard Disk Block: 70064 Mb

Installed software:

Primary Display Resolution is my primary display. But it opens on my secondary monitor, which is 1680.

CommanderAlchemy commented 9 years ago

Same here, seems the game launches on monitor 0 even though another monitor is choosen as Primary. Trying to play with kwinrules breaks the ingame HUD.

Kirov123 commented 9 years ago

I have managed to make kwin rules make the game display properly, though I had to redo my rules after the recent patch. What would be best would be the ability to choose what monitor to use with a simple drop-down. Also, the recent patch appears to have removed the full-screen option from the "pick your resolution and window type menu."

CommanderAlchemy commented 9 years ago

@Kirov123 what KDE version do you have? I tried for me but it seems that it just ignores it if I dont runt the game in Window mode. Could you post your kwin rule? Edit nwm seems that i got it to work.

ogyct commented 9 years ago

Confirmed, ubuntu 14.04, 2 displays, gtx 660 card.

gdrewb-valve commented 9 years ago

Can you pick up the 7/20 update and see if it helps?

Also it will now support -sdl_displayindex # if you want to force Reborn to start on a non-primary monitor.

dubcanada commented 9 years ago

It works for me with the 7/20 update now.

Note: I did have to change my setting a custom resolution to using the current monitors resolution. Changing the resolution or setting a custom one caused it to return to the old monitor. But I can deal with that :)

Also glad that -sdl_displayindex works now.

malmrose commented 9 years ago

Working fine now.

diegogmx commented 9 years ago

works indeed

2015-07-21 0:09 GMT-03:00 dubcanada notifications@github.com:

It works for me with the 7/20 update now.

Note: I did have to change my setting a custom resolution to using the current monitors resolution. Changing the resolution or setting a custom one caused it to return to the old monitor. But I can deal with that :)

Also glad that -sdl_displayindex works now.

— Reply to this email directly or view it on GitHub https://github.com/ValveSoftware/Dota-2-Reborn/issues/13#issuecomment-123136999 .

gdrewb-valve commented 9 years ago

@dubcanada, I think the final piece of changing resolutions using the wrong monitor will get fixed in the next update.

YabosMcGee commented 9 years ago

I'm also experiencing this issue, even after the 7/20 update. Dota 2 Reborn is freshly installed as of today, 7/21. I have two 23" 1920x1080 monitors. The left one is set to primary, but Reborn launches on the right one (secondary).

If I change Reborn to go into windowed mode in the game settings I can drag the window over to the primary screen, change it back to fullscreen, and it will stay fullscreen on the primary monitor. However, after exiting and opening Reborn again, it will start up on the secondary monitor again.

Processor Information: Vendor: GenuineIntel CPU Family: 0x6 CPU Model: 0x3c CPU Stepping: 0x3 CPU Type: 0x0 Speed: 3600 Mhz 4 logical processors 4 physical processors HyperThreading: Unsupported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Unsupported SSE41: Supported SSE42: Supported

Network Information: Network Speed:

Operating System Version: "Fedora release 21 (Twenty One)" (64 bit) Kernel Name: Linux Kernel Version: 4.0.7-200.fc21.x86_64 X Server Vendor: Fedora Project X Server Release: 11603000 X Window Manager: GNOME Shell Steam Runtime Version: steam-runtime-release_2015-01-06

Video Card: Driver: Intel Open Source Technology Center Mesa DRI Intel(R) Haswell Desktop

Driver Version:  3.0 Mesa 10.5.1
OpenGL Version: 3.0
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 60 Hz
VendorID:  0x8086
DeviceID:  0x412
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.04" x 11.26"  (22.95" diag)
                                        50.9cm x 28.6cm  (58.3cm diag)
Primary VRAM Not Detected

Sound card: Audio device: Intel Haswell HDMI

Memory: RAM: 7781 Mb

Miscellaneous: UI Language: English LANG: en_US.UTF-8 Microphone: Not set Total Hard Disk Space Available: 425663 Mb Largest Free Hard Disk Block: 357430 Mb

gdrewb-valve commented 9 years ago

@YabosMcGee, if you put "-sdl_displayindex 1" in your launch options which monitor does Reborn launch on?

ogyct commented 9 years ago

Problem seems to be fixed on my machine

YabosMcGee commented 9 years ago

@gdrewb-valve Just tried using -sdl_displayindex 1, and it still launches on the secondary monitor.

gdrewb-valve commented 9 years ago

I'm not sure what would be causing that, we'll have to try and see if we can repro.

gdrewb-valve commented 9 years ago

@YabosMcGee, things work correctly for me. Does -sdl_displayindex 0 make any difference (it shouldn't)? I'm not sure why -sdl_displayindex 1 wouldn't change anything. Did you do anything unusual in your multimon setup? Your system sees them properly and identifies them correctly as primary and secondary?

YabosMcGee commented 9 years ago

@gdrewb-valve I just tried both -sdl_displayindex 0 and -sdl_displayindex 1 again, but it still launches on the secondary monitor. Fedora identifies left monitor as 1, and right monitor as 2. It also identifies monitor 1 as primary, and monitor 2 as secondary.

If I make monitor 2 the primary monitor, Reborn will launch on the left monitor (1 - secondary). Also, just some more information, both monitors are hooked up using DisplayPort, and each are connected to their own dedicated DP port using the same onboard GPU.

gdrewb-valve commented 9 years ago

To confirm, Reborn always launches on the secondary monitor instead of the primary? Switching which monitor is the primary does change which monitor Reborn starts on (if A is primary Reborn starts on B, but if B is primary reborn starts on A)?

wuschLOR commented 9 years ago

The default startup monitor seems to be the secondary monitor. Here's an example for KDE:

dotakde

If you want Dota to start on on your primary display (= display 0) you have to enter -sdl_displayindex 0 If you want Dota to start on on your secondary display (= display 1) you have to enter -sdl_displayindex 1

randi12

gdrewb-valve commented 9 years ago

Reborn starts on index 0, which is supposed to be the primary monitor, by default (if no -sdl_displayindex is given). SDL takes care of figuring out which monitor is primary so if your primary monitor is misidentified we can pass that on to the SDL team.

YabosMcGee commented 9 years ago

@gdrewb-valve That is, correct. Even if I switch around which monitor is primary, and which is secondary, Reborn always starts on the secondary monitor. Even when trying to force it using either -sdl_displayindex 0 -sdl_displayindex 1

CommanderAlchemy commented 9 years ago

@YabosMcGee

Maybe try with another wm? Maybe some gnomeshell feature or extension?

gdrewb-valve commented 9 years ago

@YabosMcGee, I'll pass this on to SDL that it looks like they aren't properly identifying which monitor is primary and which is secondary. Hopefully that is also related to why the display index doesn't work, but I don't know.

gdrewb-valve commented 9 years ago

SDL bug #3062.

Disk1of5 commented 9 years ago

update Correction -sdl_displayindex 1 does NOT work. it makes no difference


I am also having the same issue as as @wuschLOR but with Mint 17.2 Cinnamon, Primary monitor still is not being used as default but works when using -sdl_displayindex 1

gdrewb-valve commented 9 years ago

The 8/14 update has some SDL changes which may affect this. Can people try it out again?

SHOTbyGUN commented 9 years ago

Still starts always on my secondary monitor, tested with launch options: -sdl_displayindex 0 -sdl_displayindex 1 +sdl_displayindex 0 +sdl_displayindex 1

Distro: Linux Mint Debian Edition 2 Cinnamon 64bit

PRO TIP: I have to do this every time I connect to game server: http://i.imgur.com/SR7ft80.jpg this will prevent my mouse escaping from the game screen to the another monitor. (Do it when you are connected to the server eg. after you press the: "Enter to the game") Valve: maybe mouse grab by default in future ;) ? (Not in mainmenu, but in game mode please)

YabosMcGee commented 9 years ago

@gdrewb-valve Still launching on the secondary monitor with or without the sld_displayindex launch options put in. Also I double-checked the regular Dota client, and it still launches on the correct (primary) monitor like it always has.

I don't know if this is relevant, but I've noticed that two other games are similar to this situation. Kerbal Space Program in Steam launches on the correct (primary) monitor. While Hearthstone using Wine launches on the secondary monitor.

gdrewb-valve commented 9 years ago

Thanks for trying it, I've sent this feedback back to the SDL devs.

gdrewb-valve commented 9 years ago

Can you try once more after the 8/18 Reborn update?

Disk1of5 commented 9 years ago

Nope, still not working for me. still always defaults to the same monitor on the my right. even when launching with the sdl_displayindex

SHOTbyGUN commented 9 years ago

still not working for me, it always launches on my LEFT (Secondary monitor). on desktop coordinate 0,0 ... not on +1920,0 (Primary monitor) like it should...

YabosMcGee commented 9 years ago

It's still starting up on the secondary monitor for me, as well.

gdrewb-valve commented 9 years ago

Thanks. If any of you have dev environments and some time to play around can you compile https://hg.libsdl.org/SDL/file/tip/test/testdisplayinfo.c and run it with a recent SDL 2? Does it properly identify your monitors? This will help us isolate if this is still SDL misbehaving or not.

SHOTbyGUN commented 9 years ago

INFO: Using video target 'x11'. INFO: See 2 displays. INFO: 0: "BENQ G2320HDB 23"" (1920x1080, (1920, 0)), 15 modes. INFO: CURRENT: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=60 INFO: DESKTOP: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=60 INFO: MODE 0: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=60 INFO: MODE 1: fmt=SDL_PIXELFORMAT_RGB888 w=1680 h=1050 refresh=59 INFO: MODE 2: fmt=SDL_PIXELFORMAT_RGB888 w=1600 h=1200 refresh=60 INFO: MODE 3: fmt=SDL_PIXELFORMAT_RGB888 w=1440 h=900 refresh=59 INFO: MODE 4: fmt=SDL_PIXELFORMAT_RGB888 w=1280 h=1024 refresh=75 INFO: MODE 5: fmt=SDL_PIXELFORMAT_RGB888 w=1280 h=1024 refresh=60 INFO: MODE 6: fmt=SDL_PIXELFORMAT_RGB888 w=1280 h=960 refresh=60 INFO: MODE 7: fmt=SDL_PIXELFORMAT_RGB888 w=1280 h=720 refresh=60 INFO: MODE 8: fmt=SDL_PIXELFORMAT_RGB888 w=1024 h=768 refresh=75 INFO: MODE 9: fmt=SDL_PIXELFORMAT_RGB888 w=1024 h=768 refresh=60 INFO: MODE 10: fmt=SDL_PIXELFORMAT_RGB888 w=1024 h=576 refresh=60 INFO: MODE 11: fmt=SDL_PIXELFORMAT_RGB888 w=800 h=600 refresh=75 INFO: MODE 12: fmt=SDL_PIXELFORMAT_RGB888 w=800 h=600 refresh=60 INFO: MODE 13: fmt=SDL_PIXELFORMAT_RGB888 w=640 h=480 refresh=75 INFO: MODE 14: fmt=SDL_PIXELFORMAT_RGB888 w=640 h=480 refresh=59 INFO: INFO: 1: "VE247 24"" (1920x1080, (0, 0)), 29 modes. INFO: CURRENT: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=60 INFO: DESKTOP: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=60 INFO: MODE 0: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=60 INFO: MODE 1: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=59 INFO: MODE 2: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=50 INFO: MODE 3: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=30 INFO: MODE 4: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=29 INFO: MODE 5: fmt=SDL_PIXELFORMAT_RGB888 w=1920 h=1080 refresh=25 INFO: MODE 6: fmt=SDL_PIXELFORMAT_RGB888 w=1680 h=1050 refresh=59 INFO: MODE 7: fmt=SDL_PIXELFORMAT_RGB888 w=1600 h=1200 refresh=60 INFO: MODE 8: fmt=SDL_PIXELFORMAT_RGB888 w=1440 h=900 refresh=59 INFO: MODE 9: fmt=SDL_PIXELFORMAT_RGB888 w=1366 h=768 refresh=59 INFO: MODE 10: fmt=SDL_PIXELFORMAT_RGB888 w=1280 h=1024 refresh=75 INFO: MODE 11: fmt=SDL_PIXELFORMAT_RGB888 w=1280 h=1024 refresh=60 INFO: MODE 12: fmt=SDL_PIXELFORMAT_RGB888 w=1280 h=960 refresh=60 INFO: MODE 13: fmt=SDL_PIXELFORMAT_RGB888 w=1280 h=720 refresh=60 INFO: MODE 14: fmt=SDL_PIXELFORMAT_RGB888 w=1280 h=720 refresh=59 INFO: MODE 15: fmt=SDL_PIXELFORMAT_RGB888 w=1280 h=720 refresh=50 INFO: MODE 16: fmt=SDL_PIXELFORMAT_RGB888 w=1152 h=864 refresh=75 INFO: MODE 17: fmt=SDL_PIXELFORMAT_RGB888 w=1024 h=768 refresh=75 INFO: MODE 18: fmt=SDL_PIXELFORMAT_RGB888 w=1024 h=768 refresh=70 INFO: MODE 19: fmt=SDL_PIXELFORMAT_RGB888 w=1024 h=768 refresh=60 INFO: MODE 20: fmt=SDL_PIXELFORMAT_RGB888 w=800 h=600 refresh=75 INFO: MODE 21: fmt=SDL_PIXELFORMAT_RGB888 w=800 h=600 refresh=72 INFO: MODE 22: fmt=SDL_PIXELFORMAT_RGB888 w=800 h=600 refresh=60 INFO: MODE 23: fmt=SDL_PIXELFORMAT_RGB888 w=800 h=600 refresh=56 INFO: MODE 24: fmt=SDL_PIXELFORMAT_RGB888 w=720 h=576 refresh=50 INFO: MODE 25: fmt=SDL_PIXELFORMAT_RGB888 w=720 h=480 refresh=59 INFO: MODE 26: fmt=SDL_PIXELFORMAT_RGB888 w=640 h=480 refresh=75 INFO: MODE 27: fmt=SDL_PIXELFORMAT_RGB888 w=640 h=480 refresh=72 INFO: MODE 28: fmt=SDL_PIXELFORMAT_RGB888 w=640 h=480 refresh=59

Instructions to do what @gdrewb-valve said:

sudo apt-get install libsdl2-dev
wget https://hg.libsdl.org/SDL/raw-file/9f0a0c7de41a/test/testdisplayinfo.c
gcc testdisplayinfo.c `pkg-config --cflags --libs sdl2`
./a.out

source of information: http://askubuntu.com/questions/626280/fatal-error-sdl-sdl-h-no-such-file-or-directory

And yes, it properly detects monitor: 0 benq at desktop coordinates (1920, 0)

gdrewb-valve commented 9 years ago

@SHOTbyGUN, I take it the output is correct then? 0 should be your primary and that looks like it's the one at 1920,0 as you expect.

SHOTbyGUN commented 9 years ago

Yes, my main monitor is right one .. eg. desktop coordinate (1920, 0) left monitor where the game always starts is at (0,0) desktop coordinate

gdrewb-valve commented 9 years ago

OK, so the problem is not in monitor identification and location, that at least rules that out. If you use a plain non-fullscreen window that's smaller than your monitors, say 1280x720, does -sdl_displayindex 0 put the window on the right screen? Does -sdl_displayindex 1 have any effect in that case?

SHOTbyGUN commented 9 years ago

Wow this is very funny!

-novid -sdl_displayindex 0 = as startup parameters

use default monitor resolution = Secondary Screen use desktop friendly fullscreen = Secondary Screen (even in low resolution 1280x720) windowed = Primary Screen .. it will even change display when you set it windowed in options! It will always start in correct monitor when in windowed mode, but never on any fullscreen mode.

Additional note: when windowed mode client starts, it will be centered to the screen. (just if you were thinking about coordinates)

SHOTbyGUN commented 9 years ago

@gdrewb-valve additional note: it will always start on PRIMARY MONITOR even when there are no launch parameters set. (windowed)

gdrewb-valve commented 9 years ago

I think that narrows it down to it going fullscreen incorrectly. If you start windowed and switch to fullscreen in the video settings does it stay on the same monitor? I think you're saying it does since you mention the reverse happens, that switching to windowed mode puts it on the right monitor.

Zero is the default so -sdl_displayindex 0 is the same as no -sdl_displayindex.

SHOTbyGUN commented 9 years ago
  1. Borderless window 1920x1080 does not work at all... the game dissappears! (but is visible in taskbar) eg. right click close works.
  2. Borderless window 1600x900 works as in primary window (does not change window when set)
  3. Windowed mode always respects every launch option and starts on sdl_displayindex pointed monitor.
  4. Desktop friendly fullscreen will always jump into secondary monitor.
  5. Switching from Borderless window 1600x900 into windowed mode will not change monitor to primary.
  6. Switching from fullscreen into borderless 1600x900 will change monitor to primary.
  7. But switching between windowed and borderless 1600x900 will maintain the current display
gdrewb-valve commented 9 years ago

That's good info, thanks. I'll take this up with the SDL devs and get back to you in a day or two.

Have you tried a different WM? I'm curious if Cinnamon plays a part in this.

SHOTbyGUN commented 9 years ago

95% it will behave same way in LMDE2 Cinnamon... but with MATE seesion instead! but little differences. it is getting late so I am lazy to write, so I made a video of the issue instead!

https://www.youtube.com/watch?v=QFlIVmYGxrA

Inconsistent and super weird! Stupid question: does it matter if I choose resolution vs display mode first ? In code I mean...

Best would be set default display to dota 2 video options / configs if there are multiple displays present... for example if you take laptop to a party and there is a big ass video cannon on white screen =)

gdrewb-valve commented 9 years ago

It doesn't matter to the mode change if you set resolution or mode first, nothing is applied until you hit the Apply button.

Just to confirm, in the video the right-hand screen is primary and you were not using sdl_displayindex? It's very strange that going from fullscreen -> windowed actually puts the window on a different screen, we'll investigate.

SHOTbyGUN commented 9 years ago

Yeah, I use right one as my primary, where the taskbar is located. iirc I had none of launch parameters enabled by the time I made the video.

Distro: Linux Mint Debian Edition 2 Cinnamon 64bit, with MATE desktop environment installed Both desktop environments use Mutter Window Manager https://en.wikipedia.org/wiki/Mutter_(software)

Steam system info: https://gist.github.com/SHOTbyGUN/2f32b92298b6ffcbbdfe Xorg.conf file: https://gist.github.com/SHOTbyGUN/9f7557b4d97744c881b6 uname -a: Linux shot5mint 4.0-9.dmz.1-liquorix-amd64 #1 ZEN SMP PREEMPT Debian 4.0-18 (2015-07-22) x86_64 GNU/Linux