How to proper windowed without black bars or cut off ingame elements?

Hello World,

I’ve had this problem since the begining of switching to Linux and it’s finally pissed me off enough that I’m ready to tackle it.

Basically whenever I play a game in windowed mode parts of the game get cut off as you can see in the pick below with the “back” and “continue” buttons.

Or in Zoeti where the UI elements seem properly positioned, but if there are more then 3 enemies in a battle the forth one will be offscreen…

And it doesn’t matter which type of windowed either, if it’s the type where you go in the games options, select windowed, and then select a resolution for that window, or if it’s like in Songs of Silence where you can just drag&drop to resize the game window to your liking.

So I started playing around with the settings in Lutris and it seems if I enable gamescope I can get the game elements to actually stay inside the window, but it adds these ugly black bars when I resize it!!!.. :sob:

From looking at gamescope --help it seems maybe the upscaler options might help me fix that? But it doesn’t tell me how to use them, and simply adding -S fit or -S fill in the Custom Settings dialog box didn’t work. :pleading_face:
Do I have to use “” somewhere or some other kid of symbols or how the heck do I use these settings?

Or am I on the wrong track altogether? :worried:

Please help, thank you.

This obviously shouldn’t happen using default settings, neither with nor without gamescope. Some questions:

  • Does it also happen for example in games started directly through Steam, or native games (e.g. Beyond All Reason, 0 A.D. from the Software Store / Repo?
  • How is gamescope’s behaviour if you specify the games’ resolution as well as output resolution?

In my experience gamescope likes to open with a maximized window, causing black bars. grabbing it with the cursor causes it to snap to its defined default size, removing those bars.

Also please post the output of inxi -GMS so we get an idea of your system.

Thank you very much for replying.

  • I’ve tried Beyond All Reason and indeed that one behaves properly, no matter how I resize it no black bars either in the menus or ingame.

  • Sadly setting those resolutions for gamescope did nothing in either Songs Of Silence or Zoeti, black bars still there. :frowning:

Here’s the inxi output(not really sure why it says 1969x1108 resolution when my monitor and system settings are set to 2560x1440 but hey…) let me know if you need anything else.

not really sure why it says 1969x1108 resolution when my monitor and system settings are set to 2560x1440 but hey…

That’s a strong clue. Do you happen to have Fractional Scaling or some “Zoom” factor enabled in your system settings? Should be around the display settings in KDE.

If so set it back to off / 100% and try those games again.

Well yeah, I have the scale set to 130% as everything is entirely too small for me otherwise…

Anyway I tried to set the scale to 100%(just to test cause it’s really impossible for me to keep it at that level) and like that setting the max and output resolutions in gamescope does work. But as soon as I try to resize the window with drag&drop the black bars still appear… :sob:

Did you also try it without gamescope, to rule out bugs with that one?

I tried to replicate the bug by changing scaling, however on my system (OpenSuse + Wayland + GNOME) it seems to work fine.
You might also want to try changing that “Legacy applications (X11)” scaling setting seen in the screenshot above.

Yeah when I had it at 100% I tried Songs Of Silence without gamescope too and same issue, no more black bars but certain elements don’t scale properly aka they get cut off or whatever the hell happens to them, like I showed in the first screenshot.

And with both scale at 100 and selecting “scaled by the system” no change in either game with or without gamescope, at least no change for the better. At one point Songs Of Silence looked arguably worse as it added some small black bars on the Y axis too as you can see in the pic below, loool…

So what’s next? :worried:

Hello, I tried to reproduce your issue, I installed this game using GOG installer and Lutris “+” “install a Windows game from an exe”, nothing more.
My resolution is 1920x1024:

No black borders.
I do not use gamescope, just Lutris default options, I didn’t change game options neither.

Well you have to change the game options in order to try and reproduce, you have to set it to windowed and then play around with the window and resize it.

Here’s a short video(just ignore if it asks you to register, skip that step and it should take you straight to the video) so you can see everything exactly, maybe I am not explaining it right…

I don’t understand why you need to play this game in windowed mode?
Did you try to specify Gamescope resolution?

I usually play most 2d games(unless it’s something more involved/atmospheric like the Trine series, or Little Nightmares, or Duke Nukem Manhattan Project) in windowed mode while doing other things like watching youtube videos or movies/shows, etc. at the same time.
I’ve been doing it since forever and I’d very much like to keep doing it… :smiling_face_with_three_hearts:

Yes, I detailed the problems with that above. But even if somehow I could get only that to work with my other settings I’d still very much like to be able to resize the window to my liking AT LEAST in games which support such action natively, like Songs Of Silence.

Would you mind installing another desktop environment like Gnome and test it there? By now I think this might be a desktop compositor or window manager issue (programs part of the pipeline to manage and draw your graphical desktop), given you can manipulate the buggy part by changing fractional scaling and stuff.

you can do so on EndeavourOS with using the eos-packagelist (taken from here).

eos-packagelist --help
eos-packagelist --list
eos-packagelist profile Gnome-Desktop --install

Unfortunately I’m not familiar enough with EndeavourOS to tell you the next steps. Technically you should then be able to start a Gnome session upon login.

Another inxi -G read after starting Gnome would also be useful to make sure it then runs a different compositor etc.

If it runs fine with Gnome this bug has to be elevated to the KDE bugtrackers.

Hmmmm, I was afraid it would come to this… According to what I remember reading on the EOS forums running 2 desktop enviroments at the same time can be… “problematic”.
But ok, I’ll do some research and see how/what I can do. I’ll report back once the testing is done, thanks you.

SIGH, I tried both Fluxbox and gnome, they behaved the same in both of them… :sob: :sob: :sob:

Any further ideas pretty please?

Err, my computer is pretty rudimentary so I can’t really offer too much input here…

# In Lutris, under the game's configuration, in the 'System options' tab
# Add to Command prefix:
gamescope -w 1920 -h 1080 --borderless -S stretch --windowed

No border so that there’s no possibility of conflict with the window compositor and decorator. Try to use conventional resolutions like 1920x1080 or 1280x720 at first as the game might be interfering too. If you want to have a resizable window, remove the w and h arguments.

gamescope --borderless -S stretch --windowed

There are also other scalers that are available: stretch, integer, nearest, exact

Also , you’re on wayland, right? I’m still on x11 but IIRC there’s an argument for it in gamescope --expose-wayland

Sorry about the late reply @Shaddonius I’ve been having problems with my system lately and the Linux side is down completely atm… :sob: :sob: :sob:
After I am back up and running(which might even include changing distros entirely so it remains to be seen if I’ll even get same behavior) I’ll try the things you mentioned and report back.

Thank you very much for your suggestions. :hugs:

Right so I finally got done with the issues a couple of days ago and started gaming again. And the bad news is @Shaddonius that I’ve tried several permutations of your suggestion and no dice, the games behave exactly the same.

What is even worse!!! is that a lot of things have changed since then, yet the problem still persists… :sob: :sob:
Things that have changed:

  • some of my hardware(new inxi at the end);
  • the OS, before I was on EndeavourOS(arch based) now I am giving Fedora a try;
  • the Lutris version, on EOS I was using some -git version now I use the regular one(ver 0.5.18-1.fc41) installed with the Discover store from whichever repo it labels as “Fedora Linux”;
  • amd drivers and stuff, on EOS I was using some bleeding edge development versions, now I use whatever comes default with Fedora 41, didn’t have the need to mess with any of it yet;
  • the wine version obviously, tried the new “System (10.0 (Staging)))” version, but I still gave the good old “wine-ge-8-26-x86_64 (default)” and “lutris-GE-Proton8-26-x86_64” a shot, nothing;
  • still using KDE Plasma and wayland, that hasn’t change, but like I wrote above I did give both Fluxbox and Gnome a shot on the old OS at @Natanox 's recommandation and it didn’t make a difference back then. Please don’t tell me I have to try them again in this new OS… :fearful:

