mirror of
https://github.com/Arbitrate3280/LutrisToSunshine.git
synced 2026-11-04 06:34:23 +00:00
[GH-ISSUE #14] Cannot create virtual display #10
Labels
No labels
bug
bug
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Arbitrate3280/LutrisToSunshine#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SirWalterLibrary on GitHub (Mar 25, 2026).
Original GitHub issue: https://github.com/Arbitrate3280/LutrisToSunshine/issues/14
I am running Nobara OS and have Sunshine installed. However, I cannot create a virtual display for some reason. Here’s my output:
`
python3 lutristosunshine.py virtualdisplay
Virtual display
Status: setup=configured, Sunshine=inactive, Sway=inactive
Runtime: input bridge=inactive, audio guard=inactive, portal handoff=idle
Dynamic MangoHud FPS limit: [DISABLED] wrapped launches keep their normal MangoHud FPS behavior
Dependencies: [OK] all required commands available
Headless display: not detected
Host controllers: [AUTO] none reserved; client inputs from Moonlight/Sunshine already work automatically
Blocked Flatpak apps: [OK] none detected
Next step: Run 'python3 lutristosunshine.py virtualdisplay enable' to start the stack and sync apps.
Actions
Choose an action: 1
Virtual display files installed.
Failed to start app-dev.lizardbyte.app.Sunshine.service: Unit app-dev.lizardbyte.app.Sunshine.service not found.
Error: unable to start the virtual display Sunshine service.
··• python3 lutristosunshine.py virtualdisplay doctor
Virtual display doctor
[PASS] Dependencies: Required commands are available.
[PASS] Setup: Managed files are installed.
[PASS] Managed udev rule: Input permissions rule is present.
[WARN] Sunshine service: Managed Sunshine unit is not active.
[WARN] Headless display: Headless Wayland display is not ready.
[INFO] Controller bridge: No host controllers configured.
[PASS] Flatpak launch audit: no blocked apps detected.
Next step: Run 'python3 lutristosunshine.py virtualdisplay enable' to start the stack and sync apps.
`
@moozums commented on GitHub (Mar 26, 2026):
Changing line 27 in virtualdisplay/manager.py from the default:
SUNSHINE_UNIT = "app-dev.lizardbyte.app.Sunshine.service"
to
SUNSHINE_UNIT = "sunshine.service"
fixed it for me. Also on Nobara
@SirWalterLibrary commented on GitHub (Mar 26, 2026):
I was able to create a virtual display but I don't think it did anything. When I tried streaming to my phone, I just get a black screen.
https://imgur.com/a/46ks8Ut
Here's the doctor command I ran (seems like it created it):
https://imgur.com/a/rxWWUgk
@Arbitrate3280 commented on GitHub (Mar 26, 2026):
show me the sunshine logs, or click the show logs option after starting a stream.
you have the dependencies installed right?
sway
swaybg
xdg-desktop-portal-wlr
Nvidia GPU? Sunshine version?
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
I have
swayswaybgxdg-desktop-portal-wlrall installed.GPU: RTX 3070 Ti
Sunshine version: [2026-03-27 07:37:22.022]: Info: Sunshine version: 2025.924.154138 commit: 86188d47a7463b0f73b35de18a628353adeaa20e
I was able to get games working.
Sunshine.log
However, it seems like when I move my cursor around, it moves both the cursor in the virtual display and main display.
@A-Ghorab commented on GitHub (Mar 27, 2026):
just to add, on my side it did work correctly but i had to run this command
sudo usermod -aG input $USERto add input controlif the user is faced with this error
Failed to open device: '/dev/input/event0': Permission deniedTo add the list
Cachyos with AMD GPU working just fine@SirWalterLibrary commented on GitHub (Mar 27, 2026):
Also, what frame rate is the virtual display running at?
I have this issue where on TV displays, which run at 59.95 Hz, I get occasional stutters streaming at 60 Hz. My workaround is to set my main monitor at 59.95 Hz and set my Moonlight streaming setting at 60 Hz, which mostly fixes the issue.
If there is a way to set this manually either in Sunshine or virtual display, that would be helpful.
I documented this phenomenon on this page: https://github.com/frostplexx/sunshine_virt_display/issues/9
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
So you were able to get to your cursor working only on your virtual display?
@A-Ghorab commented on GitHub (Mar 27, 2026):
on my side both the keyboard and mouse are only working on my "host" machine, the streaming device (my LG TV) have the controller connected to it and only works there.
i also opened steam and tried to use scroll while it's connect to my PC nothing worked, but if i unplug it and connect it to the TV the mouse works there.
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
Is there a way to check this?
@Arbitrate3280 commented on GitHub (Mar 27, 2026):
ah my bad, i'm running sunshine pre-releases, forgot that's not the case for every distro. Will make it look for both so people don't have to manually do this.
Glad you managed to make it work. Can I ask what you did to fix the blackscreen issue?
Look at the sunshine logs after you start a stream. For example, my tv also requests 59.94:
[2026-03-27 16:33:24.177]: Info: CLIENT CONNECTED
[2026-03-27 16:33:24.213]: Info: [wayland] Found display [wayland-1]
[2026-03-27 16:33:24.213]: Info: [wayland] Found interface: zwp_linux_dmabuf_v1(2) version 4
[2026-03-27 16:33:24.213]: Info: [wayland] Found interface: zxdg_output_manager_v1(8) version 3
[2026-03-27 16:33:24.213]: Info: [wayland] Found interface: zwlr_screencopy_manager_v1(28) version 3
[2026-03-27 16:33:24.213]: Info: [wayland] Found interface: wl_output(53) version 4
[2026-03-27 16:33:24.213]: Info: [wayland] Resolution: 2560x1440
[2026-03-27 16:33:24.213]: Info: [wayland] Name: HEADLESS-1
[2026-03-27 16:33:24.213]: Info: [wayland] Found monitor: Headless output 1
[2026-03-27 16:33:24.213]: Info: [wayland] Offset: 0x0
[2026-03-27 16:33:24.213]: Info: [wayland] Logical size: 2560x1440
[2026-03-27 16:33:24.213]: Info: [wlgrab] -------- Start of Wayland monitor list --------
[2026-03-27 16:33:24.213]: Info: [wlgrab] Monitor 0 is HEADLESS-1: Headless output 1
[2026-03-27 16:33:24.213]: Info: [wlgrab] --------- End of Wayland monitor list ---------
[2026-03-27 16:33:24.213]: Info: Screencasting with Wayland's protocol
[2026-03-27 16:33:24.213]: Info: [wlgrab] Requested frame rate [60000/1001, approx. 59.9401 fps]
@Arbitrate3280 commented on GitHub (Mar 27, 2026):
Are you still getting keyboard and mouse input leaking from the client to the host?
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
Q: Glad you managed to make it work. Can I ask what you did to fix the blackscreen issue?
A: It was 2 things.
Number 1: A new Nobara update crashed Heroics Game Launcher so I got it working with
flatpak repairandflatpak update. It worked right after.Number 2: I have steam automatically start up on boot. However, it rests in my main display and not in the virtual display. So when I open a game in Steam, it loads in the main display. The way I got this to work is by quitting Steam, and re-running the virtual display with my Steam game. Then that worked.
Okay, I tried searching for "fps" in my logs and all I see is minimum FPS set to 30 fps:
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
Haven't gotten a chance to try this yet. I'll try the
sudo usermod -aG input $USERcommand when I get home@Arbitrate3280 commented on GitHub (Mar 27, 2026):
When I search for FPS in my logs I get this:
[2026-03-27 16:33:24.213]: Info: [wlgrab] Requested frame rate [60000/1001, approx. 59.9401 fps]
[2026-03-27 16:33:24.265]: Info: Minimum FPS target set to ~30fps (33.3333ms)
When you search for "Screencasting with" what do you get? Maybe the screencasting method im using wasn't a thing in the stable release of sunshine.
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
This is what I get.
By the way, I already posted my log in Sunshine.log
Are you using a specific capture method to get 59.94?
@Arbitrate3280 commented on GitHub (Mar 27, 2026):
No, leave it at auto, it's already picking wlroots. I think sunshine just added more detailed logging in the pre-releases.
I will add to the script a way to expose the current resolution and refresh rate of the virtual screen. So when a stream is running you can check it.
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
Nice!
Also, how exactly are you able to request 59.94 for your TV? I currently have a laptop running Ubuntu 24.04 that's hooked to my TV via HDMI. I can't request a 59.94, but rather 60 Hz. I'm wondering what your setup looks like
[2026-03-27 16:33:24.213]: Info: [wlgrab] Requested frame rate [60000/1001, approx. 59.9401 fps]
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
By the way, does
input bridgeneed to be active?@Arbitrate3280 commented on GitHub (Mar 27, 2026):
you're not using kde plasma are you? I'm a kde plasma user so i only managed to test input isolation for it. Is this gnome? I can start trying to get input isolation working for it, you will need to test it for me though
im working on the version of the script that will get you the 59.95, just a second
no, only if you wanted to bridge host controllers to the virtual display
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
I was able to get it to work using
sudo usermod input $USERI am using KDE Plasma.
@Arbitrate3280 commented on GitHub (Mar 27, 2026):
great, that's that then for the input stuff. Gnome will have to wait untill someone complains about it :p
can you do a git pull to get the latest version of the script? after that run python3 lutristosunshine.py virtualdisplay and pick option 1 to re-install the updated scripts/files.
now we have 3 modes for the sway virtual display. It's the new option 9 on the list.
You can do: 1. It follows moonlight's requested fps.
2. It follows the client's actual refresh rate.
3. Custom, so you can set a resolution and refresh rate and it will use that.
2 is the one that will get your resolution refresh rate to be 59.95. But for that to work you will need to update sunshine to the latest pre-release version, because the latest stable does not yet have this piece of information on the logs:
[2026-03-27 16:33:24.213]: Info: [wlgrab] Requested frame rate [60000/1001, approx. 59.9401 fps]
And that's what we're using to set it.
If you don't want to do that, then you can use the custom option and input the desired resolution and refresh rate. The issue with this approach is that if you have multiple clients they will all use that custom option.
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
OMG thanks!!!!!!
Honestly, the 3 different options is EXACTLY what I was looking for. I am going to use option 2, but it's good to have the other options in case I wanted to
Will test when I get the chance. :)
@Arbitrate3280 commented on GitHub (Mar 27, 2026):
let me know if any more issues come up
@SirWalterLibrary commented on GitHub (Mar 27, 2026):
Okay, dumb question. How do I update my Sunshine to the pre-release on Linux?
@Arbitrate3280 commented on GitHub (Mar 27, 2026):
You're on Nobara right? They have an official copr for the pre-release:
https://copr.fedorainfracloud.org/coprs/lizardbyte/beta/
if you never dealt with copr then ask an AI to help you through it or look for some tutorials.
A warning though: the beta release has changed the service name and also they are introducing some new capture methods, so be ready to troubleshoot a bit after changing to it, because some issues might show up.
@SirWalterLibrary commented on GitHub (Mar 28, 2026):
Okay, I tried with the newest version and it seems like it doesn't work with option 2. Here's my logs
Here's the commands I ran for the requesting client's refresh rate:
Actions
Choose an action: 4
Display sync mode
Choose a mode: 2
Refresh rate sync mode is already set to client's refresh rate for virtual-display launches.
This controls both the virtual-display output mode and the dynamic MangoHud FPS limit source.
Virtual display
Status: [READY] stack is running
Display sync: client's refresh rate; MangoHud FPS sync off
Controllers: [AUTO] Moonlight/Sunshine client inputs work automatically
Attention: [OK] nothing needs action right now
Next step: Virtual display is ready. Use 'controllers', 'rumble', or 'logs' for follow-up actions.
Actions
Choose an action: 0
Here's the
xrandrcommand I ran from my TV's display:@Arbitrate3280 commented on GitHub (Mar 28, 2026):
Do 2. Show full status while streaming, it will show the current resolution and refresh rate of the sway virtual display.
@SirWalterLibrary commented on GitHub (Mar 28, 2026):
Virtual display
Status: setup=configured, Sunshine=active, Sway=active
Runtime: input bridge=inactive, audio guard=active, portal handoff=idle
Host session: KDE / /usr/share/wayland-sessions/plasma.desktop
Input isolation: kwin-runtime-disable - disabled 5 of 5 Sunshine device(s) in KWin
Dynamic MangoHud FPS limit: [DISABLED] wrapped launches keep their normal MangoHud FPS behavior
MangoHud env value: not active
Refresh rate sync mode: client's refresh rate
Dependencies: [OK] all required commands available
Headless display: wayland-1
Current headless mode: 2560x1440 @ 60 Hz
Host controllers: [AUTO] none reserved; client inputs from Moonlight/Sunshine already work automatically
Blocked Flatpak apps: [OK] none detected
Next step: Virtual display is ready. Use 'controllers', 'rumble', or 'logs' for follow-up actions.
Virtual display
Status: [READY] stack is running
Display sync: client's refresh rate; MangoHud FPS sync off
Controllers: [AUTO] Moonlight/Sunshine client inputs work automatically
Attention: [OK] nothing needs action right now
Next step: Virtual display is ready. Use 'controllers', 'rumble', or 'logs' for follow-up actions.
@Arbitrate3280 commented on GitHub (Mar 28, 2026):
Grab the latest version of the script, do a re-install again I had some more fixes. But what I think is happening here is that moonlight is sending the refresh rate of the main monitor, not the tv. Both are the same resolution, one is 60hz the other 59.95hz.
Moonlight is reportign the client's refresh rate as 60fps:
[2026-03-27 19:12:15.928]: Info: [wlgrab] Requested frame rate [60fps]
It's an integrated display right? I don't suppose you can turn it off leaving only the tv on?
@Arbitrate3280 commented on GitHub (Mar 28, 2026):
Or maybe set the tv as your main monitor? Idk how moonlight is deciding which one to send.
@SirWalterLibrary commented on GitHub (Mar 28, 2026):
Basically, I have a laptop (lid closed) connected to my TV (so it's the only display).
I'll grab the latest and try again
@Arbitrate3280 commented on GitHub (Mar 28, 2026):
When the lid is closed, does the monitor stops showing up in the screen/monitor part of the system settings?
@SirWalterLibrary commented on GitHub (Mar 28, 2026):
Yes. The monitor of the laptop is disabled when closed, but still displays to the TV at 2560x1440 at 59.95
@Arbitrate3280 commented on GitHub (Mar 28, 2026):
Hmmm, the issue is that we're setting it to what moonlight reports. And moonlight is reporting it as 60, most likely reporting the wrong monitor.
I really don't know how to help you here, as this is outside of our project and goes into moonlight land.
For reference, on my end for my tv it reports it like so:
[2026-03-27 20:49:33.469]: Info: [wlgrab] Requested frame rate [60000/1001, approx. 59.9401 fps].
@SirWalterLibrary commented on GitHub (Mar 28, 2026):
Is your TV hooked to a computer or do you have Moonlight installed on your TV?
@Arbitrate3280 commented on GitHub (Mar 28, 2026):
I have moonlight installed on the TV (Android TV)
@SirWalterLibrary commented on GitHub (Mar 28, 2026):
Hey, just wanted to say, I really appreciate your time and effort! It really does not go unnoticed.
Just one last question/comment:
I DO think this is a Moonlight issue, which is sad to say and I wish there was a way to manually set things on there rather than attempt some tricks to get 59.95 Hz to work.
I would like to understand what option 2 does for
4. Configure display sync mode. Is it requesting the client's refresh rate from the connected display?I'm no wizard like you, but maybe there is a different way we can extract the 59.95 Hz. I think it's defaulting to 60 Hz because it doesn't know where to grab which display from the client's refresh rate. For reference, I am using the
xrandr -d :0command on Linux to show display settings.Let me know if that makes sense. It can be a bit confusing how I worded this.
Thanks so much!!!
@SirWalterLibrary commented on GitHub (Mar 28, 2026):
Here's what I mean
@Arbitrate3280 commented on GitHub (Mar 28, 2026):
So, here's how it works:
LutrisToSunshine only has the information about the clients that Sunshine offers to it. And Sunshine only has the information about the clients that Moonlight gives to it.
For option 2 (Use the client's refresh rate), it works like this:
On my case, Moonlight reports to Sunshine that the client's refresh rate is
[2026-03-27 20:49:33.469]: Info: [wlgrab] Requested frame rate [60000/1001, approx. 59.9401 fps].
LutrisToSunshine is looking at the Sunshine's logs, once this information shows up there, it sets the refresh rate of the virtual display to what is appearing at the logs, in this case 59.94.
For option 1 (Follow Moonlight's requested resolution and FPS) Moonlight can automatically populate a env variable "SUNSHINE_CLIENT_FPS", so we use the value of that variable.
I do think that the issue is that Moonlight is picking the wrong monitor and sending info about your laptop screen instead of the TV. A way to test this would be to change the resolution and refresh rate of your laptop and then start a stream, to see if the "Info: [wlgrab] Requested frame rate" matches it.
If that is confirmed to be the case, then I think your next step should be to figure out if there's a way you can hide/completely disable the laptop monitor. Because if it's still showing in xrandr then it might still be showing to Moonlight, even with a close lid.
Otherwise, the last option is to do option 3 of the display snyc mode:
3. Use a custom fixed mode (1920x1080 @ 60 Hz)
And set this to 2560x1440@59.95 every time you want to stream to that TV. But yeah, a pain in the ass to do this every time.
It would be great if Sunshine showed on the logs the name of the client when a stream started. This way I could modify the script so you could set it up that every time client X connected (in this case your tv), it would use 2560x1440@59.95.
@Arbitrate3280 commented on GitHub (Mar 28, 2026):
If you're open to a really hacky workaround, there's also the option of forking moonlight, poking around the code to figure out the right place and changing it so it forcibly reports 59.95, and use that version on this machine hehehe.
Otherwise I'm all out of ideas.
Hope you can figure something out!
@SirWalterLibrary commented on GitHub (Mar 28, 2026):
Hey, I did some more testing and I feel that the stuttering issue is nonexistent now (yayyyyy). I turned on V sync and frame pacing on my Moonlight client setting in combination of virtual displays. I think that helped. I will update further if I continue to see the same pattern or experience stuttering.
I made a Reddit post that covers this:
https://www.reddit.com/r/MoonlightStreaming/s/cBY5QHtpMJ