Cursor not properly captured on Linux multimonitor after 0.214.300 patch
EDIT (Admin): Check comment from the Admin MaCarBre further down.
Valheim on a Linux multimonitor system doesn't appropriately capture the cursor when building or using the hoe. It can move off-screen so instead of placing a build piece you wind up interacting with whatever is under the cursor on the other screen.
It's confirmed to be happening to multiple users with different distributions, kernels, video cards, drivers, and desktop environments. Vulkan or OpenGL. Vanilla or modded. VSync or no VSync. Different resolutions. Different worlds or characters. The only common factor is the 0.214.300 patch on a Linux miltimonitor system.
Yesterday I downgrated to 0.214.2 and confirmed the issue isn't present there in any configuration.
Comments: 70
-
13 Aug, '23
MaCarBre Admin PinnedHi Vikings,
The latest March 2024 patch (currently available for PTB testing) should fix most of the remaining mouse cursor capture issues that manifest on multiple Display setups. The patch will be pushed to main branch sometime this week (second week of April). -
22 Feb, '21
Henrik MergedSame issue. Arch Linux with KDE (Plasma 5.21). I run multiple monitors and the game is on the right. If I spin left with the mouse I can see the mouse cursor start to move across the second desktop. The WASD keys work and "stick" to the game, but if I try and block,etc...I can see KDE menus opening / closing, etc.... on the 2nd monitor.
1 -
24 Feb, '21
Matt MergedIssue occurs when the Player is in any screen that involves their inventory.
2 -
01 Mar, '21
RavenStroke MergedIt occurs all the time even when the inventory isn't open, it renders using the mouse impossible to move the camera around. Each time ou want to click to do an action, if the mouse position isn't in the bound of the game the game lose the focus and the window become un-interactive until you gain the focus again.
-
11 Mar, '21
Joseph D. MergedI am having this problem as well now. The game is to the point that it is completely unplayable, as any time i try to look around the cursor goes to another screen.
1 -
16 Mar, '21
CodAv MergedCan confirm the issue is also present on Linux using Vulkan. Happens randomly, but most times I experienced it was after minimizing the game or changing focus (Alt+Tab) to another application, then switch back to Valheim. After the issue appears, the mouse pointer isn't captured again by the game, making fighting almost impossible as the game will stop responding to any input if you accidentally click outside the window.
Maybe making the mouse pointer capture in Unity a bit more "aggressive" after reacquiring focus or doing it every time the player closes the inventory or menu should help with this. I can certainly live with pressing Tab twice if the issue happens. -
21 Mar, '21
RPaxton MergedNoticed this also on 4K monitor config w/Fedora 32, but if you resize down a level, the mouse pointer will align properly. Also note @ 4K resolution, the damn mouse pointer is very hard to track when opening menus (to click on potion...) and impossible in a snow storm. Need higher vis option or much bigger.
-
24 Mar, '21
Craig MergedI've started experiencing this bug as of 0.148.6, however the mouse flies out even when in-game, e.g. walking around, not just in menu.
-
07 Apr, '21
Oleg K MergedHappens even without any inventory
-
04 May, '21
Oles MergedI've had the same thing happen when changing resolution
-
09 May, '21
Dave MergedI have the same issue: My monitor is 5120x1440 (not selectable as a resolution in the game). So when I choose 3440x1440 and fullscreen, the mouse pointer and the effective click location don't match horizontally. Near the center of the screen, clicking items matches more or less. As more off-center, the worse it gets. To click an item in the inventory, I have to move the mouse into the black area left of the (game) screen to be able to click the item.
I guess there is an error with the fullscreen mode mixing up absolute and relative cursor positions.
(Ubuntu 21.04, Nvidia drivers) -
27 Oct, '21
Ruz MergedTo expand on the original description:
Sometimes (not always) after Alt-Tab to another app (e.g Discord), the game does not re-capture the mouse properly when it gets focus again. When this happens on a multi-monitor setup, moving the mouse left or right does cause mouse look to work in game, but also eventually causes the windows mouse pointer to move to an adjacent monitor. This is okay for looking, but as soon as you left click to do something in game, the mouse click on the second monitor takes the game out of focus and clicks whatever was under it on the second screen.
This makes the game unplayable until a restart, and that is even more irritating when you are hosting a multiplayer game with friends as it interrupts their game as well.
This will not be apparent in single monitor setups since the mouse can never move outside the bounds of the game on a single monitor and in full screen. -
27 Oct, '21
Ruz MergedI have this issue on Windows intermittently after Alt-Tabbing out of the game and back, with the game in full screen mode, and using multiple monitors.
Not clear to me if the root cause is platform specific or not, but platform aside, the symptoms seem similar to mine. -
16 Dec, '21
Broseidon MergedSame issue here with latest version of Pop_OS! (21.10). Game is by default detecting my monitor resolution as the total resolution of all my monitors.
-
08 Apr, '22
Nick Mergedissue occurs without any inventory or menus open too.
-
16 May, '22
Smiffe Admin MergedHi Cheyenne!
This does sound like a Streamlabs, exclusive window mode or fullscreen issue more than valheim.
I run 4 monitors on my PC along with Vulkan and I don't ever have this problem.
Try the setting [*] Fullscreen in the ingame settings and see if that helps.
Else send me a email @ Jens@irongatestudio.se and we can try to figure this one out =) -
19 Sept, '22
Elementum MergedSame issue here. Ubuntu 20.04, monitor is 5120x1440 and I was playing under 3440x1440 - fullscreen.
I found adding "-screen-height 1440 -screen-width 5120" to the steam launch options fixed the issue by matching the game resolution to my monitor resolution. -
30 Mar, '23
Victor MergedI have the same issue on my 2560x1440 monitor
-
01 Apr, '23
pat Mergedi have a 3 monitor setup and im running opensuse linux 15.4 I also have this issue and it started after moving from 0.213.4 to 0.214.3
The Issue also exists with valheim+.
The testing below was with NO MODs installed.
i have a
left monitor rotated 90 degrees 1200x900 (Unrotateing did not seem to help, But the game was already running and not restarted.)
main monitor 1920 x 1200
left monitor 1920x1200
My mouse cursor when using a native 1920x1200 on my main monitor is shifted from what it affects by several inches. Also the lower 1/4 will affect things normally, but they can be affected again further up on the screen.
When set to the default windowed at 1366x768 It works normal.
Manually setting the resolution to windowed and 1900x1150 makes the mouse cursor work fine. Its only broken if its windowed 1920x1200 or full screen at 1920x1200.
1920x1176 also works normally. This is what the game defaulted to when i tried 1919x1200.
I am on the valheim discord as raonowin#3980 -
01 Apr, '23
Jan MergedI have the same issue on Ubuntu 22.10 with 3 monitors. For me the mouse consistently behaves fine in the left half of the screen the game is on, but as soon as I pass the center, the game recognizes it as if it were in the left side of the screen, even though it displays the cursor at the correct location. In other words, the cursor seems to wrap back to the left edge of the screen at the halfway mark. In the attached screenshots, take note of where the mouse cursor is and what item is displayed as hovered.
Unfortunately this makes the game mostly unplayable, since interaction with most menus is affected (anything that displays buttons in the right half of the screen). -
02 Apr, '23
letonga MergedHappens to me in 2560x1080 after 0.214.300, very annoying, and yes also have secondary monitor to the right rotated 90° :-D, omg fix this please
-
02 Apr, '23
Dave MergedI have the same issue, plus when I'm building or in chests/inventory, the mouse is no longer locked to the window (multiple monitors)
-
04 Apr, '23
Smiffe Admin MergedDo any of you use any mods or is it pure vanilla?
-
04 Apr, '23
Jan Merged@Smiffe No mods on my end. I also noticed the same issue with another unity game today, so maybe this is an upstream bug.
-
04 Apr, '23
Sachy MergedI have this issue, no mods and only pure vanilla Valheim (0.214.300). I'm on KDE Manjaro Linux with Wayland, AMD 7950X CPU, 64GB DDR5 RAM, two monitors (main 2560x1440, second 1920x1080) with an AMD 7900XT GPU. Both monitors are horizontal aligned/mounted, not rotated.
Running on windowed 1920X1080 size has things working correctly with mouseover on menu items, but fullscreen at native resolution on my main monitor (2560x1440) has me unable to hover over menu items on the right of my screen. The mouseover seems to 'wrap', so when I move my mouse to the right of the screen, I can click on items on the left or mouseover them even though the mouse icon is on the right. It seems to correspond to the size of the secondary monitor. -
04 Apr, '23
Benjamin MergedI myself have never played the game with mods, nor any of the friends I play with, so I doubt mods are an issue here. Something I realize should have mentioned directly in the OP is that switching to default_old (in the "betas" setting in steam) also gets rid of the issue, so I'm almost certain it started with 0.214.300 (but that makes setting up multiplayer far harder).
-
05 Apr, '23
Eric MergedI'm having the same issue: Left monitor is horizontal@1920x1080, right is primary and horizontal@2560x1440. Seems once the mouse moves past 1920px, it begins to wrap back to the left side of the game.
Disabling the left monitor and starting the game causes the mouse to work properly. Re-enabling the monitor once the game is started leaves the mouse in a working state with the game.
No mods, pure vanilla 0.214.300
Manjaro Linux 22.1.0 -
06 Apr, '23
ffgz Mergedplese be aware that there seems to be a very related issue introduced with the 0.214.300 patch. details have been discussion on reddit ( https://www.reddit.com/r/valheim/comments/121kdji/mouse_cursor_issues_on_linux/ )
also there is another suggestion opened (that apparently seems to be deleted or under moderation?) here: https://valheimbugs.featureupvote.com/suggestions/436152/cursor-not-properly-captured-on-linux-multimonitor-after-0214300-patch -
12 Apr, '23
Victor MergedNo mods here
-
12 Apr, '23
Kit MergedI have the same exact issue with 3 monitors. I'm on Manjaro Kernel 6.1.23-1-MANJARO
KDE Plasma 5.27.4 -
15 Apr, '23
Jan MergedHey, just wanted to inform you that, after the 0.215.2 update, the default_old build is 0.214.3, which is unplayable on Linux due to this bug. Hence, the only build that still works on Linux is the pre-mistlands one. If you can't get this issue fixed quickly, please consider offering 0.214.2 via the Steam Beta feature so we have something to play.
1
After checking the Unity bugtracker for 5 minutes, I believe that this upstream issue is related to the issues in Valheim: https://issuetracker.unity3d.com/issues/ui-close-to-the-sides-of-the-player-is-not-interactable-when-the-player-is-pretty-wide-but-now-very-tall
That issue was found in 2020.3.36f1, and Valheim 0.214.3 updated Unity to 2020.3.45. The unity folks claim the bug is fixed in 2020.3.39f1, but either that's wrong or there are several related bugs. -
15 Apr, '23
Jan MergedI found a workaround: My native screen resolution is 2560x1440. I now start the game with custom launch options "-screen-width 2560 -screen-height 1439"; note that the height is off by one. Somehow this fixes the mouse cursor issue, and you can't really see the one missing row of pixels.
Edit: I retract that statement. While this does fix the "can't click on the right half of the screen" issue, now the cursor is not constrained to the screen anymore and keeps escaping to the right and left. If it does that, you can no longer control the game, so it is still unplayable this way. -
15 Apr, '23
letonga MergedI'm not not using any mods
-
16 Apr, '23
Lanspider MergedI have the same issue with a quad monitor setup but it only seems to happen when using the build hammer, Which makes it very difficult to build or repair.
-
16 Apr, '23
Mikey MergedThis historically has not been an issue for me. But after the most recent update, it is now an issue. It happens specifically when using the hammer or hoe. When right clicking to bring up the tool-specific menu, the mouse is no longer locked to the game window and you will frequently click outside the game. This is happening to me on Ubuntu 20.04. Also plenty of others on Discord with the same issue and different Linux setups.
-
20 Apr, '23
dagobertIX MergedI'm a little late to this, but i just reinstalled valheim on linux and encountered a similar issue: my mouse was highlighting items in settings that were well below where the cursor said it was. Also, in about the bottom 1/3 of the screen the mouse behaved completely normally.
After a little troubleshooting, I think I've narrowed it down to the xrandr command I use in the i3 config to set my monitors on boot: if I comment out the "--pos" flag, valheim behaves normally -
23 Apr, '23
TexZeTech MergedI too have this issue on Manjaro
Here is a video of what is happening to me, I play on mouse and keyboard.
https://www.youtube.com/watch?v=xsPBRgD_XNY
I have a three-monitor setup and didn't have this issue a few versions back.
My computer info is
Operating System: Manjaro Linux
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.1.25-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-3770K CPU @ 3.50GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1080/PCIe/SSE2 -
24 Apr, '23
Benjamin MergedI recently tried running the game in hyprland (instead of i3wm) which also works as a fix for the issue. I suspect that's because Wayland handles multi-monitor setups differently, though I'm no expert. I'm still gonna be stuck with the bug though because Wayland is still buggy on Nvidia. Curious if any of you can confirm/deny that your choice of window manager matters (especially X11 vs Wayland)?
-
08 May, '23
David MergedAlso affected by this issue, no mods, just bought the game and this is really souring my first impression.
1
You can temporarily work around it by using gamescope but i'd rather see this fixed. -
15 May, '23
BloodBlight MergedAny chance we can get a fix for this? I am on Pop OS 21 and having my second monitor enabled causes a few issues.
1
If I set my monitors to vertical (one above the other), the cursor will only work on the bottom of the screen (points to offset location when on the top).
Setting it to the side will randomly loose focus. -
24 May, '23
Le Barjack MergedThere's still a problem with the game failing to grab the mouse pointer.
1
To reproduce:
1. Open any in-game menu
2. Close the menu
3. The game fail to grab the pointer and you can freely move it on the second screen.
4. Move the pointer back to the game screen and it is successfully locked again on the right screen.
I think there's no reason to release the pointer on any menu, maybe the main menu set apart.
The game should keep the pointer locked (and that's usually what other games do). -
01 Jun, '23
Brandon Miller MergedArch with Gnome, still having this issue, though not exactly the same way...
When I try to build, pulling up the hammer is fine, building is fine, but when I change to a different thing to build, the mouse is not constrained. It moves across the screen about twice the speed as the... target build point?... moves. But only the first time, if, after selecting something to build, I flick off screen then back on, the mouse is properly captured.
I suspect this might be related to https://valheimbugs.featureupvote.com/suggestions/160644/resolution-and-mouse-pointer-position-issues-on-linux and the differences in how linux handles resolutions, but I don't know for sure.
linux 6.3.2-arch1-1
Arch
Gnome 44.1
Two monitors, 1920x1080 -
19 Jun, '23
Matt MergedThis is especially egregious when using the hammer to build on the public test because the true cursor becomes desynced with the virtual game cursor, so almost every time I try to build things, I end up clicking random things on my second monitor
1 -
20 Jun, '23
Conor MergedStill experiencing this issue with a PLPP monitor config, Linux Mint with Muffin WM. Completely vanilla game client. Forcing the Windows version and protonDB fixes the issue so it is a problem with the Linux game client. Tab navigation of the settings menus is also not working correctly, so it's impossible for me to test windowed mode.
-
25 Jun, '23
Anfo MergedOk, looks like this is my issue as well. Using Zorin 16.2 (fork of Ubuntu), and have a 3 monitor setup. Middle screen is 2560x1080.
Following video may assist the thread to explain our issue:
https://youtu.be/cU-k3Gdcgoc
While the cursor is on the right side of the screen, the inventory tiles on the left of screen light up. -
28 Jun, '23
Mikey Mergedwrong feature. sorry
-
28 Jun, '23
Mikey MergedYou can read up on multiple linux users having the same issues: https://www.reddit.com/r/valheim/comments/121kdji/mouse_cursor_issues_on_linux/
-
12 Jul, '23
SadViking MergedThis is still occurring in 2023. It makes playing the game extremely tedious. Every time I change items in the hammer build menu, I have to then move my cursor back over the game window, right click a second time, then click somewhere which is both not on the hammer menu yet still inside the game window. If not, the mouse cursor clicks items outside of the game on my desktop, causing all kinds of havoc. What's even worse than having to essentially perform double the actions every time I build something, is that if you switch to a weapon in the middle of this process your mouse gets gets stuck outside the game. I've died many times because I couldn't attack due to my mouse cursor being stuck outside the game. Game is essentially unplayable like this unless you have an extremely high tolerance for frustration, or enjoy feeling like you're in one of those dreams where you're trying to run, but you barely move no matter how hard you try to.
1 -
23 Jul, '23
Conor MergedI've discovered that this bug only affects the 1920x1080 resolution for me. On that resolution I experience the mouse bug in both windowed and fullscreen mode, but every other resolution works fine windowed or fullscreen.
-
10 Aug, '23
jc MergedSame issue on arch w/ latest KDE 5.27 and Wayland (also happens on X11).
Extremely annoying bug to play through on Linux.