Jump to content
The Dark Mod Forums

Linux testers needed: new window management and input handling


cabalistic

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 comment
Share on other sites

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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
Share on other sites

I seem to have found a clue about the view snapping issue: It only appears to take place after I alt-tab switch to another window then back to TDM. It doesn't appear to happen if I open DarkMod without switching to anything else, but once I do and return to the game moving the view in certain positions causes the cursor to snap and turn the view around (the effect can also be seen in the main menu). Any other KDE Plasma users who can help confirm this please?

Link to comment
Share on other sites

  • 2 weeks later...

Found another important clue by accident. The mouse resetting issue appears to occur when I refocus TDM from the taskbar. So if I put the cursor at the bottom of the screen to make the panel show then click on DarkMod's icon to re-maximize it, I encounter this annoyance... if I have the desktop selected and use alt-tab switch to bring the window back, it seems to work fine then.

Link to comment
Share on other sites

  • 1 year later...
5 hours ago, duzenko said:

@cabalistic Why GLFW_CURSOR_DISABLED?

For me it causes the mouse cursor to never move unless the cursor is released for e.g. game console. I'm changing to GLFW_CURSOR_HIDDEN as that seems to be the intended flag.

https://stackoverflow.com/questions/4431637/hiding-mouse-cursor-with-glfw

Have you read the docs? https://www.glfw.org/docs/3.3/group__input.html

GLFW_CURSOR_DISABLED is very much intentional.

It should release the mouse cursor automatically if you alt+tab out of the window, so this is the intended behaviour for regular users. There should be a cvar to keep it ungrabbed for dev work, iirc.

Link to comment
Share on other sites

On 7/26/2022 at 4:49 AM, cabalistic said:

Have you read the docs? https://www.glfw.org/docs/3.3/group__input.html

GLFW_CURSOR_DISABLED is very much intentional.

It should release the mouse cursor automatically if you alt+tab out of the window, so this is the intended behaviour for regular users. There should be a cvar to keep it ungrabbed for dev work, iirc.

Is there any way to get mouse cursor working with GLFW_CURSOR_DISABLED in my VM? It only works with GLFW_CURSOR_HIDDEN for me.

Link to comment
Share on other sites

Hello, i  use debian 10 lxcd , i played TDM before and just reinstalled it with the common linux64 installed wich gave me TDM 2.10/ 64 #9583 (i hope i mention the number correct)

it did crash severall times but it takes 85% off my CPU anyway, an 'all a board'.

I think the refresh off variables migth be problem. the simplest view on that is after restarting an quick-save with F9

so i save F4 and If i walked out of a real dark spot and get killed by a guard with a bright lamp, then the NEXT RESTART WILL start with an ILLUMINATED! surrounding, meaning that the DARK spot is enlighted for about 1-3 seconds before the engine dimms ligths again.

if i restart a second time (without doing anyting) it DOES start with that dark athmosphere as which its saved with.

Probably this means that the active environment variables are NOT saved but calculated and MAYBE these variable are just not wiped OR my system is slow and i should wait for say 10-20 seconds to give the engine some time to wipe old variables and only THEN restart with F9??

but it migth very well be related to other slow down moments.

I do some z80 and smal c things, so i have a little bit of an idear how it could work. and its very complex indeed!

Edited by CrisiusXIII
Link to comment
Share on other sites

  • 5 weeks later...
On 8/3/2022 at 11:08 PM, CrisiusXIII said:

so i save F4 and If i walked out of a real dark spot and get killed by a guard with a bright lamp, then the NEXT RESTART WILL start with an ILLUMINATED! surrounding, meaning that the DARK spot is enlighted for about 1-3 seconds before the engine dimms ligths again.

This is a known issue, but has nothing to do with the 2.10 new window management and input handling.

Link to comment
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.


  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...