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

On Steam Deck in gaming mode the screen does not update #15193

Open
tad-lispy opened this issue Sep 13, 2024 · 8 comments
Open

On Steam Deck in gaming mode the screen does not update #15193

tad-lispy opened this issue Sep 13, 2024 · 8 comments
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-Linux Specific to the Linux desktop operating system P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@tad-lispy
Copy link

tad-lispy commented Sep 13, 2024

Bevy version

0.14.2

Relevant system information

$ cargo --version
cargo 1.80.1 (376290515 2024-07-16)
$ uname --all
Linux steamdeck 6.1.52-valve16-1-neptune-61 #1 SMP PREEMPT_DYNAMIC Tue, 06 Feb 2024 00:51:49 +0000 x86_64 GNU/Linux
AdapterInfo { name: "AMD Radeon Graphics (RADV VANGOGH)", vendor: 4098, device: 5173, device_type: IntegratedGpu, driver: "radv", driver_info: "Mesa 23.3.0-devel (git-4870e346ff)", backend: Vulkan }

What you did

MRE with some observation at https://gitlab.com/tad-lispy/bevy-0.14-steam-deck-no-refresh

What went wrong

The program should display a single green dot in the middle of the screen. The dot should slowly rotate around the X axis. This works as intended on my laptop (NixOS with Wayland) and on Steam Deck in desktop mode (SteamOS with X11). In gaming mode (Game Scope compositor?) it does not move at all, and about half of the times the dot does not even show on screen.

Looking at the logs I see that the systems are running (rotation is updated), but very rarely (few times per second at most).

Additional information

Discussion in General channel of Bevy Discord (with very helpful @alice-i-cecile and @Shatur).

Logs, workarounds, build instructions etc. in the readme of my MRE repository.

@tad-lispy tad-lispy added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Sep 13, 2024
@alice-i-cecile alice-i-cecile added A-Windowing Platform-agnostic interface layer to run your app in O-Linux Specific to the Linux desktop operating system P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Investigation This issue requires detective work to figure out what's going wrong and removed S-Needs-Triage This issue needs to be labelled labels Sep 13, 2024
@ldubos
Copy link
Contributor

ldubos commented Sep 20, 2024

I can confirm there’s an issue with SteamDeck. When running .add_systems(Update, || info!("Update"));, I encountered unexpected behavior, as shown in my video, the system is running very slowly, about once per second.

In my case, I used Steamworks to retrieve the friends list and display it in a TextBundle. However, sometimes nothing appears on the screen. I tried simplifying the setup with a basic TextBundle displaying "Hello World" (without Steamworks), but the problem persists. I often need to restart the app multiple times before anything renders correctly.

I also tested with and without wayland, but didn’t notice any difference.

Here’s my setup:

  • I use the SteamOS Devkit Client to upload and test the build.
  • The game is built with the Vulkan backend, targeting Linux and Zen2 architecture.
  • Rust version: nightly-2024-09-11.
[target.x86_64-unknown-linux-gnu]
rustflags = [
  # SteamDeck uses Zen2 architecture (https://www.steamdeck.com/en/tech)
  "-Ctarget-cpu=znver2",
  "-Zshare-generics=y",
  "-Zthreads=8",
]
WindowsTerminal_C3xsuHCFIS.mp4

@ldubos
Copy link
Contributor

ldubos commented Sep 20, 2024

I tried to do a tracy capture but I was only able to capture the first milliseconds of the program after that the program froze, I also enabled the Steam performance overlay and it also froze so... I don't know what could generate this kind of issues, I checked on WGPU and Winit and I didn't found any issues related to this problem.

@Shatur
Copy link
Contributor

Shatur commented Sep 20, 2024

It's strange my project runs fine on SteamDeck:
https://github.com/projectharmonia/project_harmonia
Maybe it's related to the configuration?

@ldubos
Copy link
Contributor

ldubos commented Sep 20, 2024

It's strange my project runs fine on SteamDeck

On my side I have the same issue with your project.
What is your config? What "procedure" do you use to build for SteamDeck?

I built it with WSL then used SteamOS Devkit to transfer the app.

$ rustc --version
rustc 1.81.0 (eeb90cda1 2024-09-04)

My SteamDeck:

  • Model: SteamDeck Oled
  • OS Version: 3.5.19
  • OS Build: 20240422.1
  • Kernel: 6.1.52-valve16-1-neptune-61
  • Bios: F7G0107
  • Steam: 1726683985
  • Graphic Driver: 4.6, Mesa 23.1.3
  • KDE Plasma: 5.27.5
  • KDE Framework: 5.107.0

@Shatur
Copy link
Contributor

Shatur commented Sep 20, 2024

I compile the project on the SteamDeck inside Distrobox with ArchLinux. I have the latest firmware and the container also have all packages up to date.

Everything else is the same, including the Rust version and SteamDeck model.
I run the project from the gaming mode.

@robtfm
Copy link
Contributor

robtfm commented Oct 14, 2024

just wanted to confirm i see the same issue - 0.13 worked, 0.14 all good in desktop mode but in gaming mode my app is locked at just under 1fps and doesn't display properly.

  • with wayland and x11 features
  • with WindowMode::Fullscreen
  • tried both of Continuous and reactive winit settings (since it looks like the low power mode) for both focused_mode and unfocused_mode

not sure if anyone else has tried dissecting yet / has any further ideas?

@alice-i-cecile
Copy link
Member

I guarantee this is due to the winit event loop rework done in #13366.

@mmatvein
Copy link

We're encountering this issue as well with Bevy 0.14.2 (and prior 0.14 versions as well). The interesting part is that we only just found out, as we've only been testing our game with the Steam Deck docked and connected to a TV. Seems like when the deck is connected to an external display things work fine. The game also runs fine on the Steam Deck in Desktop mode.

Additionally we've had to run the game in windowed mode to get it to run on the Steam Deck when connected to the external display. I don't know if it is at all related to this issue, though, because this was already the case pre-0.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-Linux Specific to the Linux desktop operating system P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

No branches or pull requests

6 participants