Trine 2 + Gnome Shell = Top bar always visible?

For discussion about Trine 2, released in December 2011 on Windows, Mac, Xbox, PlayStation Network and later on Linux and Wii U.
Leander
Posts: 2
Joined: Mon Apr 02, 2012 10:44 pm

Trine 2 + Gnome Shell = Top bar always visible?

Postby Leander » Mon Apr 02, 2012 11:12 pm

Hello,

I'm having a bit of trouble getting Trine 2 to work full screen on Ubuntu 11.10 + Gnome Shell. No matter what I try the top bar will always remain visible.

Image

I don't know if this is specific of my setup, or if this always happens when using Gnome Shell. Either way, it's annoying, especially when it's a game as beautiful as Trine 2.

hero1900
Posts: 17
Joined: Tue Apr 26, 2011 1:06 am

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby hero1900 » Tue Apr 03, 2012 6:59 am

not only with gnome shell i also have it on my ubuntu 11.10 unity, same issue and its annoying

User avatar
FB_JussiE
Posts: 267
Joined: Wed Nov 23, 2011 4:09 pm
Location: Finland
Contact:

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby FB_JussiE » Tue Apr 03, 2012 7:45 am

Hello hero1900 and Leander

This is commonly issue with compiz/3d effects on the desktop.
On GNOME3 I was able to hide the bar by playing the game with same resolution as the desktop, but some-times it required alt-tabbing out-and-in to hide the bar.

If this doesen't help disabling some 3D effects usually help and in Unity's case it was the only reliable way I was able to find.