What else can I do/is there to say…? :face_vomiting:

VIKINGS@VIKINGSKINGDOM:~$ inxi -Fz
System:
  Kernel: 6.12.10-200.fc41.x86_64 arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.2.5 Distro: Fedora Linux 41 (Forty One)
Machine:
  Type: Desktop Mobo: Micro-Star model: PRO B650M-P (MS-7E27) v: 1.0
    serial: <superuser required> UEFI: American Megatrends LLC. v: 1.D0
    date: 12/16/2024
CPU:
  Info: 6-core model: AMD Ryzen 5 7600X bits: 64 type: MT MCP cache: L2: 6 MiB
  Speed (MHz): avg: 545 min/max: 545/5453 cores: 1: 545 2: 545 3: 545 4: 545
    5: 545 6: 545 7: 545 8: 545 9: 545 10: 545 11: 545 12: 545
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900
    XTX/7900 GRE/7900M] driver: amdgpu v: kernel
  Device-2: Advanced Micro Devices [AMD/ATI] Raphael driver: amdgpu
    v: kernel
  Display: wayland server: Xwayland v: 24.1.4 compositor: kwin_wayland
    driver: gpu: amdgpu resolution: 2560x1440~165Hz
  API: EGL v: 1.5 drivers: kms_swrast,radeonsi,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.3.3 renderer: AMD
    Radeon RX 7900 XT (radeonsi navi31 LLVM 19.1.5 DRM 3.59
    6.12.10-200.fc41.x86_64)
  API: Vulkan v: 1.4.304 drivers: N/A surfaces: xcb,xlib,wayland
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor wl: wayland-info x11: xdriinfo,
    xdpyinfo, xprop, xrandr
