Page 1 of 1

Dual monitors / fullscreen mode

Posted: Wed Apr 14, 2021 11:39 pm
by andrax_iON
Hi all

Just a quick Q - I've no issue with Oolite functionality under current setup, but running fullscreen at 1920x1080 on primary monitor causes my 2nd screen to 'blank' (sleep mode?). On first setup, Oolite ran at something around 35xx by [can't remember] split across both screens (not a preferred option), but I like to run various apps. while flying (Teamspeak, IRC (have developed an unhealthy fascination for the eerie silence on #oolite 8~/ )) an' this just ain't working.

Grateful for any advice.. 8~)

cheers!

*Mint 20.1, Oolite v1.90; GeForce GTX 960 (2 x DVI), nVidia driver v. 460.39
Benq M2700HD 27" @ 1920x1080 + Acer V203H 20" @ 1600x900

Re: Dual monitors / fullscreen mode

Posted: Thu Apr 15, 2021 6:03 am
by another_commander
Unfortunately there is nothing that can be done about this, unless someone implements windowed fullscreen on Linux. Unlike the Windows and Mac ports, Linux currently utilizes the fullscreen facilities of SDL and that takes it straight into exclusive fullscreen.

Maybe as a workaround you can try multiple desktops? Oolite on one and other apps on the other? No idea how this would behave with fullscreen though.

Re: Dual monitors / fullscreen mode

Posted: Thu Apr 15, 2021 7:15 am
by andrax_iON
another_commander wrote: Thu Apr 15, 2021 6:03 am
Unfortunately there is nothing that can be done about this <snip>
Okies - ta for the info. Pure convenience/indulgence on my part, I like to see the name if Teamsqueak squeaks about a user join.

cheers

Re: Dual monitors / fullscreen mode

Posted: Fri Apr 16, 2021 1:13 am
by Commander_X
Whew, the fullscreeners hit under the belt again :D

Ok, one option that might help with this (found the refrence here for the interested), is to use SDL_VIDEO_FULLSCREEN_DISPLAY=<number> (seems that SDL_VIDEO_FULLSCREEN_HEAD would do too). E.g. if your monitor of choice is 1, then you should launch Oolite with:

Code: Select all

SDL_VIDEO_FULLSCREEN_DISPLAY=1 ./oolite-wrapper
The <number> part to pass to the variable assignment can be found running

Code: Select all

xrandr --listmonitors
in a terminal. Note that the numbers shown might not match your expectation (hint: pay attention to the "+X+Y" ending values in the line corresponding to each of them, before the type of connector). That is, from my list here

Code: Select all

$ xrandr --listmonitors
Monitors: 3
 0: +*HDMI-0 1920/480x1080/270+1920+0  HDMI-0
 1: +DP-1 1920/521x1080/293+3840+0  DP-1
 2: +DP-4 1920/597x1080/336+0+0  DP-4
if I wanted to fullscreen on my right most monitor, it should be 1 (due to its location of my X display at +3840+0)

There will be trouble! Things I noticed with this setup:
- (the big/bad one) no Alt-Tab or other type of switching (you're out of the window manager's jurisdiction); so it's sort of single tasking. I'd guess you'd need to implement some type of switching at the X level (not sure if it's possible without some programming)
- you want to make sure you position the initial window on that monitor before doing full screen, otherwise a black window will remain on the monitor where the fullscreen was initially activated from
- (no trouble) the other monitors still show the applications working nicely; I launched a movie to play on another monitor, and it went quite smoothly

Having this fixed decently seems also to be possible. I found this stackoverflow Q&A, and doing a quick (well, not that quick, SDL1.x build under more current Linuxes has ups and downs)

Code: Select all

./testvidinfo
as recommended

Code: Select all

$ ./testvidinfo 
X11 detected Xinerama:
xinerama 0: 1920x1080+1920+0
xinerama 1: 1920x1080+3840+0
xinerama 2: 1920x1080+0+0
it returned similar information like xrandr above.

Re: Dual monitors / fullscreen mode

Posted: Fri Apr 16, 2021 2:35 am
by andrax_iON
Sweet - thanks for the leads, have some reading to do. xrandr shows no surprises, lspci too; what's got me curious is that I've lost the gpu slot in the folding@home client, so something's amiss (since Mint updated the nvidia driver, methinks; now 460.56).

Re: Dual monitors / fullscreen mode

Posted: Sun May 16, 2021 9:56 am
by andrax_iON
Commander_X wrote: Fri Apr 16, 2021 1:13 am
Whew, the fullscreeners hit under the belt again :D
Aww, shucks; an' I thought I'd lost my touch.. 8~)
Ok, one option that might help with this ..
.. turned out to be a perfect solution, for me; leaves display1 populated & visible, while also eliminating the chronic tearing I'd been getting previously in fullscreen.

