moonlight-stream / nvidia-gamestream-issues

Repository for tracking known GameStream issues that require a fix from Nvidia
11 stars 1 forks source link

Video freezes with hardware-accelerated GPU scheduling on the host #27

Open cgutman opened 2 years ago

cgutman commented 2 years ago

After some indeterminate period of time streaming, the video will freeze and the stream will eventually disconnect. This happens when the encoder thread in nvstreamer.exe hangs. It appears to be a driver bug that is encountered when hardware-accelerated GPU scheduling is enabled on the host PC.

NVIDIA is aware of the bug and has reproduced the issue in their lab.

Workaround: Disable hardware-accelerated GPU scheduling on your host PC.

BatJoe commented 2 years ago

I have been testing with hardware accelerated GPU scheduling enabled on Windows 11 and with driver 516.40 the issue appears to be fixed. I see no crashes anymore.

s3phir0th115 commented 2 years ago

I have been testing with hardware accelerated GPU scheduling enabled on Windows 11 and with driver 516.40 the issue appears to be fixed. I see no crashes anymore.

I'm on 516.59, and have found the same.

devsaider commented 2 years ago

I did update my windows 11 to 21h2 22000.795 and im facing crashes again :\ driver 516.59

Proplex commented 2 years ago

+1 to facing issues again.

I was fine with 516.59, however, a recent W11 update or driver update (currently on 516.94 with W11 21H2 22000.795) has re-introduced the freezing problem.

SoyG commented 2 years ago

What are the implications of disabling hardware accelerated GPU scheduling?

M0dEx commented 1 year ago

I am now facing this issue as well.

The last month I have been able to play with the HW accelerated GPU scheduling turned on, but I was forced to switch it off today.

MopheusDG commented 1 year ago

Same here, it just freezes at any time. I've tried this issue and it's happening on Android, RPi4 and Windows x64 versions of the Moonlight Stream app.

thenerdbomberr commented 1 year ago

Any word if new drivers 522 fixes hags.

prolipig commented 1 year ago

Can confirm it still happens on a RTX 4090 with driver 522.25, Win10 19044.2130

thenerdbomberr commented 1 year ago

Can confirm it still happens on a RTX 4090 with driver 522.25, Win10 19044.2130

Yup in the same boat as you, ugh this bug.

barat commented 1 year ago

Was able to play without issues but since one or two days it started to happen ... so waiting for a fix from NV probably. Why they haven't implement some automatic regression tests?

EDIT: Drivers updated again, re-enabled hardware scheduling and yesterday I was able to play without crashes. At least now I know, that I can disable it when something like that happens again.

EDIT2: False alarm ... unfortunately today after ~1h it happened again. Too bad, that to toggle this thing restart is needed. If not. I could just use AutoHotKey or anything else to toggle it just before streaming. Is it happening with pure gamestream as well?

thenerdbomberr commented 1 year ago

update: running latest win 11 22621.963 and latest NV drivers 527.56, hags on and no crashes or freezes. NV must have fixed something.

Chuckame commented 1 year ago

Same issue (random freezes) but disabling hardware acceleration gpu scheduling did nothing... I'm with the latest version of nvidia driver on w10

BatJoe commented 1 year ago

Now with nVidia killing Gamestream, I doub they will ever fix this problem.

TheN00r commented 1 year ago

update: running latest win 11 22621.963 and latest NV drivers 527.56, hags on and no crashes or freezes. NV must have fixed something. Same issue (random freezes) but disabling hardware acceleration gpu scheduling did nothing... I'm with the latest version of nvidia driver on w10

Same results, latest drivers granted me longer playtime without freezes, but eventually got one after two hours or so.

Fooughhy commented 1 year ago

I'm running Hogwarts Legacy now, and have been having issues with this. The previous driver I had seemed to have worked (don't remember which one it was) but the newest one (528.49) does not work for me (On Windows 10, that is). But HAGS has a 10% performance increase for this game (for me at least) so it is very unfortunate...

hindsight2021 commented 1 year ago

I'm running Hogwarts Legacy now, and have been having issues with this. The previous driver I had seemed to have worked (don't remember which one it was) but the newest one (528.49) does not work for me (On Windows 10, that is). But HAGS has a 10% performance increase for this game (for me at least) so it is very unfortunate...

