Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black Screen in Gaming Mode on Steam Deck #1682

Open
2 of 15 tasks
mbamg opened this issue Dec 23, 2024 · 5 comments
Open
2 of 15 tasks

Black Screen in Gaming Mode on Steam Deck #1682

mbamg opened this issue Dec 23, 2024 · 5 comments

Comments

@mbamg
Copy link

mbamg commented Dec 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Are you using any gamescope patches or a forked version of gamescope?

  • The issue occurs on upstream gamescope without any modifications

Current Behavior

Black Screen during Game Mode on Steam Deck, but not in Desktop Mode.

Steps To Reproduce

  1. Connect external display to Steam Deck via USB-C cable
  2. Turn on the external display
  3. Power on the Steam Deck and boot into Game Mode
  • Observe that external display has no image
  • Observe that Steam Deck's built-in display has no image
  1. Disconnect the display from Steam Deck
  • Observe that image returns to Steam Deck's built-in display
  1. Switch to Desktop Mode
  2. Reconnect external display to Steam Deck
  • Observe that external display has no image
  1. Go to Settings > Display and Monitor, and observe for external display:
  • Listed as "LG Electronics LG ULTRAGEAR" under Device dropdown
  • Not enabled
  1. Check off "Enabled" box for external display, and click "Apply"
  • Desktop image appears on external display
  1. Return to Gaming Mode
  • Observe that external display has no image
  • Observe that Steam Deck's built-in display has image

Hardware information

- Distro: SteamOS 3.6.20
- CPU: AMD Custom APU 0405
- GPU: Advanced Micro Devices, Inc. [AMD/ATI] VanGogh [AMD Custom GPU 0405] [1002:163f] (rev ae)
- Driver Version: Mesa 24.1.0-devel (git-d3fb585cfe)
- Display: LG UltraGear 27GP850-B

Software information

- Desktop environment: -
- Session type: x11
- Gamescope version: gamescope version 3.15.14 (gcc 13.2.1)
- Gamescope launch command(s):

Which gamescope backends have the issue you are reporting?

  • Wayland (default for nested gamescope)
  • DRM (default for embedded gamescope, i.e. gamescope-session)
  • SDL
  • OpenVR

Logging, screenshots, or anything else

Rename display.edid.txt to display.edid

display.edid.txt

@matte-schwartz
Copy link

If you check ~/.config/gamescope/modes.cfg, can you see what resolution it's trying to select for the external display? Your logging for gamescope-session would also include this information (SteamOS System Report or journalctl -b | grep gamescope-session).

Also, what happens if you enable "External display safe mode" in the Steam Display settings before docking the display?

@mbamg
Copy link
Author

mbamg commented Dec 23, 2024

If you check ~/.config/gamescope/modes.cfg, can you see what resolution it's trying to select for the external display? Your logging for gamescope-session would also include this information (SteamOS System Report or journalctl -b | grep gamescope-session).

LG Electronics LG ULTRAGEAR:2560x1440@165 gamescope-session.log

Also, what happens if you enable "External display safe mode" in the Steam Display settings before docking the display?

The external display still has no image.

@matte-schwartz
Copy link

This is mostly based on my own external monitor woes but a couple suggestions to try:

  1. Try changing the @165 at the end to @60 in ~/.config/gamescope/modes.cfg and then rebooting. This is basically what you would be doing by selecting a different refresh rate from the dropdown menu of Steam's display settings while connected.

  2. I looked up the monitor and it is VRR compatible, which makes me wonder if it's maybe related to: Video out no longer works on Alienware AW3423DW QD-OLED monitor after late 2023 update SteamOS#1395 (comment) or https://steamcommunity.com/app/1675200/discussions/3/3771239049944984767/#c4300445879346263688 Since you mention connecting directly to the monitor via USB-C, this will probably be easiest via ssh or with a bluetooth keyboard, but if you connect via SSH and run the command gamescopectl adaptive_sync 0 or use your keyboard and press Ctrl + Alt + F6 to switch to a TTY to run the same command before switching back to your main gamescope-session (Ctrl + Alt + F1 or sometimes Ctrl + Alt + F2) does that help at all?

