Jump to content

Issue w/ -popupwindow and focus (keyboard/joystisk)


Recommended Posts

Hi everyone

After being hit several times by the 32bit wall I decide to jump to Linux and unleash the power of the 64bit:cool:

For start here's my specs :

OS : FedoraXfce 21

CPU : Intel Core(Gen1) i7 860 @ 2.8Ghz OC @ 3.5Ghz

GPU : Gygabyte AMD R9 290x with the proprietary driver 14.12

KSP 1.0.2 64bit

The things is I play on 3 monitors (1920x1080) in portrait mode for a total resolution of 3500x1920, bezels include. I struggle a little to make it work at this resolution on the desktop but it does (editing the position of each screen in "xorg.conf" is the trick).

Now come KSP, I patch him, install the additional fonts and run it with the script below. All of this is coming from The Linux Thread and The Other Linux Thread.



export LC_ALL=C
export LD_PRELOAD="libpthread.so.0 libGL.so.1"
export __GL_THREADED_OPTIMIZATIONS=1
exec taskset -c 2-3 ./KSP.x86_64
#!/bin/sh

On first launch it runs on windowed mode and I can't find my desktop resolution in the settings (2560x1800 is the higher I can select). For whatever resolution if I enable full screen KSP goes full screen but only on one monitor.

So I change the resolution in .../Kerbal Space Progam/settings.cfg and in ~/.config/unity3d/Squad/Kerbal Space Program/prefs to 3500x1920.

KSP loads a window but only on one screen but if I move this window by dragging the menu bar it become a 3500x1920's window.

:P Almost there the only things left is get rid of this menu bar

I change the script show above by adding " -popupwindow" at the last line and : it works ! ! !

Well actually not, the window is drawing on all three monitors but stays in the "back plan", the Xfce task bar stays on top of it and if I Alt+F11 to switch full screen it is the previous used window (usually the file manager) who goes full screen (on one monitor).

Second things I can't use my keyboard, when I type somethings a little window appears (probably from the file manager, Thunar) with a text-field and the character I just type in it but KSP don't acknowledge it. The joystick is broken too, I can't assign any axes except the throttle.

So it seems to have an issue with the window focus and the " -popupwindow" option.

This may be related to the way I execute the launch script, at first when I double-click on it, it start in a text-editor so I change the "open with" option to open with /usr/bin/bash and /usr/bin/sh but no luck there. I also try to execute the script with the terminal but it's the same....

I am now clueless and need the wisdom of the KSP/Linux expert. I'm pretty sure it's a simple things to add in the script to force the focus but what ? ....

If you have any idea or need more information please post :wink:

I'm a noob concerning Linux so please be patient...

Link to comment
Share on other sites

-popupwindow only works on windows (and very old versions only I think). I soooo wish it did on linux too, or used XRandR properly, I have a script to reset the config to windowed, and then I have to move the window to the correct screen and then set it to fullscreen on every start:

sed -i 's/^FULLSCREEN[ ]=[ ]True/FULLSCREEN = False/' settings.cfg

KSP doesn't support multi-displays. The best you'll get is resizing a window across your screens as you've already done. Unfortunately unity/mono/windows crap doesn't do standard X11 -geometry 120000x6000000+0+40000 arguments either - they've never had a standard way to define window size and position.

I've not used Xfce since it was called fvwm (several decades ago), but if you don't click on the window for the screen it started from, you're likely to focus something else like the taskbar or background.

Incidentally, has anyone uncovered all the cmdline arguments that work?

Edited by surge
"and position"
Link to comment
Share on other sites

Hey surge, thanks for the reply. As I say I'm a beginner in the Linux world, they are a few things in your post I don't understand.

-popupwindow only works on windows (and very old versions only I think)

When you say "old version" you mean Windows version or KSP version ? I have KSP 1.0.2 running fine (except from the memory leaks) on Windows 7 with " -popupwindow". In Unity documentation they don't say anything about a no-compatibility with Linux (see here, in the "Unity Standalone Player command line arguments" section).

I soooo wish it did on linux too, or used XRandR properly

What is XRandR ?

I have a script to reset the config to windowed, and then I have to move the window to the correct screen and then set it to fullscreen on every start:

I assume you have a multi-monitors setup but you play on one monitor ? As I say if I toggle fullscreen (via settings.cfg or ALT+F11) the game goes fullscreen but on only one monitor.

KSP doesn't support multi-displays. The best you'll get is resizing a window across your screens as you've already done. Unfortunately unity/mono/windows crap doesn't do standard X11 -geometry 120000x6000000+0+40000 arguments either - they've never had a standard way to define window size and position.

I don't understand everything you wrote but what I ""think"" is that the problem is more from the way Linux deals with triple screen.

On Windows, once the Eyefinity is setup, there is only one big screen and no way (as far as I know) for a program to "know" if and where they are other monitors.

On Linux on the other hand, programs seems to be aware of the multi monitor setup (for example each monitor show a different screen-saver) so it mess with the fullscreen.

Is there a way of creating a virtual monitor of 3500x1920 containing the 3 physical one ?

I've not used Xfce since it was called fvwm (several decades ago), but if you don't click on the window for the screen it started from, you're likely to focus something else like the taskbar or background.

The things is I can actually click anywhere I want, it works, it's only for the keyboard (and the joystick) that's there an issue.

I was even able to launch something by activating the engine with the right-click menu:P

