sm64pc / sm64ex

Fork of https://github.com/sm64-port/sm64-port with additional features.
1.6k stars 491 forks source link

[Arch Linux] The executable changes KDE's Plasma's displayed time for some reason. #285

Open RevoSucks opened 4 years ago

RevoSucks commented 4 years ago

When building the repository as-is with no modifications, running the executable for some reason updates the toolbar's displayed time to 6:24 AM (obviously wrong) and it stays there until the executable is closed.

I am running KDE Plasma as my display manager.

OS:

$lsb_release -a
LSB Version:    1.4
Distributor ID: Arch
Description:    Arch Linux
Release:        rolling
Codename:       n/a

Steps to reproduce:

  1. Setup arch linux and KDE Plasma
  2. Build sm64pc repo as-is with no changes.
  3. Run the executable
  4. Watch as your time mysteriously "updates" to 6:24 AM.

It's not the underlying time that updates, as I opened a different terminal and did timedatectl status and it shows the correct time underneath.

fgsfdsfgs commented 4 years ago

What.

rawr51919 commented 4 years ago

This one confused me quite a bit too

Jan200101 commented 4 years ago

SDL2 blocks the compositor which stops the task bar from updating disabling the compositor or disabling composition blocking will fix that

fgsfdsfgs commented 4 years ago

Interesting. Wonder if it's possible to stop SDL2 from doing that. There should apparently be a system wide setting to disallow applications from disabling compositing altogether: scr

You can also apparently do this.

parkerlreed commented 4 years ago

To be fair for most fullscreen games you want it disabled. Might need to file a bug against upstream Plasma for the clock not updating

RevoSucks commented 4 years ago

Its not even the executable stopping the clock from updating. It straight up replaces the time with another one temporarily.

RevoSucks commented 4 years ago

I can confirm turning off Allow applications to block compositing fixes my issue, but this is still weird.

parkerlreed commented 4 years ago

Cannot replicate on Arch

It disables compositing and the time still works as expected (Confirmed compositing is off by dragging a window and have no transparency)

image

parkerlreed commented 4 years ago

There's been quite a few updates recently. Is your system for sure up to date on packages?

Jan200101 commented 4 years ago

I can replicate this on my Fedora 32 system running KDE Plasma 5.18.5 with KWin and composting enabled and blocking allowed. This isn't a bug this is expected behavior from SDL2 see https://bugs.kde.org/show_bug.cgi?id=371480

rawr51919 commented 4 years ago

This therefore isn't a bug with the repo, but a result of weird behavior with SDL2 in general.

bernharl commented 4 years ago

This is a known bug with KDE Plasma and Nvidia drivers. When games disable the compositor all Plasma Widgets get frozen until you enable it again. A workaround is to run: "kwin_x11 --replace" in Krunner whenever widgets freeze. Nvidia have recently confirmed that they are aware of the bug which is promising as it has existed for 5+ years.

Source: https://www.reddit.com/r/kde/comments/gfrtk4/terminal_command_to_resize_all_panels_from/fpvlapj/?context=3

parkerlreed commented 4 years ago

That would explain it. AMD here :D

Emill commented 4 years ago

If you use https://github.com/Emill/n64-fast3d-engine/blob/master/gfx_glx.c on Linux, as originally intended, rather than the SDL2 version (that was meant as a last resort), you don't get this problem since gfx_glx.c does not modify the compositing settings. If you want to toggle compositing you can use Alt+Shift+F12 anyway.