Disabling Compiz all together will also fix the problem, but a more user friendly way is to disable the desktop effects (note: in Unity's case this can lead tho the whole dekstop/bars screwing up, so aprroach with caution).

damarrin
Posts: 5
Joined: Tue Apr 03, 2012 11:06 am

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby damarrin » Tue Apr 03, 2012 11:09 am

Thanks for the answer FB.

Do you think this will be fixed? Disabling desktop effects in Unity is not really an option, seeing as one has to install Unity 2D and log out/in.

User avatar
FB_JussiE
Posts: 267
Joined: Wed Nov 23, 2011 4:09 pm
Location: Finland
Contact:

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby FB_JussiE » Tue Apr 03, 2012 11:33 am

I'm not sure if there's anything that we can do in our end I'm afraid, but there's atleast one other workaround:

Change the line

Code: Select all

setOption(renderingModule, "MaximizeWindow", false)"


To

Code: Select all

setOption(renderingModule, "MaximizeWindow", true)"


from the options file which you can find from ~/.frozenbyte/Trine2/options.txt

This has helped in some cases under Unity

damarrin
Posts: 5
Joined: Tue Apr 03, 2012 11:06 am

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby damarrin » Tue Apr 03, 2012 11:43 am

This does nothing for me :-( Ubuntu 11.10 with Unity and the Nvidia proprietary driver.

User avatar
FB_JussiE
Posts: 267
Joined: Wed Nov 23, 2011 4:09 pm
Location: Finland
Contact:

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby FB_JussiE » Tue Apr 03, 2012 11:49 am

Hmm, are you using the same resolution as in your desktop?
Just tested this quickly with Ubuntu 11.10 with NVidia proprietary drives as well and it worked.

On the tests I also got the fullscreen to work properly by disabling the Ubuntu Unity Plugin with CompizConfig settings manager (but that broke the whole left-side bar, which however started working again after re-enabling the plugin)

I know tweaking the 3D effects is pretty nasty, but at the moment its the only reliable way I know to get the bars hidden in Unity :(

Edit: This is just a random tought, but you could try starting the game in windowed mode with the maximizewindow set to true, and the re-start the game in fullscreen again. This while unlikely could do some strange Unity sorcery to help, but as said just a random tought :).

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby fb_jpk » Tue Apr 03, 2012 4:42 pm

As a note to the use of the "MaximizeWindow" option.. If I remember correctly, it has an effect only if the game is in Windowed mode (the "Windowed" option is false). Additionally, one can use the "WindowTitleBar" option to disable the window title bar and borders. Using those options, combined with a screen size that matches the desktop size, one can get a window mode very much similar to setting the fullscreen mode.

However, if the desktop window manager adds the top panel on top of the game despite that, I don't think there is much the game can do about that. (We use SDL to create the window for the game on Linux, and the game attempts to give all the appropriate hints to SDL, to make sure it would create a full screen window when such is wanted, but it seems that this works only with limited desktop/window managers).

We can try to figure out if there is some additional way of telling the specific problematic window managers / desktops that the game really wants to be in fullscreen, but at this point I can't make any promises of actually getting all of these issues automatically solved. (Though its great to have a lot of choices on linux regarding which window manager to use, etc. - it does seem to cause this headache of "works just fine on one machine, but works differently on another one".) ;)

nibulix
Posts: 1
Joined: Tue Apr 03, 2012 8:15 pm

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby nibulix » Tue Apr 03, 2012 8:27 pm

I have the same issue on Ubuntu 11.10 with Unity, I am using the same resolution in game as the desktop resolution. The top bar and the dash remain on the desktop after the game start.
In the first trine game everything was working as it should.

damarrin
Posts: 5
Joined: Tue Apr 03, 2012 11:06 am

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby damarrin » Tue Apr 03, 2012 9:28 pm

Setting MaximizeWindow to true or false has no effect on my system whatsoever.

When Windowed is set to false, the game simply starts in a borderless window. When it's set to true, it starts in a decorated window. In both instances, if the game res equals desktop res, the window is shifted to the right and down to make room for the side and the top bars (its "overflowing" edges show up on the other desktops in the desktop wall) If I then manually move it to the left and up, it makes the sidebar hide, but the top bar is always overlaid on the game.

Disabling the Unity plugin effectively removes both the side and top bars, and yes, the game then looks like it were in fullscreen. This, however, breaks practically all system functionality like alt-tab, and even changing volume from the keyboard makes the game disappear as the volume meter appears on screen and it's impossible to restore it without re-enabling the plugin. Really not a solution, then.

Right now the best option for me is to set the game to "not windowed" and at a res just below my desktop res; that way it starts in a borderless window in the middle of the screen.

Maybe you could talk to icculus or the wine guys? They managed to get fullscreen working pretty well.

damarrin
Posts: 5
Joined: Tue Apr 03, 2012 11:06 am

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby damarrin » Tue Apr 03, 2012 9:48 pm

Here's an interesting thing:

Setting RefreshRate to 60 made some resolutions (like 800x600) change the desktop res, but not others (like 1440x900, my native). One time when I set 1280x800, the game sort-of changed to full-screen: the entire screen went black, but then when image appeared, it turned out it's still running at 1440x900 with the game at 1280x800 in the lower-left corner of the screen (of all places). All subsequent times 1280x800 started up in a borderless window in the middle of the screen, though. All this with refresh manually set to 60.

When the game did change desktop res, however, restoring native resolution on closing the game was ugly; parts of the screen wouldn't redraw at all.

Leander
Posts: 2
Joined: Mon Apr 02, 2012 10:44 pm

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby Leander » Tue Apr 03, 2012 10:05 pm

Tried all the suggestions so far, no luck. I'm running the game at the same resolution as my desktop, and using the Nvidia proprietary drivers.

As other have noted, other full screen apps work, so there's definitely a way to do it. Interestingly, I came across this guy who ran into the same problem, and worked around it by changing the window type to popup. Granted, it sounds like a hack and I'm not sure if it applies to SDL, but hey, it's the closest I've found so far to an answer.

hero1900
Posts: 17
Joined: Tue Apr 26, 2011 1:06 am

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby hero1900 » Tue Apr 03, 2012 10:59 pm

all not work with me on ubuntu 11.10. the dash and top menu stays there. mmmm its really annoying

hero1900
Posts: 17
Joined: Tue Apr 26, 2011 1:06 am

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby hero1900 » Thu Apr 05, 2012 12:48 am

i fix it and i found the issue. first of all when you install trine 2 we use sudo as writen in the read me file and thats actually the issue, i install the game in my home folder since my root one is small in size. so the permission on the trine folder and the owner is for root and it seems it will give problem for the full screen mode. so for me i did change the permission so i can manage the changes for the folder and then every ting works so fine. so it matter of permission. it should be solve with no problem. so now for me its workng so well on my unity. hope this can help other guys

Mrokii
Posts: 6
Joined: Thu Apr 05, 2012 12:48 am

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby Mrokii » Thu Apr 05, 2012 12:57 am

@hero1900: I have Ubuntu 11.10 x64, use Classic Mode (that looks like Gnome 2) and have installed the game in a certain folder within my home folder. Permissions are fine (not root, but set to me) and the issue *still* happens. So this doesn't seem to fix the problem (at least not for everybody).

storma
Posts: 7
Joined: Wed Apr 20, 2011 5:07 pm

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby storma » Thu Apr 05, 2012 10:02 am

This also happens with xfce4+compiz+cairo-dock. Cairo-dock is hidden so not that much of a problem but when the cursor hits a screen edge, the game loses focus.

EDIT: I should say this is on Debian Squeeze.
Last edited by storma on Thu Apr 05, 2012 12:13 pm, edited 1 time in total.

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby fb_jpk » Thu Apr 05, 2012 11:02 am

I'll be looking into this. I'll be installing a few new additional linux distros on my work computer today so I'll hopefully be able to replace these myself on my computer (and some other crash issues reported here on the forums), and then hopefully figure out a fix for them.

I already have 3 different Linux distributions on this computer, a few more won't hurt. Except that I'll soon be running out of partitions for them... ;)

berarma
Posts: 16
Joined: Fri Apr 29, 2011 2:10 am

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby berarma » Thu Apr 05, 2012 9:23 pm

fb_jpk wrote:I'll be looking into this. I'll be installing a few new additional linux distros on my work computer today so I'll hopefully be able to replace these myself on my computer (and some other crash issues reported here on the forums), and then hopefully figure out a fix for them.

I already have 3 different Linux distributions on this computer, a few more won't hurt. Except that I'll soon be running out of partitions for them... ;)