Link to comment
Share on other sites

Hey surge, thanks for the reply. As I say I'm a beginner in the Linux world, they are a few things in your post I don't understand.

When you say "old version" you mean Windows version or KSP version ? I have KSP 1.0.2 running fine (except from the memory leaks) on Windows 7 with " -popupwindow". In Unity documentation they don't say anything about a no-compatibility with Linux (see here, in the "Unity Standalone Player command line arguments" section).

What is XRandR ?

I assume you have a multi-monitors setup but you play on one monitor ? As I say if I toggle fullscreen (via settings.cfg or ALT+F11) the game goes fullscreen but on only one monitor.

I don't understand everything you wrote but what I ""think"" is that the problem is more from the way Linux deals with triple screen.

On Windows, once the Eyefinity is setup, there is only one big screen and no way (as far as I know) for a program to "know" if and where they are other monitors.

On Linux on the other hand, programs seems to be aware of the multi monitor setup (for example each monitor show a different screen-saver) so it mess with the fullscreen.

Is there a way of creating a virtual monitor of 3500x1920 containing the 3 physical one ?

The things is I can actually click anywhere I want, it works, it's only for the keyboard (and the joystick) that's there an issue.

I was even able to launch something by activating the engine with the right-click menu:P

Windows KSP -popupwindow is dubious... there is a quite recent thread here about it. It has never worked in linux AFAIK.

You have to remember that unity is primarily a windows platform. We were lucky to get KSP on linux at all.

See `man xrandr`.

And you are correct about the multi setup... you can create any desktop size you want using eyefinity/twinview or any proprietry garbage, but they all just present a standard X11 desktop called Xinerama/XRandR to programs.

It won't help you start KSP at that size (-geometry ....) because being essentially a windows program, it has never heard of that commandline argument, even though it's standard on unix/X11.

That is why I just give up and use my little script so I can move the window to the biggest screen I have and then manually fullscreen it.

Edited by surge
Link to comment
Share on other sites

-popupwindow is only supposed to work on Windows, though it can work on Linux your results may vary.

Custom resolutions can be set in the settings.cfg directly, doesn't matter if the engine failed to detect them as usable.

You can find all the command line args here, [Link]

Link to comment
Share on other sites

Hey sal_vager.

After further testing I find that even if I can play in windowed mode (without "-popupwindow") at the moment I move the window the game slow down a lot. Not fps/graphics, even the load screen is a lot slower.

Is there a way to fix it ? It's like the cpu assign less power to ksp but in the taskmanager there isn't a difference.

I try to change the affinity to maximum but no effect.

When I hit F11 (goto fullscreen on one monitor) ksp regain its speed.

Second hope : play with -popupwindow and only the mouse. It's maybe possible, thanks to the mod RKE On-screen joystick and some others like tweakableEverythings and Action Group Extended.

But probably a lot of other issue, naming ships or doing EVA for example....

I continue to looking into it and welcome any idea but...

How hard can setting up a triple-monitor to play KSP on Linux can be anyway ?

:huh:

Link to comment
Share on other sites

I don't know how to set up triple monitors sorry, but your window dragging issue sounds like it's the compositor, have you tried disabling it?

I suggest you post your logs somewhere and link them here for us, see the support stickies for details.

Link to comment
Share on other sites

Here comes the logs :

KSP with " -popupwindow"

KSP.log : http://pastebin.com/RjK4M7vC

Player.log : http://pastebin.com/fwzGeE5y

KSP windowed, I don't touch the window

KSP.log : http://pastebin.com/HE2mwaNb

Player.log : http://pastebin.com/uwwNzLLe

KSP windowed, I move the window (auto-rescale to fit all the screens)

KSP.log : http://pastebin.com/dfqSz63G

Player.log : http://pastebin.com/EtnwkXbZ

I just start the game and quit it. The two first works fine (except the keyboard for the first) but the third is very slow, takes 2min to load versus 30sec for the others.

I don't try disabling the compositor, as I say my experience with Linux is pretty low (I didn't know 2 minute ago what a compositor is). But I look into that direction, tomorrow.

Good (insert the current moment of the day here) all and thx for the helps

Link to comment
Share on other sites

  • 2 weeks later...

That's just the recent clogging up your graphics board rendering the desktop in pointless 3d, when it should be rendering your desktop in 2d and the game/program you're currently using in 3d. Gnome now calls it oh... unity. How odd.

I've just switched to Xfce recently in absolute discust of this idiocy. I said before I hadn't used it for decades... I like how it isn't so complicated to configure now.

Edited by Claw
Link to comment
Share on other sites

+1 on the idiocy, I have no problem at all with optional desktop compositing, but unity won't even load a desktop without GL these days. Snookers all the decent remote desktop solutions too.

No, 'fallback mode' isn't an acceptable solution. Not if it cripples the DE. Hence goodbye GNOME/Unity/Buntard.

Thankfully KDE still has special application settings -> block compositing. But not for much longer... RatPoison here I come.

Back on topic: How are you doing multi display? AMD proprietary whatsit or static xinerama setup?

It's been a while since I did this, and I don't actually have more than one monitor now... but I may be able to remember some xorg.conf foo. Maybe.

Are there any tricks you can play with your window manager? Again, KWin has options to force size / fullscreen / stay on top etc. for specific applications... Dunno what XFWM can do though.

Edited by steve_v
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...