Audio:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 31 HDMI/DP Audio
    driver: snd_hda_intel
  Device-2: Advanced Micro Devices [AMD/ATI] Rembrandt Radeon High
    Definition Audio driver: snd_hda_intel
  Device-3: Advanced Micro Devices [AMD] Family 17h/19h/1ah HD Audio
    driver: snd_hda_intel
  Device-4: Razer USA RC30-026902 Gaming Headset [Nari Essential Wireless
    Receiver] driver: hid-generic,snd-usb-audio,usbhid type: USB
  Device-5: Audeze LLC Maxwell XBOX Dongle
    driver: hid-generic,snd-usb-audio,usbhid type: USB
  API: ALSA v: k6.12.10-200.fc41.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.2.7 status: active
Network:
  Device-1: Realtek RTL8125 2.5GbE driver: r8169
  IF: enp14s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 22.3 TiB used: 21.94 TiB (98.4%)
  ID-1: /dev/nvme0n1 vendor: A-Data model: SX6000PNP size: 476.94 GiB
  ID-2: /dev/sda vendor: Seagate model: ST8000DM004-2CX188 size: 7.28 TiB
  ID-3: /dev/sdb vendor: Seagate model: ST8000DM004-2CX188 size: 7.28 TiB
  ID-4: /dev/sdc vendor: Seagate model: ST8000DM004-2U9188 size: 7.28 TiB
