You are not logged in.

#1 2025-06-02 18:01:24

chared
Member
Registered: 2024-09-17
Posts: 14

No display after changing resolution in a game

I recently downloaded Counter Strike 2 and wanted to play with the stretched resolution (aspect ratio - 4:3 , 1280x960), the moment I switched to the resolution the whole screen went blank. The only thing I can access are the TTYs. I previously used to play this game on Windows and had to make a custom resolution for this, as this resolution was not supported on my device. I've posted a video to give you guys more insight on what is happening.

I don't have any knowledge of troubleshooting problems like these, as I've never got into one like this before, But i tried to run-

$ xrandr
Can't open display

Which of course stopped me from trying Arch Wiki: Adding undetected resolutions.

I couldn't add detailed results of my inxi -GxxSMCA etc, so I've tried to add relevant information below. Please feel free to ask for more info about my system-

Device Name - Lenovo Ideapad Gaming 3
Display Server - X11
Display Manager - SDDM
Window Manager - KWin
Desktop Environment - KDE Plasma
VGA compatible controller : AMD Cezanne (Radeon Vega Mobile Series) ---> Processor : AMD Ryzen 5600H
3D-Controller - Nvidia Gtx 1650 Mobile

$ nvidia-smi

     ---->Driver : 570.153.02
            Processes : /usr/lib/Xorg

Adding the contents of both /var/log/Xorg.0.log and ~/.local/share/xorg/Xorg.0.log respectively:
https://pastebin.com/raw/XTgMHk3M
https://pastebin.com/raw/zf1feuYm

[UPDATE - 1]
Followed this.
But now:

$ xrandr 
Authorisation required, no authorisation protocol specified 

Can't open display :0

Last edited by chared (2025-06-02 19:54:47)

Offline

#2 2025-06-02 21:23:56

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: No display after changing resolution in a game

"Can't open display" means unset DISPLAY means this is very most likely a wayland session?

loginctl session-status

Alternatively: this is not gonna work from the console either.

That being said:

[    22.263] (EE) modeset(0): Failed to set CTM property: -13
[    22.263] (EE) modeset(0): failed to set mode: No such file or directory

certainly failed to set some mode.

Can you not reach the graphical target even after a reboot?

Offline

#3 2025-06-03 05:20:26

chared
Member
Registered: 2024-09-17
Posts: 14

Re: No display after changing resolution in a game

seth wrote:

"Can't open display" means unset DISPLAY means this is very most likely a wayland session?