@mbamg
Copy link
Author

mbamg commented Dec 24, 2024

I ran through this a few times for the sake of consistency.

Works until physically disconnecting display: In Desktop Mode, change the refresh rate to 60 in modes.cfg then boot back into Gaming Mode

Afterwards, when I go into the Display menu I see a GAMESCOPE 32" DISPLAY SCALING section for which the Resolution is empty. There is also no toggle for VRR. The external display continues getting image after shutting down and booting up the Deck, and turning the external display on and off.

Does not work: Switch to tty, run the "gamescopectl adaptive_sync 0" command, then switch back to gamescope.

@matte-schwartz
Copy link

Okay, thanks a lot for the detailed breakdown! Let me extrapolate a bit based on what you found.

Gamescope-session no longer showed a black screen after you manually changed from your 165hz mode to 60hz mode:
There seems to be a commonality between a lot of these "my monitor doesn't work in game mode" issues, and it's that often gamescope-session on Jupiter/Galieo tries to pick monitor modes that it cannot handle displaying properly for whatever reason. By not displaying properly, the symptoms range from "my external display starts turning off/on again randomly" to "my external display never comes up at all" to "VRR being enabled only gives me a black screen after resuming my deck from suspend while docked". Honestly, I am not certain if it's a hardware limitation of Vangogh, a kernel issue, a Steam issue, or a gamescope issue where it tries to pick monitor modes that end up being "garbage" for one reason or another.

After booting into gamescope-session, the resolution field was empty:
This ones a bit strange, but I've documented why I suspect it happens here: #1492 and in another issue about the blank menu in the SteamOS repo: ValveSoftware/SteamOS#1718 (comment). I do not have any insights into what happens within Steam but I'm 50/50 on the blank menu being a Steam issue that was exacerbated by a gamescope change or truly a gamescope issue.

If we take a look at your own EDID (thanks for that btw), the relevant portion is here:

  Detailed Timing Descriptors:
    DTD 2:  2560x1440   59.950550 Hz  16:9     88.787 kHz    241.500000 MHz (697 mm x 392 mm)
                 Hfront   48 Hsync  32 Hback   80 Hpol P
                 Vfront    3 Vsync   5 Vback   33 Vpol N
    DTD 3:  2560x1440   99.946436 Hz  16:9    150.919 kHz    410.500000 MHz (analog composite, sync-on-green, 697 mm x 392 mm)
                 Hfront   48 Hsync  32 Hback   80 Hpol N
                 Vfront    3 Vsync  10 Vback   57 Vpol N
    DTD 4:  2560x1440  119.997589 Hz  16:9    182.996 kHz    497.750000 MHz (697 mm x 392 mm)
                 Hfront   48 Hsync  32 Hback   80 Hpol P
                 Vfront    3 Vsync  10 Vback   72 Vpol N

So the reason that the drop down menu is blank for you is because the mode has a refresh rate of 59.950550 rather than a whole number like 60.000000. I bet if you choose one of your modes that fits this description like:

  VIC  16:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz
                 Hfront   88 Hsync  44 Hback  148 Hpol P
                 Vfront    4 Vsync   5 Vback   36 Vpol P

then the resolution will populate within the menu properly.

There's no toggle for VRR/gamescopectl adaptive_sync 0 did nothing:
This is odd since when I was looking at the specifications for your monitor I saw it was VRR compatible, but it's a bit too broad for me to speculate on a specific cause without seeing what your drm_info output looks like. From my own debugging in the past with a similar VRR issue, it's not likely to be gamescope causing that but rather a drm/amd issue or an external issue of some sort. Gamescope just shows the toggle based on if VRR is reported as supported by the kernel when connected to your display.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants