+3
Completed

Linux Game launches on secondary display

Marten B 3 years ago • updated by Cian Noonan (QA Wizard) 2 years ago 27

My setup on Ubuntu, my displays are primary 1920 x 1080 and Secondary 1200 x 1920 (portrait mode). The game no matter what I do launches on the secondary display in 1920 x 1080 and being as it is a portrait display I can only see a slither of the game screen. I cant even read the setting menu because it off the side of the 1200 wide portrait screen.


I now have close to a dozen linux steam games and this is the only one that insists on launching on a secondary monitor.


I've reinstalled the game. Reinstalled Ubuntu 14.04 / 15.04 and are now on 15.10. Same problem everytime.


This has been the case for me since beta. I just gave up on the game and check sometimes when I feel like playing and its still broken.


Game Version:
Steam Public
Platform:
Linux

Answer

Answer
Accepted

Hey Marten,


I have made a special build of the game for you that hopefully fixes part or all of your issue. You can access this build by opting into our beta branch as instructed below.


Right click the game in Steam and go to Properties. In the Betas tab, type in the password 'publicpassword' and hit Check Code. Select the 'publictestbranch' in the dropdown box above and then close the window. Steam should perform an update.



GOOD, I'M SATISFIED

Thank you for your help :)

Satisfaction mark by Marten B 3 years ago

I am sorry for answering late, but we have no Linux experts in the core team and we struggle right now to get in contact to experienced Linux users in our volunteer QA Team.
However maybe things which can be done on Windows translate to Linux, I just hope.
1) In Windows you can drag a pragram in windowed mode to any screen and then you can toggle it to fullscreen.
The OS remembers the screen the program was last running on and will always automatically start it on this one.
2) A second solution is to create a shortcut for the game (with steam) and drag it on the screen the program should open.
If the shortcut is opened from the wanted screen, this same screen is used to run the game by default.
3) At least in Windows its possible to hold down the right SHIFT key while clicking on "Play" in Steam. Just hold it down until a little configuration window opens which allows to select screen, set resolution and indowed/fullscreen mode before the game starts it self.

In Windows once you switched the screen successfully once, the program will always open on the same screen until the screen is manually switched again.

I hope any of this helps for now.
We still try to get hold on a Linux expert who should be able to help better.

Cheers






With dancing around I can get it full screen but everytime I start the game I have to mess with it to get it going. Watch this


Can you try the following link:
https://steamcommunity.com/app/230190/discussions/0/611702631223571102/#c611702631223780555

?
Just start the game with this parameter and then select your first screen.

I just would like to know if it helped to solve the problem?

I tried the launch options.

-adapter N Does nothing it launchs on the secondary display reguardless. I tried N=0,1,2

-show-screen-selector I have a DVI0 and DVI1 to choose from which works but the resolution is still messed up even when I select 1920x1080. The windowed check box did not work. It was always full-screen mode. I tried lower and higher resolutions to test, all have the same messed up partial screen viewable only.


It should at least work if in-game settings and what is set in the config window does match.
Did it match and it still didn't work?
If so, this is very strange, could you then upload your Player and Launcher logs as described here:
https://forum.subterraneangames.com/threads/please-read-how-to-report-a-bug.4689/
?

Cheers

after seeing the prefs file I manually editied Width and Height to 1080,1920. It did no work and was reset to 1920,3120 after I launched the game.

<<pref name="Screenmanager Resolution Height" type="int">1920</pref>

<pref name="Screenmanager Resolution Width" type="int">3120</pref>


Note that the 2 displays are 1920x1080 and 1200x1920(portrait). The game is somehow trying to flip the resolution added the total width of screens 1920+1200 as the height and vertical 1920 (from second display) as the width.

Hello again Marten B,
just for future bug reports:
There is an "Insert File" button (paperclip symbol) above the text area for your post, which allows to attach a file without bloating the bug report with a plain text copy. This was also mentioned in the link "How to report a bug" a posted above.

OK this issue is odd indeed.
I am still no Linux expert but let me elaborate.

So you say you have two displays:
1) Primary 1920 x 1080
2) Secondary 1200 x 1920

Now the question is:
Why does the operating system report to Unity3d that you have a display of size 3120 x 1920?


It looks like Unity3d is seeing your both monitors as only one single screen.
Did you setup your system to run dual screen mode?
So that you only have one desktop which does stretch over both displays or do you have separate desktops for both or a desktop only on the first of both screens?
If the former then Unity3d just sees one display which consists of both screens, but seems not able to handle this case correctly.

What happens in log:

"requesting resize 1920 x 1080

requesting fullscreen 1920 x 1080 at 0 Hz
Desktop is 3120 x 1920 @ 60 Hz"

