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

Allow multiple registered custom resolutions for the virtual display #77

Open
declanvong opened this issue Aug 11, 2023 · 2 comments
Open
Labels
status:awaiting-triage type:enhancement New feature or request for feature enhancement

Comments

@declanvong
Copy link

declanvong commented Aug 11, 2023

Is your feature request related to a problem?

No response

What is your feature request?

Currently, you can override the display resolution + refresh rate via the DISPLAY_SIZEW + DISPLAY_SIZEH + DISPLAY_REFRESH env variables. However, I'd like to connect from multiple devices that have different resolutions, and therefore would like to register more than one custom resolution into xrandr so that Moonlight can request those resolution changes upon connecting.

I'm happy to try and hack this in myself and raise a PR if you're happy with that, but just might be faster for you to do it since you're obviously way more familiar with the current scripts + how you'd like it done 😄

Are there any workarounds?

~Dump the required nvidia-xconfig calls into the "startup" scripts to /init.d. But that only solves it for me and I can imagine that if you have a hosted headless gaming server, it might not just be me that wants to access it from more than one device which may have differing resolutions.

edit: actually, I thought that would work, but tried doing this manually as well and didn't seem to work. current workaround is to just change the env vars each time manually and then reboot the container. or perhaps run two steam-headless instances with different configurations.

Additional Context

No response

@declanvong declanvong added status:awaiting-triage type:enhancement New feature or request for feature enhancement labels Aug 11, 2023
@declanvong
Copy link
Author

I think this would probably mean changing the current env vars into a more structured list instead, e.g. DISPLAY_MODES=1920x1200:60 for single, and comma separated like DISPLAY_MODES=1920x1200:60,2176x1812:120.

Then parsing that appropriately and calling cvt / nvidia-xconfig for each one here:

nvidia-xconfig --virtual="${DISPLAY_SIZEW:?}x${DISPLAY_SIZEH:?}" --depth="${DISPLAY_CDEPTH:?}" --mode=$(echo "${MODELINE:?}" | awk '{print $2}' | tr -d '"') --allow-empty-initial-configuration --no-probe-all-gpus --busid="${bus_id:?}" --no-multigpu --no-sli --no-base-mosaic --only-one-x-screen ${connected_monitor:?}

?

@survivor182ca
Copy link

Pull request is there alteady but it takes forever to get merge...... : #62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:awaiting-triage type:enhancement New feature or request for feature enhancement
Projects
None yet
Development

No branches or pull requests

2 participants