gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

VAC Unable to verify game session in cs2

Open pranshuthegamer opened this issue 2 years ago • 17 comments

image This error occurs when i launch cs2 using gamescope. If i launch after not using gamescope, it takes a few minutes for this error to show up. I can join a game without gamescope, and when i rejoin it using gamescope, in a few minutes it will kick me.

pranshuthegamer avatar Dec 20 '23 17:12 pranshuthegamer

I am experiencing the same thing, launching game with Gamescope causes VAC to be unable to verify game session. I can't get the game to verify my game session again unless I remove the launch option & completely restart steam. I hope their is something to mitigate this issue because CS2 is unable of stretching 4:3 aspect ratios & is very finicky with fullscreen on curtain desktop environments.

ZacharyVarney avatar Jan 04 '24 14:01 ZacharyVarney

Can confirm it's something to do with the latest version of gamescope as downgrading it back a version makes the issue go away.

ZacharyVarney avatar Jan 05 '24 02:01 ZacharyVarney

Can you please state which exact versions you are and aren't seeing the problems with?

misyltoad avatar Jan 05 '24 09:01 misyltoad

Yes sorry for not clarifying, the issue happens with 3.13.19 & stopped once I downgraded to 3.13.17, 3.13.18 wasn't in the list of downgradable versions for me with the downgrade tool on Arch Linux.

ZacharyVarney avatar Jan 05 '24 12:01 ZacharyVarney

Same issue, but downgrading to 3.13.17 does nothing.

fmbearmf avatar Jan 06 '24 22:01 fmbearmf

Same issue, but downgrading to 3.13.17 does nothing.

Strange, did you fully restart Steam after downgrading? I only say that because the way I was able to narrow down the issue to Gamescope was removing the launch option then restarting Steam entirely.

ZacharyVarney avatar Jan 06 '24 22:01 ZacharyVarney

Can confirm this issue as well.

MuhammedKpln avatar May 07 '24 23:05 MuhammedKpln

I can also confirm this happens across multiple different distros & multiple different DE/WM's X11 & Wayland. The only thing that makes it work again is downgrading the version & restarting Steam after.

ZacharyVarney avatar May 08 '24 03:05 ZacharyVarney

I'm also getting this on bazzite and only when adding the gamescope launch option to steam.

Poltergeisen avatar Jul 27 '24 17:07 Poltergeisen

Same issue on gentoo using build version 3.14.22

io-Athena avatar Jul 27 '24 20:07 io-Athena

Same issue here on Arch. Tested with 3.15.11 and 3.15.5

wieto avatar Sep 27 '24 18:09 wieto

Same here on Gentoo

[U] gui-wm/gamescope Available versions: (~)3.15.5

Any solution found for this ?

sandikata avatar Oct 17 '24 02:10 sandikata

This commit seems to be the culprit. I'm trying to build version 3.14.19 in my machine and then revert that change or modify it, but I'm having troubles on building.

caioob avatar Oct 22 '24 19:10 caioob

I tried building gamescope from source rather than using the packaged version in Nobara (which I believe uses the same repos as Fedora) and when using the gamescope built in my machine the error goes away.

Version packaged in the repositories:

gamescope --version [gamescope] [Info] console: gamescope version 3.15.9-1-gcc28cd7+ (gcc 14.2.1)

Version built from source

./gamescope --version [gamescope] [Info] console: gamescope version 3.15.9-20-g056b79e (gcc 14.2.1)

EDIT: I tried building versions 3.15.13 (latest as of 24/10/2024) and 3.14.19 and both worked as well.

tldr; Try uninstalling the gamescope version packaged by your distro and build it by source. Although @io-Athena said he's having problems on gentoo, so that's weird

caioob avatar Oct 24 '24 13:10 caioob

Replying to https://github.com/ValveSoftware/gamescope/issues/1065#issuecomment-2435289476

interesting... i built gamescope from tag 3.15.13 (on gentoo), only difference being:

add_project_arguments([
  '-DWLR_USE_UNSTABLE',
+  '-I/usr/include/stb/deprecated'
], language: 'cpp')

built fine:

bear@bear gamescope % ninja -C build
ninja: Entering directory `build'
[556/556] Linking target src/gamescopectl

and yet: image

im completely stumped lol.

here are my launch flags: gamescope -h 1920 -w 2560 -S stretch -r 165 -f -- %command%

fmbearmf avatar Dec 15 '24 01:12 fmbearmf

Replying to https://github.com/ValveSoftware/gamescope/issues/1065#issuecomment-2543403942

Did you make sure to remove all other gamescope installations?

caioob avatar Jan 04 '25 17:01 caioob

im on bazzite and gamescope is installed by default... is there no fix for this?

Poltergeisen avatar Feb 11 '25 20:02 Poltergeisen

Just ran into this on Arch. #908 points to the problem occuring when the CAP_SYS_NICE cap is set on the gamescope binary. Which also seems related to #107 and maybe #697

I just checked Gentoos ebuild and it does set CAP_SYS_NICE by default, Arch does not. @fmbearmf try removing the nice cap from /usr/bin/gamescope and retest. This raises the question if all Arch users in this issue have manually added the nice cap, which I think is true.

Yesterday I tried it with the nice cap, resulting in VAC Unable to verify game session, today I tried it without the nice cap and I did not get any error, all good.

The problem here with testing is because VAC probably caches the state for minutes or even hours, so for example if you get the VAC verify error, exit cs2, even completely remove gamescope from the launch options and retest, you will still get the error (when you technically should not get it anymore). So, remove the nice cap, wait X time (for me it was a day) and it should work.

Also I don't think the cap itself is a problem for VAC, my guess it is related to #107 & #697 where some LD_PRELOADed libs don't get loaded (which are required for VAC), something in this direction.

incognico avatar Feb 18 '25 12:02 incognico

@incognico , would this be an issue on bazzite as well with a pre-installed gamescope and no ability to change system capabilities because of a read only root filesystem? For some reason I'm also getting hit by these VAC issues, but I haven't run any commands to set this.

I successfully played a few games earlier, then it stopped working again randomly today after messing with a few more launch options

ageisen2000 avatar Feb 25 '25 05:02 ageisen2000

@ageisen2000 No idea but sounds possible. I don't know bazzite. Also it could be a problem only with more recent versions of gamescope while older ones work. Maybe worth a try: LD_PRELOAD="" gamescope -- LD_PRELOAD="$LD_PRELOAD" %command%. Otherwise the only current solution is to remove the nice capability.

incognico avatar Feb 27 '25 10:02 incognico

Replying to https://github.com/ValveSoftware/gamescope/issues/1065#issuecomment-2665614906

I remember messing with CAP_SYS_NICE, don't remember exactly what I did, but it would make sense... I might try to replicate it later

caioob avatar May 07 '25 15:05 caioob

This happened to me after i set

sudo setcap 'cap_sys_nice=eip' /usr/bin/gamescope

It messes with LD_PRELOAD and leading VAC unable to verify session

do

sudo setcap -r /usr/bin/gamescope

and restart your computer. It works after that, even if you use LD_PRELOAD="" as launch parameter

I did cap_sys_nice=eip to try to remove stuttering bug after ~30 minutes of playing. But dont use that, just remove it and use LD_PRELOAD="" if you want

DavutHaxor avatar May 27 '25 12:05 DavutHaxor