So there is the second issue: Why does Unity3d request "fullscreen 1920 x 1080 at 0 Hz"?
I am unsure why this does happen, while it should request "1920 x 1080 at 60 Hz" and not "at 0 HZ".
But I guess the engine is just confused with this artificial "3120 x 1920 @ 60 Hz" dual display screen and fails to recognize it properly.

Since the requested resolution can not be provided by the OS multiple other things fail in result:
"Changing real window size to 1920 x 1022
Ignoring window size change to 1920x1022 : waiting for fullscreen at 1920x1080"
Which will never respond.

So long story short...
Somehow the OS reports one big screen consisting of both monitors to Unity3d engine.
It looks loke you did setup your displays in dual mode?
Can you check this and if, can you try to set them up as separate desktops, so both monitors are recognized as individual screens?
Can you check if you have setup anything else which would merge both monitors into one screen for the game.

I hope we can find the root cause of the problem.
Cheers

Hi Marten,


Just today I managed to find and resolve a couple of bugs relating to setting the correct monitor and resolution. We had not intended to push a patch until v1.4 in a months' time, but I'll see about pushing out a hotfix for you tomorrow. No body likes a buggy game! ;)

Lets see :).. I wil give it a day or so and tap in again.

Answer
Accepted

Hey Marten,


I have made a special build of the game for you that hopefully fixes part or all of your issue. You can access this build by opting into our beta branch as instructed below.


Right click the game in Steam and go to Properties. In the Betas tab, type in the password 'publicpassword' and hit Check Code. Select the 'publictestbranch' in the dropdown box above and then close the window. Steam should perform an update.



Hi Scott

The beta hangs on launch for me.

Player(2).log

EDITED

Hello Marten,
I edited your posts because they did include logs as plain text.
As said before please attach them as file to not bloat the written text of user information.
Here is what I did:


Cheers

That is odd. It is launching on our test Linux machines. Could you please try the following:

1. Perform a game data scan to ensure you've got all the update files. In Steam for the game, go to its Properties -> Local Files and then click on Verify Integrity of Game Cache.

2. In the game directory browse to the WFTOGame_Data directory and open the Settings.ini file for editing. Find and change the following properties like so:

Width=1920
Height=1080
Fullscreen=False


Try launching the game. If it succeeds, proceed to change the settings as you wish in the game settings menu.


If this fails, perform step 2 again. But unplug one of your monitors and tell us what happens.


Thanks for your patience so far Marten.

Hi Scott

I could not get the beta version to launch it hangs with the loading progress bar close to half way complete even if I disable my second display.


Editing the setting file did not make a difference. My edits remained saved but the game still launched full screen.


After switching back to the current live version of the game it runs again but still in an incorrect resolution.


This hotfix version does work for me in my Ubuntu virtual machine.
We thought it hangs for you only because of the weird 3K screen size setup
and thought by editing the settings it will work for you as well.

Hey Marten,


Would you mind uploading the log after trying to launch the beta game again? Seems the one above is cut off and doesn't have the entire log text in it.

Well I switched back to the beta and it now works. Game launchs on the correct display and resolution.

Player.log


prefs


Settings.ini

Completed

That's great news! Steam must not have properly downloaded the hotfix the first time. Hopefully this experience wasn't too painful for you, and thanks for helping us resolve it.


As an FYI - When v1.4 comes out, you will automatically be pushed off of the beta channel and into the default channel where Steam will automatically download and update your game. So no further action is required by you.

Hi,


Sorry to necro the old thread but the issue is back.

I have a 2-monitor setup with both being at 1080p resolution. Game always starts on the secondary monitor.

In-game settings do not matter, they don't change anything.


The only workaround I have found so far is that when I use the launch option: -show-screen-selector

Then when I select Windowed mode, it actually starts on the correct output and goes to full-screen automatically. Though, I would need to do this every time.


Please let me know what kind of logs are needed.

Current setup is:

Kernel: 4.10.1-1-ARCH x86_64 (64 bit) Desktop: Xfce 4.12.3 Distro: Arch Linux

Mobo: MSI model: Z97 GAMING 3 (MS-7918)

Display Server: X.Org 1.19.2 driver: nvidia Resolution: 1920x1080@60.00hz, 1920x1080@60.00hz


Thank you!

For me it was fixed in a patch months ago. Now in the display settings there is a select monitor option with 0,1,2 as settings. Try each one and you should find the correct number for your display.

Hi Marten,


Thanks, but as I said, in-game options have no effect.

Sorry to hear that Rivia. All I can suggest is open a new bug. The instruction for the logs where on this post

https://forum.brightrockgames.com/threads/please-read-how-to-report-a-bug.4689/#post-51529




Thank you Marten.

Did just that. Sorry to bump an old topic here. :)

Bumping tickets is fine it allows us to see whats been tried before ;)