csgo-osx-linux icon indicating copy to clipboard operation
csgo-osx-linux copied to clipboard

Fullscreen resolution is locked to native when -vulkan is used

Open henrym11106 opened this issue 3 years ago • 32 comments

system info, basically AMDGPU, Arch, xorg

Changing resolution is not possible except in windowed mode, where 640x480 is an option.

it is possible to launch in windowed mode with a non-native res via launch options, e.g. -vulkan -windowed -w 1024 -h 768 but the in-game settings menu remains broken.

-w and -h launch options are ignored when running fullscreen, native monitor resolution (1080p in this case) is always forced.

other than that, -vulkan seems to generally work. also a few issues specific to Linux are not present with Vulkan.

henrym11106 avatar Dec 15 '21 03:12 henrym11106

system info Having the same issue, but on my setup it's even more hilarious, resolution is fixed to side screen's one which is rotated result: image

Lumpiasty avatar Dec 15 '21 12:12 Lumpiasty

@Lumpiasty probably the rotated screen is identified as the primary one?

romanstingler avatar Dec 15 '21 12:12 romanstingler

Yeah, but only with -vulkan. In 'normal' opengl mode it's getting correct resolution (or wrong one, depends on how you look at it) without changing anything (just tested that by deleting video.txt and videodefaults.txt). In vulkan it's impossible to me to even change resolution. Also that shows this is actual problem before someone yells "buy better pc", "why did u buy 4k" or "u deserve that for cheating 4:3"

Lumpiasty avatar Dec 15 '21 13:12 Lumpiasty

@Lumpiasty nobody will tell you to buy new hardware, and also a lot of ppl. (me included) play 4:3. The issue where only the native resolution is available has already been filed.

I totally forgot to ask if you can check Wayland and Xorg. Probably you are using Wayland and the resolution is just taken from the primary screen, and for now (Vulkan being experimental) changing the resolution is not an option.

If you want to test Vulkan you could change primary and secondary in your DE and set the resolution in the DE before starting the game.

romanstingler avatar Dec 15 '21 13:12 romanstingler

Sorry for that, didn't mean to offend you

I'm running Xorg.

Lumpiasty avatar Dec 15 '21 14:12 Lumpiasty

Same issue here on Gentoo

System Info: https://github.com/shoober420/rootscripts/blob/main/home/shoober420/sysinfoamd

shoober420 avatar Dec 16 '21 12:12 shoober420

I should add that fullscreen resolution is locked to whatever the desktop res is, probably whatever is identified as display or desktop 0 (or 1?)

I have found it is possible to play 4:3 stretch on vulkan and xorg by changing the desktop to the desired res and scaling that to fullscreen. I wrote a small two-line .sh file to do that:

#!/bin/bash xrandr --output DisplayPort-0 --primary --mode 1920x1080 --scale-from 1024x768 --rate 144 --pos 0x0 --set TearFree off

just played a few 1000+ point rounds of official FFA DM with that so I guess it works fine. it's also possible to just change monitor res but my display only does high refresh at 1080p.

to disable scaling I have another executable .sh:

#!/bin/bash xrandr --output DisplayPort-0 --primary --mode 1920x1080 --transform none --rate 144 --pos 0x0 --set TearFree off

henrym11106 avatar Dec 17 '21 22:12 henrym11106

@henrym11106 FYI you can put these two commands directly in CS:GO launch options to avoid running two different scripts. In your case the launch options would be:

xrandr --output DisplayPort-0 --primary --mode 1920x1080 --scale-from 1024x768 --rate 144 --pos 0x0 --set TearFree off; %command% -vulkan -novid; xrandr --output DisplayPort-0 --primary --mode 1920x1080 --transform none --rate 144 --pos 0x0 --set TearFree off

guihkx avatar Dec 20 '21 10:12 guihkx

I didn't know it was possible to set exit options like that. works great thanks!

henrym11106 avatar Dec 24 '21 06:12 henrym11106

For me it runs as full screen but I can't change the resolution to -w 1024 -h 768. 😢

image

aristotelesbr avatar Mar 22 '22 22:03 aristotelesbr

it's important for me,

0xdeface avatar Mar 30 '22 23:03 0xdeface

CSGO now launches with desired resolutions, and isn't locked at 1920x1080 anymore for me.

shoober420 avatar Apr 21 '22 22:04 shoober420

CSGO now launches with desired resolutions, and isn't locked at 1920x1080 anymore for me.

Are you sure you're launching the game with -vulkan, though? There hasn't been any update to libdxvk_d3d9.so, which handles display configuration, so it still doesn't work for me.

guihkx avatar Apr 21 '22 22:04 guihkx

@guihkx I'm using -vulkan and -w 1024 -h 768 in my launch options. Are you using X11 or Wayland? I'm on Wayland / Sway git master.

shoober420 avatar Apr 24 '22 21:04 shoober420