I will update you with more info after I get back from uni ( I don't have my pc on me right now ). Though, I am quite certain about not using wayland as I don't have any configuration files concerning wayland on my pc.

About the problem where some mode is not being set, I got the same thing recommended by a reddit user under this post of mine.

Last edited by chared (2025-06-03 05:22:07)

Offline

#4 2025-06-03 17:34:43

chared
Member
Registered: 2024-09-17
Posts: 14

Re: No display after changing resolution in a game

seth wrote:

That being said:

[    22.263] (EE) modeset(0): Failed to set CTM property: -13
[    22.263] (EE) modeset(0): failed to set mode: No such file or directory

certainly failed to set some mode.

Can you not reach the graphical target even after a reboot?

So, I booted into my arch installation after I got back from uni and found out that the problem was no longer there. I was wondering about how it worked and what went wrong, I changed my resolution to 1280x960 (by going into the display configuration menu in system settings) and I could reproduce the problem. Then I opened the TTY (ctrl + alt + fn3):

1>. Checked the Xorg logs and found that the default mode my display runs on is

 [  3388.547] (II) modeset(0): Modeline "1920x1080"x120.2  285.00  1920 2028 2076 2076  1080 1090 1100 1142 -hsync -vsync (137.3 kHz eP) 

Now, I am assuming this is the default mode because I observed these things in my Xorg log (before I forced 1280x960 to replicate the issue):

[  3388.547] (II) modeset(0): EDID for output eDP-1
[  3388.547] (II) modeset(0): Manufacturer: LEN  Model: 9059  Serial#: 0
[  3388.547] (II) modeset(0): Year: 2019  Week: 34
[  3388.547] (II) modeset(0): EDID Version: 1.4
[  3388.547] (II) modeset(0): First detailed timing is preferred mode
[  3388.547] (II) modeset(0): Preferred mode is native pixel format and refresh rate
[  3388.547] (II) modeset(0): Display is continuous-frequency
[  3388.547] (II) modeset(0): Supported detailed timing:
[  3388.547] (II) modeset(0): clock: 285.0 MHz   Image Size:  344 x 193 mm
[  3388.547] (II) modeset(0): v_active: 1080  v_sync: 1090  v_sync_end 1100 v_blanking: 1142 v_border: 0

So I would assume that either there is something wrong with my graphics driver (amdgpu) or this resolution is not properly configured in X. I think it is the former because I've mentioned in the post that this resolution wasn't provided out of the box in Windows as well, I had to make a custom resolution with the CRU utility to set it.

To get stuff running I just ran

 sudo pkill X 

2-3 times and I got into KDE in the 4th try.

Also, my guess on why xrandr can't open any display is because the connection with video bus has been removed after this happens:

[  3394.843] (II) modeset(0): Allocate new frame buffer 1280x960 stride
[  3395.413] (II) event3  - Power Button: device removed
[  3395.425] (II) event8  - Video Bus: device removed

Now this leaves us with some questions-
1. Why do we have to restart X n number of times, before we (hopefully) get back to our graphical target? Is there a sure shot way to fix this?
2. Why won't 1280x960 work?

Offline

#5 2025-06-03 19:26:17

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: No display after changing resolution in a game

1. https://wiki.archlinux.org/title/KDE#Un … lution_set ?
2. please post your entire xorg log after setting the bogus mode, also from the console on tty3, run

DISPLAY=:0 xrandr --verbose | tee /tmp/xrandr.txt

and post that file.

Offline

#6 2025-06-03 20:00:12

chared
Member
Registered: 2024-09-17
Posts: 14

Re: No display after changing resolution in a game

seth wrote:

1. https://wiki.archlinux.org/title/KDE#Un … lution_set ?
2. please post your entire xorg log after setting the bogus mode, also from the console on tty3, run

DISPLAY=:0 xrandr --verbose | tee /tmp/xrandr.txt

and post that file.

Regarding the first point, the config settings in kscreen directory coincide with my default 1920x1080_120Hz mode. So there is no discrepancy there.

Regarding the second point, I swtiched over to tty3, logged in, ran the command and got:

$ DISPLAY=:0 xrandr --verbose | tee /tmp/xrandr.txt
Authorisation required, but no authorisation protocol specified.
Can't open display :0.

File /tmp/xrandr.txt is empty.

Also, here is the Xorg.0.log when I switched to that bogus mode. https://pastebin.com/raw/3M4A0wr6

Offline

#7 2025-06-03 20:19:33

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: No display after changing resolution in a game

Ah, you're using SDDM which puts the XAUTHORITY in a random location.
Look up "echo $XAUTHORITY"  in the X11 session and use that - nb. the value will change w/ every login.

edid-decode (hex):

00 ff ff ff ff ff ff 00 30 ae 59 90 00 00 00 00
22 1d 01 04 a5 22 13 78 03 48 35 8f 57 59 92 29
1e 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 54 6f 80 9c 70 38 3e 40 6c 30
aa 00 58 c1 10 00 00 18 00 00 00 0f 00 00 00 00
00 00 00 00 00 00 00 00 00 20 00 00 00 fe 00 4c
45 4e 4f 56 4f 0a 20 20 20 20 20 20 00 00 00 fe
00 4c 45 4e 31 35 36 46 48 44 20 20 20 20 00 3c

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.4
  Vendor & Product Identification:
    Manufacturer: LEN
    Model: 36953
    Made in: week 34 of 2019
  Basic Display Parameters & Features:
    Digital display
    Bits per primary color channel: 8
    DisplayPort interface
    Maximum image size: 34 cm x 19 cm
    Gamma: 2.20
    Supported color formats: RGB 4:4:4
    First detailed timing includes the native pixel format and preferred refresh rate
    Display supports continuous frequencies
  Color Characteristics:
    Red  : 0.5595, 0.3398
    Green: 0.3496, 0.5703
    Blue : 0.1601, 0.1201
    White: 0.3134, 0.3291
  Established Timings I & II: none
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  1920x1080  120.212992 Hz  16:9    137.283 kHz    285.000000 MHz (344 mm x 193 mm)
                 Hfront  108 Hsync  48 Hback    0 Hpol N
                 Vfront   10 Vsync  10 Vback   42 Vpol N
    Manufacturer-Specified Display Descriptor (0x0f): 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 20 '............... '
    Alphanumeric Data String: 'LENOVO'
    Alphanumeric Data String: 'LEN156FHD    '
Checksum: 0x3c

The output certainly doesn't advertise 1280x960 (your driver is doing "fine" - the mode isn't supported)