Thanks!!

Re: Dual monitors / fullscreen mode

Posted: Fri Jun 25, 2021 3:55 am
by hiran
Commander_X wrote: Fri Apr 16, 2021 1:13 am

Code: Select all

./testvidinfo
as recommended

Code: Select all

$ ./testvidinfo 
X11 detected Xinerama:
xinerama 0: 1920x1080+1920+0
xinerama 1: 1920x1080+3840+0
xinerama 2: 1920x1080+0+0
That makes me think...

I have two screens connected. Running Oolite in fullscreen is annoying because maneuvering or pointing your laser to something requires focusing on the middle of the screen which would always end up BETWEEN the monitors.
Having an uneven number of screens - as you do - would fix the problem, and the amount of monitors actually would allow to increase the angle of the display in Oolite. Just imagine you had five monitors arranged in a semi-circle and configured Oolite to provide a 180° view. Plenty of space for HUD display to the sides while most of the story still happens on the center screen.

That's how James T. Kirk must have felt...

Re: Dual monitors / fullscreen mode

Posted: Fri Jun 25, 2021 4:20 am
by Commander_X
hiran wrote: Fri Jun 25, 2021 3:55 am
[...] Just imagine [...]
You have no idea :-D

Re: Dual monitors / fullscreen mode

Posted: Fri Jun 25, 2021 4:28 am
by hiran
Commander_X wrote: Fri Jun 25, 2021 4:20 am
hiran wrote: Fri Jun 25, 2021 3:55 am
[...] Just imagine [...]
You have no idea :-D
Well, YOU then try to imagine 11 screens and 360 degrees... :P

Oh, hm. Using the backward laser will become a challenge again...

Re: Dual monitors / fullscreen mode

Posted: Fri Jun 25, 2021 5:19 am
by another_commander
hiran wrote: Fri Jun 25, 2021 3:55 am
Just imagine you had five monitors arranged in a semi-circle and configured Oolite to provide a 180° view.
You will have to recompile the game with a max FOV of 180 degrees for that. The standard game provides up to 80 degrees because anything more starts messing with the camera view positions of some ships, which at high FOVs ends up showing you parts of your ship rendered from the inside, which were not meant to be rendered in the first place. So, since you need to recompile for that, might as well tweak the code to stop the player ship from rendering altogether at FOVs higher than, say 90 degrees. But with the standard binaries you cannot currently fulfill your dream.

Re: Dual monitors / fullscreen mode

Posted: Fri Jun 25, 2021 9:11 am
by Cholmondely
hiran wrote: Fri Jun 25, 2021 4:28 am
Commander_X wrote: Fri Jun 25, 2021 4:20 am
hiran wrote: Fri Jun 25, 2021 3:55 am
[...] Just imagine [...]
You have no idea :-D
Well, YOU then try to imagine 11 screens and 360 degrees... :P

Oh, hm. Using the backward laser will become a challenge again...
Can't you just turn your joystick upside down as people used to do in the classic elite days?

... and with 360 degrees you can go back to an even number of screens, surely...

Re: Dual monitors / fullscreen mode

Posted: Fri Jun 25, 2021 11:52 am
by hiran
another_commander wrote: Fri Jun 25, 2021 5:19 am
hiran wrote: Fri Jun 25, 2021 3:55 am
Just imagine you had five monitors arranged in a semi-circle and configured Oolite to provide a 180° view.
You will have to recompile the game with a max FOV of 180 degrees for that. The standard game provides up to 80 degrees because anything more starts messing with the camera view positions of some ships, which at high FOVs ends up showing you parts of your ship rendered from the inside, which were not meant to be rendered in the first place. So, since you need to recompile for that, might as well tweak the code to stop the player ship from rendering altogether at FOVs higher than, say 90 degrees. But with the standard binaries you cannot currently fulfill your dream.
Don't worry - I am used to not fulfilling my dreams.
My wallet is also a limiting factor in many cases...

Re: Dual monitors / fullscreen mode

Posted: Fri Jun 25, 2021 11:53 am
by hiran
Cholmondely wrote: Fri Jun 25, 2021 9:11 am
hiran wrote: Fri Jun 25, 2021 4:28 am
Well, YOU then try to imagine 11 screens and 360 degrees... :P

Oh, hm. Using the backward laser will become a challenge again...
Can't you just turn your joystick upside down as people used to do in the classic elite days?

... and with 360 degrees you can go back to an even number of screens, surely...
An even number of screens would work if Oolite's full-screen window then has a suitable offset. Otherwise we are back to front and rear lasers pointing between the screens...