@guihkx I'm using -vulkan and -w 1024 -h 768 in my launch options. Are you using X11 or Wayland? I'm on Wayland / Sway git master.

I'm also on Gentoo, and tested with Wayland/{sway 1.7, sway git}, both of them doesn't work for me. 2204301326

sway git version is sway version 1.8-dev-a7898637 (Apr 30 2022, branch 'master') the launch opt is -vulkan -w 1024 -h 768 System info is here

rywng avatar Apr 30 '22 05:04 rywng

Still no functionality for me. Arch and x11. are you 100% certain that CSGO is indeed launching in Vulkan mode? if you are using an AMD GPU one way to check is if fancy gloves render correctly. black and shiny = gl ( see #2102 )

henrym11106 avatar Apr 30 '22 08:04 henrym11106

I'm using an intel integrated GPU and I also can't change the resolution.

tati-frog avatar Jul 23 '22 19:07 tati-frog

i also have this problem and its so annoying, i have to change my resolutions through kde system settings and when open the game, like that i can play but when i alt+tab everything is in 800X600 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

FelipeFMA avatar Jul 24 '22 13:07 FelipeFMA

Still locked on native resolution Arch x11

grishatop1 avatar Aug 23 '22 16:08 grishatop1

Still locked on native resolution on POP_OS 22.04 LTS with XORG -1050TI

czky avatar Oct 14 '22 16:10 czky

Still locked on Arch, x11 and nvidia 1660Ti mobile gpu

ak4wa1 avatar Oct 15 '22 20:10 ak4wa1

Same problem here. Ubuntu 20.04

emitowww avatar Oct 28 '22 22:10 emitowww

I guess will have to wait for source 2 with native vulkan 🤷

grishatop1 avatar Oct 29 '22 12:10 grishatop1

Damn, it's so easy to fix I guess, but it seems like valve is don't fukin care about linux users :(

Blu3cr0ss avatar Oct 29 '22 21:10 Blu3cr0ss

@henrym11106 FYI you can put these two commands directly in CS:GO launch options to avoid running two different scripts. In your case the launch options would be:

xrandr --output DisplayPort-0 --primary --mode 1920x1080 --scale-from 1024x768 --rate 144 --pos 0x0 --set TearFree off; %command% -vulkan -novid; xrandr --output DisplayPort-0 --primary --mode 1920x1080 --transform none --rate 144 --pos 0x0 --set TearFree off

Sadly this does not seem to work with wayland?

➜ ~ xrandr --output XWAYLAND1 --primary --mode 1920x1080 --scale-from 1280x720 --rate 144 --pos 0x0 --set TearFree off; X Error of failed request: BadName (named color or font does not exist) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 11 (RRQueryOutputProperty) Serial number of failed request: 28 Current serial number in output stream: 28

Any suggestions how to fix this? Running arch-zen with Wayland on KDE.

nqnm avatar Dec 30 '22 00:12 nqnm

the only workaround for me was temporary changing desktop resolution before running the game on xorg 1:7.7+23ubuntu2 , 22.04 , KDE , i7-1165G7, T14sG2i

karakuraizer avatar Jan 18 '23 19:01 karakuraizer

Any workaround for sway (wayland) users?

ardadem avatar Feb 08 '23 09:02 ardadem

Any workaround for sway (wayland) users?

You can use gamescope

sawb avatar Feb 26 '23 21:02 sawb

Any workaround for sway (wayland) users?

If you need sway, you can use gamescope, if you are using Hyprland you can use the csgo-vulkan-fix plugin.

You can of course also patch sway, theoretically, but that's not ideal.

vaxerski avatar Feb 27 '23 16:02 vaxerski

You can use gamescope

this is not a solution, as gamescope has resolution issues if you use HiDPI Plagman/gamescope#551 Plagman/gamescope#796

4e554c4c avatar Mar 01 '23 03:03 4e554c4c

So, if you want to run csgo in a different resolution but that resolution's refresh rate is bad, you have to scale you display. Here is how I play like simple on linux using just launch options (at least the resolution is the same ):

xrandr --output DP-4 --scale 0.6667x0.8889; %command% -novid -nojoy -vulkan; xrandr --output DP-4 --scale 1x1

Also, be aware that if you disable in-game overlay you will get a pretty big fps drop after a while because... valve does not have a lot of money to pay developers since they are a very poor company which barely makes money out of CSGO, we should be grateful that they are porting CS to this 8 year old engine. Although we do have AR/VR glasses every 6 months that render perfect models with 5 polygons for 10 mins before you through up and asfixiate in your own regurgitated, acid, vomit.

fpaboim avatar Apr 20 '23 14:04 fpaboim

got it working after selecting steam linux runtime 2023-07-13T21:38:41,784686008+02:00 and putting -nojoy -novid -fullscreen in launch options

Mewsen avatar Jul 13 '23 19:07 Mewsen