[  3394.843] (II) modeset(0): Allocate new frame buffer 1280x960 stride

the driver nevertheless allocates that framebuffer.
(The subsequent removal was is because of

[  3395.662] (II) AIGLX: Suspending AIGLX clients for VT switch

you.)

Regarding the first point, the config settings in kscreen directory coincide with my default 1920x1080_120Hz mode. So there is no discrepancy there.

Did you check that while X11 was /not/ starting?

Btw. you probably don't want to "pkill X" but "sudo systemctl restart sddm"

Btw, if you "xrandr --output  eDP-1 --scale 0.6667x0.8889", you should™ get a 1280x960 display - is CS happy with that?

Offline

#8 2025-06-04 07:46:06

chared
Member
Registered: 2024-09-17
Posts: 14

Re: No display after changing resolution in a game

seth wrote:

Did you check that while X11 was /not/ starting?
....
Btw, if you "xrandr --output  eDP-1 --scale 0.6667x0.8889", you should™ get a 1280x960 display - is CS happy with that?

Yep I missed this one, I went back to "bogus mode" read the kscreen settings and there it was, the resolution is set to 1280x960 which is not supported by my display. Ran:

rm -r ~/.local/share/kscreen/ 

And, it fixed itself first try. u/Zamunnda on reddit did suggest to delete this folder. And, you can see the ignorant me didn't even bother to look into ~/.local/share/ but instead looked into the ~/.config directory and ofcourse I didn't find any /kscreen/ folder. But hey, it was a good learning experience after all. I wouldn't have known what the settings inside /kscreen meant if I'd just deleted them without proper thought.

About CS, yes it kinda worked? It looks like this currently - https://i.ibb.co/4wFPgCQq/screenshot-1749023347.jpg (this is streched, it doesn't look like that in the screenshot though.)

