HGL
deep-jade

Force game to use "real xOrg" to fix multi monitor cursor issue

Hi I've been racking my brain and annoying the hell out of chat gpt trying to figure out a way to fix this odd issue with my osu client where my cursor shows outside the game window. Ik it's doing this cause if I put my desktop cursor all the way to the left the game cursor shows up on the right edge of the window. This doesn't happen with the game on my other monitor but that monitor is a portrait monitor which I do not want to play games on as it's lower refresh rate. I believe that linux is treating the secondary portrait monitor as the primary monitor internally since it's HDMI while my higher refresh rate monitor is connected via display port and without manual config edits to hyprland it would set workspace 1 to my secondary monitor. I've been troubleshooting this for like over 2 hours now and the only solution I think could possibly work at the recommendation of chat gpt is to use gamescope to run the game in a xorg server so it has a dedicated single internal display for coordinate mapping but adding the args to heroic seems to not be working. Case and point I added -f as an argument which made the game show up fullscreen but then trying to use -f -r 165 -e --xwayland-count 0 as arguments breaks the fullscreening of -f which leads me to believe that something is breaking down when I do this. I'm kind of at my wits end with this rn but I need to get this issue resolved so I can actually work on the reported issues with my game client as this is not an issue that was reported but rather something specific to me as most of my users are windows users. This is my own custom build of this free game but I cannot work on building it natively for linux just yet as I'm not familiar with the process and this codebase is just... absolute spaghetti.
3 Replies
multiple-amethyst
multiple-amethyst2w ago
Can you try rephrasing just the original symptom you're trying to address? Because I don't quite understand.
deep-jade
deep-jadeOP2w ago
basically, my game client cursor shows offscreen to the right when it's on my primary monitor that is placed to the right of my secondary monitor. When the game is on the secondary monitor the cursor shows up on screen fine but that secondary monitor is in portrait mode as is used more for reading discord, browsing the web or watching videos and not for games or my primary focus. I've tried SEVERAL things to fix this including adding the following to my hyprland config:
xwayland {
use_nearest_neighbor = true
force_zero_scaling = true
}

cursor {
no_hardware_cursors = true
}
xwayland {
use_nearest_neighbor = true
force_zero_scaling = true
}

cursor {
no_hardware_cursors = true
}
and adding WINE_MOUSE_WARP_OVERRIDE as an environment variable set to enable, disable, and force. I've also toggled raw input both on and off yet nothing seems to fix this issue. My last hope was running the client in an xOrg server so it only sees a single screen dedicated to running the game hopefully fixing any coordinate mapping issues. the problem is that I think something is breaking down when I use the args cause adding just -f causes the game to start fullscreen which is expected but using -f -r 165 -e --xwayland-count 0 causes that behavior to break and the cursor issue still persists. Doing just --xwayland-count 0 also doesn't seem to do anything but that's what I found for running a game via xOrg on wayland unplugging my second monitor allows the cursor to show up in the correct place. Oddly tho it's not tracking my tablet input. And when I pressed the super key by accident which open the runner dialog I had to switch workspace for it to grab my cursor again. just weird behavior Any help?
multiple-amethyst
multiple-amethyst2w ago
Sorry, I've got no idea. Something to bear in mind with Wayland is that any workarounds like this that you find may work under one compositor but not others. Also xwayland is already running xorg on wayland, so I'm not sure what you mean by "real xorg".

Did you find this page helpful?