Same issue for me with the same game - latest drivers.I just now disabled HAGS to see if it helps my case. Following as I’m curious if there will be long-term fix.

Nonary commented 1 year ago

@Fooughhy @hindsight2021

I have been testing the new drivers out for a few days and I believe this issue has been resolved by NVIDIA, or at the very least, the issue happens much less that you can likely play for hours and hours without encountering it; which is much better than before, which seemed like every 15-30 minutes.

However, there is a similar issue with Sunshine users when they utilize a lot of their VRAM. Sunshine will lock up and freeze and often will not recover until rebooting the process. It is a lot more prevalent specifically to users who try to stream Hogwarts Legacy at 4k with HDR.

Simply enabling HDR on Sunshine can increase VRAM usage by over 400 megabytes and DWM will also consume an additional 300. Because of that, what will happen is pretty much any of the "TI" cards will freeze when playing Hogwarts and streaming at the same time, or run into performance issues as soon as it reaches near 11GB VRAM usage.

Long story short, if you are noticing freezes on Hogwarts, it is not related to this bug as it should be resolved now. Instead, check your VRAM usage and make sure it is under 11GB, ideally keep it in the 10GB range. Turn off HDR, texture resolution and decrease the streaming resolution as a workaround for now.

This VRAM utilization issue has been mentioned to @cgutman and he did have an idea on how to reduce the usage, but its up to the community to fix that. It can be weeks from now, and even if it was fixed it might only free about 300-400MB of VRAM.

Fooughhy commented 1 year ago

@Nonary do you have the same setup though? E.g. Windows 10?

I have monitored the stats that I have, and when you are inside Hogwarts the VRAM usage is not maxed out. But when I noticed these freezes, I immediately reduced the "Texture Quality" setting, which should be the most taxing setting for VRAM, and that did not help.

It should be said I have a 3070, so I have only 8GB VRAM total, but inside Hogwarts I am almost never above 6GB.

But I should say I only started using Moonlight/Sunshine in the last weeks, so I do not know how the issue presented itself before. Because, as you say, I specifically need to restart the Sunshine process for it to work. It doesn't matter if I restart the game, restart moonlight on the client or anything. It is the Sunshine process which locks up.

But I don't use any fancy features for Sunshine (e.g. HDR) and as I said I even lowered Texture Quality without it making ANY difference (it still locks up in the same amount of time, which is 5-10 minutes).

Nonary commented 1 year ago

@Fooughhy

I am on Windows 11, as you may have guessed already I am DemonCat on the discord. I had this exact same issue and when I upgraded to a 4090 it went away. I streamed for 9 hours tonight and encountered zero freezes, with DLSS3 (which requires HAGS)

I would suggest turning everything down to low and settings resolution to something like 480p and standing still for about 10-15 minutes in an area that is not graphically intensive. Alternatively, you could try streaming a game that is like two generations behind or whatever and see if it does the same.

If it was HAGS, it should freeze everywhere, not just Hogwarts Legacy.

Fooughhy commented 1 year ago

Sorry, I have no idea who you are.

I had not yet update to DLSS 3.1 for this particular game. That actually seemed to do the trick, for some unfathomable reason.

I have streamed other games. I tried "HiFi Rush" recently, to test out the latency and no issues there (though the latency was a bit too much on a higher difficulty for me to be able to do well at least).

Till1012 commented 1 year ago

For anyone who is expiriencing this on StarWars Battlefront II, disabling DX12 in the game settings did the trick for me.

onlineapps-cloud commented 1 year ago