Hi.

I'm running Gnome3 in Debian SID with Nvidia propietary drivers and the issue is pretty much the same. It doesn't seem like a library/distro problem but some rough edges between SDL, graphical drivers and the new desktops.The point for using SDL is making the code more portable between systems, have you talked to the SDL developers? They should provide a solution to this problem and maybe you could help them work it out.

My case is exactly as follows:
- Running at 1024x768 works ok, fullscreen and no top bar.
- Running at 1280x800 doesn't work fullscreen, the game uses the center of the screen at the desktop resolution (1440x900).
- Running at 1440x900 (desktop resolution) is fullscreen but in a few runnings the top bar is visible.

In all cases the notification bar (bottom) can be made visible by moving the pointer to the lower right corner. I can't tell whether this is a bug or a feature, time will tell.

The game is beautiful and works very well with only these small glitches on my system. Congratulations!

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine 2 + Gnome Shell = Top bar always visible?

Postby fb_jpk » Thu Apr 12, 2012 1:08 pm

Hi again,

I've been testing and fiddling around with the fullscreen issues a little bit, and as far as the problems with the fullscreen mode goes at least for Ubuntu 10.x/11.x (the issue with gnome panels showing on top of the game)... There seem to be a few alternative workarounds for this:

Option 1, set the desktop visual effects off (Ubuntu 10/11):

System -> Preferences -> Appearance -> Visual Effects Tab

Set this to None.

After this, the Trine 2 fullscreen will probably work. You may still have to select an appropriate resolution for the game, one that your X supports as a desktop resolution. (Other resolutions may cause the desktop to resize to some somewhat larger "nearby" resolution and then the game to appear inside that rather than filling the full screen)


