portal2 icon indicating copy to clipboard operation
portal2 copied to clipboard

Mouse aim is broken on Linux when scaled fullscreen is used

Open henrym11106 opened this issue 3 years ago • 3 comments

system info, Ryzen+R9 390 using AMDGPU

It seems that something in the Feb. 19 update might have broken scaled fullscreen on Linux, at least with AMD GPUs. I have not been able to test Nvidia. I meant to open this issue sooner.

while playing with non-native resolution fullscreen stretch, mouse movement input is ignored below a certain velocity, making mouse aim inconsistent and uncomfortable in addition to a messed up sensitivity ratio. this is most obvious at low mouse DPI and high sensitivity.

also, changing to a reduced res fullscreen in-game now forces a monitor mode change; setting 1152x864 fullscreen in-game forces my 144Hz monitor to power cycle, changing to 1152x864 75Hz. after that the cursor no longer lines up in the menus, seemingly behaving as though it's still mapped to the native res and is effectively off-screen a lot of the time and not interacting with where it is pointing. alt-tabbing out and back resets the display to 1080p 144Hz while the game stays at the selected 1152x864 fullscreen stretch and restores pointer functionality. aim input remains broken.

launching the game with a reduced res fullscreen still causes the display power cycle but monitor mode stays at 1080p 144Hz and the cursor works in menus.

testing on the Radeon driver: the monitor doesn't change modes and the cursor is always accurate, but mouse aim input is still broken when scaling is in use.

this is consistent when using both steam-native and runtime on Linux, Vulkan and GL.

I was already replaying Portal 2 with 4:3 stretch res when the update happened so I know this behavior is mostly new. what isn't new is the mouse sensitivity ratio never made sense in this game in my experience on Linux. CSGO is always 1:1 and matches Windows 10, older Source games on Linux the ratio is sensitivity=half of CSGO to get the same cm/360, but Portal 2 needed a significantly higher value than CSGO. I suspect this might have only been the case when using scaled fullscreen.

Native fullscreen and windowed mode appear to always be flawless, though. no odd behavior, reliable 1:1 mouse sensitivity ratio, and the new -vulkan mode not only otherwise runs great but also fixes an ambient light+shadow bug I never noticed before.

henrym11106 avatar Mar 18 '21 19:03 henrym11106

Is your m_rawinput value set differently between CS:GO and Portal 2?

Joshua-Ashton avatar Mar 18 '21 20:03 Joshua-Ashton

Other than that, the -vulkan mode will actually scale differently as it doesn't keep your native resolution there (the GL path upscales).

If you set m_rawinput to 1 it should be the same regardless of resolution however.

Joshua-Ashton avatar Mar 18 '21 20:03 Joshua-Ashton

I tested with and without, m_rawinput 0 results in extreme low sensitivity. I normally use m_rawinput 1 and no mouse acceleration anywhere. I guess the ultra low sens behavior with rawinput 0 is the result of having a mouse DPI of 2000 plus low game and desktop sensitivity and it seems to happen regardless of display and rendering mode.

mouse aim with m_rawinput 1 is normal when playing in native-res fullscreen or running in a window.

henrym11106 avatar Mar 18 '21 20:03 henrym11106