hi, i had same problem with driver version: 535.98, without hardware acceleration enabled :(

Danweel commented 1 year ago

Pretty sure this is what's happening to me as well - GeForce RTX 3050 on Windows 11. Running Xsplit Broadcaster for streaming, but freezing on window resizing (mp4 files) and similar noodling. -No game running, though this also happened while actually streaming as well. Just to confirm it's happening still, in July. Vers 31.0.15.3598 Gonna try turning off GPU Scheduling in Windows as recommended here.

I see there's a 536.40 driver out June 29th, gonna stick with 535 with no scheduling, since it's working for now. But here's the note put out with it: Known Issue This driver implements a fix for application stability issues seen during heavy memory usage. We’ve observed some situations where this fix has resulted in performance degradation when running Stable Diffusion and DaVinci Resolve. This will be addressed in an upcoming NVIDIA Studio Driver. So a warning that this might not fix the problem for everyone yet!

BillCipher-exe commented 1 year ago

536.40 seems to be stable even with HAGS enabled. With older driver version i had freezes every 15min in Cyberpunk and now i played for an hour without a single freeze.

Nonary commented 1 year ago

536.40 seems to be stable even with HAGS enabled. With older driver version i had freezes every 15min in Cyberpunk and now i played for an hour without a single freeze.

HAGS freezing has been fixed since the drivers released in February.

snakeeater4526 commented 1 year ago

i still have the freeze with hags enabled with the latest drivers.... on a rtx 3080 10gb ( no more problem with HAGS disabled )

Fooughhy commented 1 year ago

Do you use DLSS on the game? I really have no idea what the issue actually was, unfortunately... But if you use DLSS, you could try disabling it and/or updating it (e.g. using DLSS Swapper)

GingerAdonis commented 1 year ago

Not sure if this was mentioned before. But I'm not getting this issue anymore since I switched to Sunshine.

snakeeater4526 commented 1 year ago

Do you use DLSS on the game? I really have no idea what the issue actually was, unfortunately... But if you use DLSS, you could try disabling it and/or updating it (e.g. using DLSS Swapper)

possibly related, would have to test but hmm... also why swapping dlss?

snakeeater4526 commented 1 year ago

Not sure if this was mentioned before. But I'm not getting this issue anymore since I switched to Sunshine.

oooh nice software, thank you to let me know that one

Fooughhy commented 1 year ago

Not sure if this was mentioned before. But I'm not getting this issue anymore since I switched to Sunshine.

oooh nice software, thank you to let me know that one

I have only been using Sunshine (never Nvidia Gamestream). So the issue shouldn't be related to that.

Do you use DLSS on the game? I really have no idea what the issue actually was, unfortunately... But if you use DLSS, you could try disabling it and/or updating it (e.g. using DLSS Swapper)

possibly related, would have to test but hmm... also why swapping dlss?

Yeah, I don't know why it would be related really, but that was the only thing that I could remember actually changing between when I had issues and when I didn't anymore.

I swap it because DLSS can have issues and later versions can fix those issues. I also know people liked a certain version of DLSS 2 (DLSS 2.5.0) because it still had sharpening built into it.

makedir commented 1 year ago

Just got a new PC with fresh Windows 11 install, latest Nvidia driver, and sunshine + moonlight randomly freezing. So I guess this bug still is not fixed. It is not the PC freezing, just the stream in Moonlight, reconnecting makes it work a random time. Noticed the freezes often happens when opening GFE through the stream, also often when an admin allow GUI is opened.

QuentinSc commented 10 months ago

Still the case on last version and last nvidia driver :(

Chuckame commented 7 months ago

https://github.com/moonlight-stream/nvidia-gamestream-issues/issues/27#issuecomment-1644964303

+1, maybe switching won't have random crashes 🤩

Here their repo: https://github.com/LizardByte/Sunshine

I'll test it soon and keep you informed!

SoyG commented 7 months ago

What kind of display are you using on the host machine? I have an issue with my Samsung TV that I use for my monitor. There is some kind of HDMI reset that happens when the TV is off, which causes Moonlight and Sunshine stream to freeze up every few minutes.

caron0k commented 4 months ago

552.12 not fix it yet...

Chuckame commented 4 months ago

#27 (comment)

+1, maybe switching won't have random crashes 🤩

Here their repo: https://github.com/LizardByte/Sunshine

I'll test it soon and keep you informed!

Confirmed! After hours of gaming, no crash, no freeze, quality is good (image and sound). I would advice anyone to switch to https://github.com/LizardByte/Sunshine ! Also advised to install https://github.com/JosefNemec/Playnite/ to get rid of buggy steam big picture.

FyZzyss commented 3 weeks ago

I have freezes with same frequency and duration (looks like not network problem) even without HAGS with latest Sunshine and Moonlight -_-