Combinations that I've tried-
xrandr --output  eDP-1 --scale 0.6667x1
xrandr --output eDP-1 --transform 0.6667,0,320,0,0.8889,60,0,0,1 --panning 1280x960 (stretched, this got CS in the center (but the UI disappeared and my desktop shifted to the right), got the transform matrix values from chatgpt. Can't show the screenshots for this one as it becomes un-stretched and shows black-bars as soon as the try to take the screenshot (or press the meta key, which is part of the key-bind).

[UPDATE]
I just tried running the game with gamescope again (I've been trying since yesterday but it was just not working), these are the steam launch options I am using:

gamescope -w 1280 -h 960 -r 120.0 -S stretch -f -- %command%

No idea how it has started working today.

Last edited by chared (2025-06-04 10:35:45)

Offline

#9 2025-06-04 11:58:03

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: No display after changing resolution in a game

So with mystery #1 solved, what's the status of the main problem?
Are you running gamescope (successfully) on top of the randr transformation or w/o or does only the randr transformation work, but the gamescope command causes the original issue?
What "UI" disappears? Is this a problem (or unrelated to the game and re-appears once you unscale the output)?

Offline

#10 2025-06-04 13:11:45

chared
Member
Registered: 2024-09-17
Posts: 14

Re: No display after changing resolution in a game

seth wrote:

So with mystery #1 solved, what's the status of the main problem?
Are you running gamescope (successfully) on top of the randr transformation or w/o or does only the randr transformation work, but the gamescope command causes the original issue?
What "UI" disappears? Is this a problem (or unrelated to the game and re-appears once you unscale the output)?

Hmm, I rebooted my pc and gamescope has stopped working. The game still launches but it doesn't do anything that I've specified in the launch options ie. runs at 1280x720 which is probably due to this:
-W, -H: set the resolution used by gamescope. Resizing the gamescope window will update these settings. Ignored in embedded mode. If -H is specified but -W isn't, a 16:9 aspect ratio is assumed. Defaults to 1280×720.

As per gamescope's github page.

1>.No, I wasn't running gamescope on top of the randr transformation, both the randr transformation and gamescope did stretch the display but randr causes it to cut off (the scaling you suggested to do), as you've seen in the screenshot. On the other hand, gamescope helped it render correctly.

2>. When I run the randr transformation (the second xrandr command as per my last post, the one with the transform matrix) the game UI disappears --> the Play button, settings button friends tab etc (example screenshot, the shaded part disappears, this is not my game). Yes, it reappears once I remove the transformation.

Nevertheless, gamescope wasn't working quite working correctly for me anyways, it has problems playing the game at my monitor refresh rate:-120Hz even thought I specifically mentioned it with the -r flag in my launch options. The in-game settings showed my refresh rate as 119Hz, though it felt as if its just a mask and the game is actually running on 60Hz.

Last edited by chared (2025-06-04 13:19:23)

Offline

#11 2025-06-04 13:51:41

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: No display after changing resolution in a game

From the screenshot the game has/is been running at 1920x1080 despite the 1280x960 framebuffer - which is what cuts it off.
Can you enforce the resolution there and try that on the transformed output?

Offline

#12 2025-06-04 15:13:13

chared
Member
Registered: 2024-09-17
Posts: 14

Re: No display after changing resolution in a game

seth wrote:

From the screenshot the game has/is been running at 1920x1080 despite the 1280x960 framebuffer - which is what cuts it off.
Can you enforce the resolution there and try that on the transformed output?

I cannot change the resolution in-game as it leads to the blank screen problem. Though, I tried some things to get this working (the things mentioned below were done in a chronological order.):-
Note - Counter Strike is on 1920x1080 resolution with 120Hz refresh rate before the things mentioned below are done.

1. Rebooted the PC
2. Passed this command:

xrandr --output eDP-1 --transform 0.6667,0,320,0,0.8889,60,0,0,1

3. Opened Counter Strike. (it is centered but without the game UI, and is streched.)
4. Wishing that this stuff gets fixed, ran (zero hope):

xrandr --output  eDP-1 --scale 1x1

5. Noticed, the terminal is back to 1x1 scaling. Alt tabbed to counter strike and there we go. I see this. -->  Then do this. --> And apply changes.
6. Now, Counter Strike looks like this.. Stretched 4:3 and 1280x960.

But there are problems -
1. This is a workaround and not a fix.
2. Once you close counter strike and try to reopen it, it stays with the 1280x960 resolution and as our scaling was 1x1 it opens weirdly. (which looks like this). So you wil have to do the whole fix again.
3. The font gets weirdly pixelated if you try to get stretched res. like this. (this is how it looks , example1 , example2) Minor problem though.
4. The sensitivity becomes weird as well. In my case it decreased so much that I had to increase it from 1sens - 1200dpi to 1.3 sens 1200dpi.

Last edited by chared (2025-06-04 15:25:53)

Offline

#13 Yesterday 13:54:01

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: No display after changing resolution in a game

If we ignore counterstrike for the moment, running

xrandr --output eDP-1 --transform 0.6667,0,320,0,0.8889,60,0,0,1

gets you a letterboxed (and scaled) desktop?
If CS would look like the desktop, you'd be happy?
What is the output of

xrandr --verbose

at this point?
Is there no auto config for CS (instead of 16:9/4:3)?

Offline

Board footer

Powered by FluxBB