Option 2, set the compiz legacy fullscreen support on (Ubuntu 10/11):

For ubuntu (gnome):

run

Code: Select all

gconf-editor

(if you don't have it, sudo apt-get install gconf-editor will probably do the trick)

Within the editor, locate:
/apps/compiz/plugins/workarounds/allscreens/options/legacy_fullscreen
and set this value to true and exit the gconf-editor.

(Alternatively install the compiz control panel application and use that to modify the legacy fullscreen support)

As for KDE users, there probably is some similar application to modify the configuration)

When this legacy fullscreen support is enabled, you'll have to start Trine 2 in the
- The same resolution as your currently selected desktop resolution
- Start it in the windowed mode (rather than fullscreen)
- Starting the game in a fullscreen mode sometimes works as well (not always though, resolution dependent?)

The result should be that the game is running in fullscreen.

If you still get the window borders and titlebar, you may have to modify the
~/.frozenbyte/Trine2/options.txt, and change the setOption(renderingModule, "WindowTitleBar", true) value to false.


Option 3, just kill the gnome-panel while playing the game (Ubuntu 10):

(Notice, that although this should not affect any gnome panel customizations, I cannot guarantee that. Use it at own risk.)

A very hacky script file should do the trick.
First, you'll need to install the wmctrl tool for this script to work: sudo apt-get install wmctrl
Then create the following script file under the Trine 2 installation directory and use it to start Trine 2.

Code: Select all

#!/bin/sh

# in theory, could change the desktop to match the intended game size but unfortunately this does seem to get ignored
#wmctrl -g 1280,720

# get rid of gnome panels
gnome-panel --replace &
# gnome panel applets seem to dislike instant delete, so wait for a while
sleep 3
killall gnome-panel
sleep 1

# start Trine 2
export LD_LIBRARY_PATH=./lib/lib32
./bin/trine2_linux_32bit >/dev/null &

# wait for a while for the app window to have really appeared...
sleep 5

# position the Trine 2 window to top-left corner and raise it
wmctrl -F -r Trine2 -e 0,0,0,-1,-1
wmctrl -F -a Trine2

# once done playing, restore things as they were (hopefully)
wait
sleep 1
gnome-panel &


Notice, that this requires that you run the game in
1) windowed mode
2) without the window title bar (modify the ~/.frozenbyte/Trine2/options.txt to achieve this)
3) in the same resolution as your desktop.

Or, you may run the game in fullscreen mode, but in that case, you may have to position the mouse cursor in lower-right corner and alt+tab back-and-forth from the game once, as otherwise the X cursor may stay visible on top of the game.

Additionally: It makes sense to keep a single terminal window open in the background. Should the script above fail to restore the gnome panel for some reason, you'll want to have a window to re-create it (with the "gnome-panel &" command).
(Otherwise you may end up stuck in an empty desktop with no way to launch the terminals or new programs) :)


Option 4, wait for some fix to the Trine 2 / SDL:

So far, I've had a quick look at the SDL 1.3 that Trine 2 uses to create the window, and it seems like it would need to be updated or fixed to get the fullscreen working, without the need of the other external workarounds. However, it also seems that SDL has meanwhile moved from 1.3 to 2.0. So this issue might have been fixed already in its latest versions. The 2.0 just isn't fully compatible with 1.3, and this means that we'll have to fix and rebuild the executable for the SDL 2.0 before we can test it out. This will probably be done for the next bigger linux patch, but I have no exact schedule for that. If we figure out some simple fix to the SDL 1.3 version before that, we might roll it out.

So, all in all, it seems that it is possible to get past the fullscreen issues by some elaborate creative ways, but to really get things more simple, we'll have to get the updated / fixed SDL in use.

Meanwhile, the workarounds above should allow fullscreen play for those who don't want to wait for the fix to happen.


Return to “Trine 2”

Who is online

Users browsing this forum: No registered users and 2 guests