Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Software renderer doesn't work properly under Wayland #52095

Closed
Faalagorn opened this issue Oct 4, 2021 · 6 comments
Closed

Software renderer doesn't work properly under Wayland #52095

Faalagorn opened this issue Oct 4, 2021 · 6 comments
Labels
OS: Linux Issues related to Linux operating system SDL: Tiles / Sound Tiles visual interface and sounds. stale Closed for lack of activity, but still valid.

Comments

@Faalagorn
Copy link
Contributor

Describe the bug

Follow up to #51053 (comment) – software renderer doesn't work without this hacky solution of rendering it twice.

Steps To Reproduce

  1. Make sure you are running Wayland (e.g. type echo $XDG_SESSION_TYPE).
  2. Run Cataclysm with Wayland (e.g. type SDL_VIDEODRIVER=wayland cataclysm-tiles).
  3. If the renderer was not set to software, change to it in options and apply changes.
  4. Observe the having issues with input.

Expected behavior

The game should not have issues with input.

Screenshots

No response

Versions and configuration

  • OS: Linux
    • OS Version: LSB Version: 1.4; Distributor ID: Arch; Description: Arch Linux; Release: rolling; Codename: n/a;
  • Game Version: 0.F-3195-gcbd8876a6a1 [64-bit]
  • Graphics Version: Tiles
  • Game Language: Polski [pl]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Wyłącz potrzeby NPC [no_npc_food]
    ]

Additional context

You can use fix from #51053 (comment) to get rid of the issue, despite at performance cost.

Unrelated, but software renderer doesn't seem to work on Android for me too, as per my comments in #51053 and on Discord, ideally the option should not appear there or fallback to a different renderer then.

@Faalagorn Faalagorn changed the title Wayland doesn't work with software renderer Wayland doesn't work properly with software renderer Oct 4, 2021
@Faalagorn Faalagorn changed the title Wayland doesn't work properly with software renderer Software renderer doesn't work properly under Wayland Oct 4, 2021
@BrettDong BrettDong added SDL: Tiles / Sound Tiles visual interface and sounds. OS: Linux Issues related to Linux operating system labels Oct 5, 2021
@Adriankhl
Copy link

I was annoyed by this many weeks ago, and it is sad to see that this is still here.

There are plenty of wayland-related bug in sdl2 (https://github.com/libsdl-org/SDL/issues?q=is%3Aissue+is%3Aopen+wayland), perhaps someone with good knowledge of sdl2 could figure out whether this problem belongs to CDDA or sdl2 itself.

@Faalagorn
Copy link
Contributor Author

Well, there's a hack in the comment I posted if you want to use software renderer, I guess it could be if-ed, but a proper fix would be welcome.

Gladly opengl and opengles work fine in Wayland for me, I used to be an have a problem with cursor, but it seems to be gone now, so I'm glad.

Alternatively, the game could detect running on Wayland and disallow or show a warning (or silently switch to xwayland) when trying to change to software, that at least would alleviate crashes by setting this option for whatever reason… 🤔

@Adriankhl
Copy link

Thanks, opengles2 (it is the same as opengles in CDDA right?) works for me! Still have the same problem with opengl, perhaps the problem is from sdl2 side.

I think the sdl2 starts in xwayland by default (libsdl-org/SDL#2710), which I also see this in the "Display" option.

@Faalagorn
Copy link
Contributor Author

I run it with SDL_VIDEODRIVER=wayland forced in .bash_profile (sway and Arch BTW, but DE and distro shouldn't matter) and #51053 fixed the issues for me, but indeed the default for SDL is Xwayland (which sometimes is sane for proprietary closed source game, as they experience various problems with it forced so I actually have to switch it to SDL_VIDEODRIVER=wayland for some Steam games, including Valve's ones, but also things like original Dead Island which is having issues with mouse and keyboard under native Wayland.

@Adriankhl
Copy link

Great, #51053 fixes the opengl option 😄

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Apr 17, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: Linux Issues related to Linux operating system SDL: Tiles / Sound Tiles visual interface and sounds. stale Closed for lack of activity, but still valid.
Projects
None yet
Development

No branches or pull requests

3 participants