Partition:
  ID-1: / size: 48.91 GiB used: 20.28 GiB (41.5%) fs: ext4 dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 2 GiB used: 7.5 MiB (0.4%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-3: /home size: 402.49 GiB used: 152.16 GiB (37.8%) fs: ext4
    dev: /dev/nvme0n1p3
Swap:
  ID-1: swap-1 type: partition size: 14.9 GiB used: 1.77 GiB (11.8%)
    dev: /dev/nvme0n1p4
Sensors:
  System Temperatures: cpu: 47.9 C mobo: 36.5 C
  Fan Speeds (rpm): N/A
  GPU: device: amdgpu temp: 44.0 C device: amdgpu temp: 48.0 C fan: 0
Info:
  Memory: total: 32 GiB note: est. available: 30.45 GiB used: 5.27 GiB (17.3%)
  Processes: 432 Uptime: 2h 14m Shell: Bash inxi: 3.3.37
VIKINGS@VIKINGSKINGDOM:~$ 

I now happen to have a very similar problem with the game Summer Islands. I first expected it to be a game problem since it’s just that one, until you posted this and reminded me of this thread. Could be completely unrelated though.

Is it still with all games for you or just some? Perhaps this really is a deeper problem with the Wayland or other part of the rendering pipeline. In that case we should elevate this to a more appropriate forum; don’t know which one though, I can’t debug window managers… perhaps your distro’s forum or some general Linux forum.

Did you try using X11 / Xorg instead of Wayland? I notice you didn’t answer that one before.

Yeah with me it’s still with all games, tested both the ones mentioned so far in this thread aka Songs Of Silence and Zoeti as well as two new ones, Dark Sky and Seal The Rift. :cry:

Oh and the new ones have an additional problem, if I try to run them with the gamescope optioned enabled from Lutris’s settings then the mouse isn’t in the place where it should be. So I have to also enable “Relative Mouse Mode” in order to get it to track properly, but doing that locks the mouse to the game window, I can’t just move it freely and easily click things outside of the game window I have to start using atl+tab every time which is annoying as hell!!! :sob:

Honestly I don’t remember about x11, but it’s probable that I gave it a shot on EOS as I tried pretty much everything on that. In Fedora I don’t even have the option to run a x11 session and I’d rather not mess with that either…

Not sure if to be glad or sad that it’s now happening to someone else as well, kinda mixed. :neutral_face:

P.S. Well heck, if you don’t know where to elevate it don’t even look at me,looool. :face_holding_back_tears:

Nice, can’t wait to see what your experience with Songs Of Silence turns out to be.
And to repeat some things just to make everything clear and so you don’t have to go scrolling through the entire thread, when it comes to windowed mode there are 2 types of games(to my knowledge):

a) games like Zoeti where by default/originally all you can do is go into their options, select windowed mode and then select a resolution that window should have, that’s it. Now if I limit myself just to that then yeah, these run fine for me too, however for some very legit(IMO) reasons that I’m not gonna waste your time with now I was hoping that by enabling gamescope on these games it would elevate them to the second type without any issues such as black bars, etc.

b) games like Songs Of Silence where by default once you select windowed mode from inside their settings you are then allowed to resize that window to whichever size/shape you want and there should never be any black bars, or cut off elements or anything, and the content should simply scale itself along with whatever you are doing to the window.

When I used words like default/normal/originally above by that I mean how they things work in windows, and to that there are 2 more important things I’d like to mention:

c) for those who are gonna try to sing me ditties like “Linux is not windows” or other stuff like that: ok fine it’s not, but first of all that doesn’t mean that on very rare ocassions Linux should not try to immitate or outright copy winshit(because as much as it pains me to admit there are certain things winshit simply does better) and second of all such mentality should especially be trown out the window in scenarios where Linux tries to… emulate?, help me out here cause I know that’s not the right word since wine and proton aren’t actually emulators… but you know what I mean, in scenarios where Linux is intentionally trying to offer an experience lets say as close to that of winshit as possible.

d) for those who are gonna try to come up with all sort of reasons to say stuff like “well maybe that sort of thing just doesn’t work/isn’t possible on Linux”, nope, wrong again, best example as mentioned by @Natanox somewhere above, all you have to do @Shaddonius (or anyone else reading this) to see exactly the behavior I am talking about working properly in a native! Linux game is open of your terminal(or however you install stuff in your distro) and install Beyond All Reason (quite a tiny game size wise so there shouldn’t be any issues) then set that to windowed mode and have fun!..

P.S. Sorry for the wall of text… :pleading_face: