moonlight-stream / moonlight-qt

GameStream client for PCs (Windows, Mac, Linux, and Steam Link)
GNU General Public License v3.0
10.74k stars 629 forks source link

Steam Deck - Scaling Problems in Gaming Mode with External Display #879

Open Nonary opened 2 years ago

Nonary commented 2 years ago

Describe the bug If you attach your Steam Deck to an external display that is higher than native resolution it will not scale properly and box in the screen at the original resolution of the deck, regardless of the streaming resolution setting configured on Moonlight. You can workaround the boxed in issue by turning off the automatic UI scaling and setting it to the lowest setting, but the stream still looks like it has serious scaling problems because of the garbled text.

Steps to reproduce Attach an external display to the Steam Deck Set resolution on Steam Deck to 4k Start a stream on Moonlight

Screenshots IMG_0014

Affected games All games affected

Other Moonlight clients No other clients affected.

Moonlight settings (please complete the following information) All Settings left at default, besides the resolution setting which was set to 4k.

Client PC details (please complete the following information) Steam Deck 3.3.2

Server PC details (please complete the following information) Windows 11 w/ GFE 3.26

Additional context This only happens in gaming mode, the scaling works properly if you launch Moonlight inside Desktop Mode. This might be a Wayland specific issue that can be worked around

ferrari00234 commented 2 years ago

Same issue!

cgutman commented 2 years ago

Does the issue persist if you change Moonlight to borderless windowed mode?

Nonary commented 2 years ago

Does the issue persist if you change Moonlight to borderless windowed mode?

That was the first thing I tried and unfortunately it didn't make any difference for me

cgutman commented 2 years ago

Can you capture the logs from Moonlight? They normally print to the console but you should be able to redirect them to a file.

Nonary commented 2 years ago

Can you capture the logs from Moonlight? They normally print to the console but you should be able to redirect them to a file.

moonlog.txt

Attached is me using Moonlight in both FullScreen and Borderless Windowed.

I also noticed that the fuzzy appearance to Moonlight happens even before starting the stream, although it is not as obvious since the text is much larger.

Nonary commented 2 years ago

@cgutman I think I found the cause of the issue, I messed around with the upscaling settings and changed it from FSR from Linear/Nearest/Integer and it appears that Moonlight just stays at a fixed resolution instead of recognizing the resolution selected in the display settings.

Basically, the upscaling on the deck is what is causing the fuzzy text and artifacts, because Moonlight appears to be running at a lower resolution which causes the deck upscaler to "kick in"

I confirmed with my TV that the display is properly in 4k resolution and it is not a virtual resolution being upscaled, but I am guessing Moonlight still thinks the display is at 1200x800 and does not scale properly.

bloodhawk1989 commented 2 years ago

Hi! Were you able to figure out a solution to this? I tried using Moonlight in desktop mode, but my Dualsense controller only gets detected as as mouse/keyboard. But in gaming mode it works fine in games, however, the resolution scaling becomes an issue.

Nonary commented 2 years ago

Hi!

Were you able to figure out a solution to this? I tried using Moonlight in desktop mode, but my Dualsense controller only gets detected as as mouse/keyboard. But in gaming mode it works fine in games, however, the resolution scaling becomes an issue.

You'll need to apply a different controller configuration for the global default desktop configuration, or launch moonlight using big picture mode (since that shares same controller configuration as game mode)

cgutman commented 2 years ago

Basically, the upscaling on the deck is what is causing the fuzzy text and artifacts, because Moonlight appears to be running at a lower resolution which causes the deck upscaler to "kick in"

That's pretty odd. We use two totally different frameworks for the game selection UI (Qt) and the stream itself (SDL). If neither are getting resized correctly, that seems to point to a bug in the Deck's window manager where it's not informing us correctly that the window has been resized.

Do other Flatpak apps scale correctly on the Deck in this scenario?

bloodhawk1989 commented 2 years ago

Hi! Were you able to figure out a solution to this? I tried using Moonlight in desktop mode, but my Dualsense controller only gets detected as as mouse/keyboard. But in gaming mode it works fine in games, however, the resolution scaling becomes an issue.

You'll need to apply a different controller configuration for the global default desktop configuration, or launch moonlight using big picture mode (since that shares same controller configuration as game mode)

Oh gotcha! Ill give Big Picture in desktop mode a shot. Because if that works, then that might be a temp solution for the time being.

Basically, the upscaling on the deck is what is causing the fuzzy text and artifacts, because Moonlight appears to be running at a lower resolution which causes the deck upscaler to "kick in"

That's pretty odd. We use two totally different frameworks for the game selection UI (Qt) and the stream itself (SDL). If neither are getting resized correctly, that seems to point to a bug in the Deck's window manager where it's not informing us correctly that the window has been resized.

Do other Flatpak apps scale correctly on the Deck in this scenario?

That makes perfect sense, because in gaming mode whenever I goto change the resolution of a game it always defaults to Deck's native res. I personally don't know if other flatpak apps have a similar issue, but i'd be happy to test if you can give me an example of which other ones to try.

Nonary commented 2 years ago

Basically, the upscaling on the deck is what is causing the fuzzy text and artifacts, because Moonlight appears to be running at a lower resolution which causes the deck upscaler to "kick in"

That's pretty odd. We use two totally different frameworks for the game selection UI (Qt) and the stream itself (SDL). If neither are getting resized correctly, that seems to point to a bug in the Deck's window manager where it's not informing us correctly that the window has been resized.

Do other Flatpak apps scale correctly on the Deck in this scenario?

I just tested Google Chrome and like you suspected, it is having the same issue. So yeah, this appears to be an issue with docked steam decks with all apps that are potentially in flatpak. I wonder if there is some settings I can change to get it to work, will do some research...

Nonary commented 2 years ago

@cgutman I did find a solution, although it is only working partially. This might be because of the 2 different frameworks perhaps...

I went into the properties for the application (in the steam deck UI inside game mode) and set the game resolution to 3840x2160 and now the stream looks perfectly clear like it does in desktop mode.

It doesn't appear to do anything for the initial UI though, but at least the streaming resolution looks proper now.

ferrari00234 commented 2 years ago

@cgutman I did find a solution, although it is only working partially. This might be because of the 2 different frameworks perhaps...

I went into the properties for the application (in the steam deck UI inside game mode) and set the game resolution to 3840x2160 and now the stream looks perfectly clear like it does in desktop mode.

It doesn't appear to do anything for the initial UI though, but at least the streaming resolution looks proper now.

I think I found a fix, if you go into the properties for the application while in game mode, instead of selecting a discrete resolution, I just set mine from default to native. Now, as long as my desktop resolution matches the streaming resolution, everything looks sharp!

IgneusManus commented 1 year ago

@cgutman I did find a solution, although it is only working partially. This might be because of the 2 different frameworks perhaps... I went into the properties for the application (in the steam deck UI inside game mode) and set the game resolution to 3840x2160 and now the stream looks perfectly clear like it does in desktop mode. It doesn't appear to do anything for the initial UI though, but at least the streaming resolution looks proper now.

I think I found a fix, if you go into the properties for the application while in game mode, instead of selecting a discrete resolution, I just set mine from default to native. Now, as long as my desktop resolution matches the streaming resolution, everything looks sharp!

Thank you! I spent two nights trying to fix this. It turns out that setting the Moonlight app properties on the Steam Deck to use "Native" instead of "Default" resolution fixed all of the UI and game scaling and blurriness issues for me. I really appreciate it!

For what it's worth, my Steam Deck is hooked up to a 4k TV and its output is set to 4k.

Wh1t3Rose commented 1 year ago

OMG Thank you! Setting up Native fixed everything!