Jump to content
The Dark Mod Forums

Linux testers needed: new window management and input handling


Recommended Posts

7 hours ago, datiswous said:

But then in TDM I constantly see a desktop mouse cursor in view aside from the normal cursor.

Make sure that in_grabMouse is set to 1. The default value for this changed with the GLFW changes, so if you recreated a new darkmod.cfg with 2.09a before launching with the dev build, you might have the wrong value.

4 hours ago, MirceaKitsune said:

I'm still curious about a little detail if anyone happens to know the answer: Does the new window management and input system support Wayland natively... by which I mean using the pipeline without having to go through X11? I'm re-asking because I hear KDE Plasma 5.22 (coming next month) should fix all the final issues I was personally running into and kept me on X11, thus a switch may be on the table again.

The prebuilt executables almost certainly won't. My understanding is you have to compile GLFW for Wayland, so you'd have to compile a custom TDM version with a Wayland-compatible GLFW build. I make no guarantees, though.

  • Like 2
Link to post
Share on other sites
  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

You need to reset your darkmod.cfg, or specifically you need to enable in_grabMouse.

The way that input and windows are managed for Linux has become rather dated, causing a multitude of issues. To fix that, I am currently evaluating if we can just use a library (GLFW) to handle all of

Here's a new test executable that should hopefully fix the mouse wheel direction: https://ci.appveyor.com/api/buildjobs/xld2bd9hrvpe9f4h/artifacts/build%2Fthedarkmod.tar.bz2

Posted Images

6 hours ago, cabalistic said:

The prebuilt executables almost certainly won't. My understanding is you have to compile GLFW for Wayland, so you'd have to compile a custom TDM version with a Wayland-compatible GLFW build. I make no guarantees, though.

I see. I was hoping it's a builtin feature of GLFW, detecting whether it's X11 or Wayland and launching appropriately in each environment. You'd still require one engine binary though right... as in the same thedarkmod.x64 would know to operate on both renderers, you wouldn't need two separate thedarkmod_x11.x64 / thedarkmod_wayland.x64 engines? If it only requires a Wayland enabled GLFW build I hope it wouldn't be difficult to compile the official engine against one.

On my Linux distro (Manjaro) I see a package for glfw-x11 and one for glfw-wayland, both are offered officially. However you can only install one at a time, the packages are marked as conflicting each other. Hopefully they aren't required at runtime in this case, but as a dev you may need to link to each GLFW separately when building.

Edited by MirceaKitsune
Link to post
Share on other sites

We link statically to a GLFW binary shipped with the TDM source. So depending on whether that one's X11 or Wayland would determine which system the resulting TDM binary would support. Linking to both is not possible.

Link to post
Share on other sites
2 hours ago, cabalistic said:

We link statically to a GLFW binary shipped with the TDM source. So depending on whether that one's X11 or Wayland would determine which system the resulting TDM binary would support. Linking to both is not possible.

I wonder if the installer could offer an option for which platform to use then. The starting page has several options under Advanced Settings, there could be one new checkbox for "Use Wayland" in the Linux version.

Just a thought for the future... if it's too complicated it isn't an emergency in my book; We should be able to run TDM on Wayland as is, except apps without native support have to go through a fake X11 session which is slower and not ideal especially for high-end games that can use the performance benefit.

Link to post
Share on other sites
14 hours ago, cabalistic said:

Make sure that in_grabMouse is set to 1. The default value for this changed with the GLFW changes, so if you recreated a new darkmod.cfg with 2.09a before launching with the dev build, you might have the wrong value.

Yeah this is what happened, so it's all right now. Thanks.

Edited by datiswous
Link to post
Share on other sites
On 5/18/2021 at 10:45 PM, MirceaKitsune said:

I wonder if the installer could offer an option for which platform to use then. The starting page has several options under Advanced Settings, there could be one new checkbox for "Use Wayland" in the Linux version.

The impact of such change is like adding a third supported platform on all levels.

Quote

We should be able to run TDM on Wayland as is, except apps without native support have to go through a fake X11 session which is slower and not ideal especially for high-end games that can use the performance benefit.

Any indication that X11 emulation costs performance?

I suppose OpenGL calls hit the driver directly regardless of Wayland/X11, and GPU does not care either. The only difference could be some desktop-level compositing and input handling.
I remember we argued a lot about "exclusive" fullscreen mode on Windows which should theoretically differ in additional compositing step, and we did not find any evidence of performance impact.

Link to post
Share on other sites
  • 4 weeks later...

I switched to the latest dev snapshot via the installer now that this should be included. Noticed a new issue straight off the bat: The system pointer shows over the game pointer in the main menu. The issue is even worse in-game, where the pointer not only shows and moves over the screen but you can no longer look around when it reaches a screen edge, apparently it's not auto-centered any more. Will have to revert to latest stable until this is resolved. If it's important I'm on Manjaro / KDE Plasma.

Screenshot_20210613_172155.thumb.jpg.210623be2cf98a146a1ae8b7c99a810e.jpg

 

Link to post
Share on other sites
38 minutes ago, cabalistic said:

You need to reset your darkmod.cfg, or specifically you need to enable in_grabMouse.

Thank you, it fully fixes that problem! I'd lose a lot of settings so I prefer keeping the old config, but every now and then options like this need to be reset. The new window and input manager seems to be working perfectly now: Need to play for longer and do more testing but so far this seems like another great success :)

I'd note only one little thing I just noticed: When alt-tab switching, the TDM window is properly minimized this time. But I noticed that if I leave the game running instead of pressing esc to go to the main menu, my GPU is still heating up, meaning the game is still rendering. If possible I'd disable the renderer while the window is minimized by the system.

  • Like 1
Link to post
Share on other sites

There is a little issue I keep running into every now and then: It seems that if you move the mouse too suddenly while looking around, the view will sometimes snap to a different angle and you find yourself facing the other way around. I assume it's the mouse cursor getting reset when an edge is touched too quickly, or something among those lines?

If any Linux user on KDE / Plasma can try out the dev build please help to confirm: If you keep moving the mouse rapidly and erratically across long distances, you should notice your view occasionally gets teleported the other way around.

Link to post
Share on other sites
2 hours ago, datiswous said:

Is this something that is related to this new window management, or was this already present with the regular 2.09(a) ?

I don't remember it ever happening before, it's likely the new window manager.

Also found another minor inconvenience, only worth addressing if it's easy to: While TDM is busy loading a new map, you can alt-tab switch to other windows... however it will not minimize and your mouse cursor remains stuck meaning you can't operate other windows in the OS. Would be nice if during loading the engine released your input devices when switching to other windows.

Edited by MirceaKitsune
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...