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

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

Open
cgutman opened this issue May 4, 2022 · 39 comments
Open

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

cgutman opened this issue May 4, 2022 · 39 comments
Labels
confirmed-by-nvidia This bug has been confirmed by NVIDIA's support team reported-to-nvidia The bug has been reported in NVIDIA's support ticketing system workaround-available

Comments

@cgutman
Copy link
Member

cgutman commented May 4, 2022

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.

@cgutman cgutman added reported-to-nvidia The bug has been reported in NVIDIA's support ticketing system confirmed-by-nvidia This bug has been confirmed by NVIDIA's support team labels May 4, 2022
@BatJoe
Copy link

BatJoe commented Jun 24, 2022

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
Copy link

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
Copy link

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

@Proplex
Copy link

Proplex commented Aug 13, 2022

+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
Copy link

SoyG commented Aug 24, 2022

What are the implications of disabling hardware accelerated GPU scheduling?

@M0dEx
Copy link

M0dEx commented Oct 1, 2022

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
Copy link

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
Copy link

Any word if new drivers 522 fixes hags.

@prolipig
Copy link

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

@thenerdbomberr
Copy link

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
Copy link

barat commented Nov 30, 2022

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
Copy link

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
Copy link

Chuckame commented Jan 3, 2023

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

@BatJoe
Copy link

BatJoe commented Jan 4, 2023

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

@TheN00r
Copy link

TheN00r commented Jan 14, 2023

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
Copy link

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
Copy link

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
Copy link

Nonary commented Feb 15, 2023

@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
Copy link

@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
Copy link

Nonary commented Feb 15, 2023

@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
Copy link

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
Copy link

Till1012 commented Mar 23, 2023

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

@onlineapps-cloud
Copy link

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

@Danweel
Copy link

Danweel commented Jul 5, 2023

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
Copy link

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
Copy link

Nonary commented Jul 16, 2023

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
Copy link

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

@Fooughhy
Copy link

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
Copy link

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

@snakeeater4526
Copy link

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
Copy link

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
Copy link

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
Copy link

makedir commented Aug 24, 2023

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
Copy link

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

@Chuckame
Copy link

#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!

@SoyG
Copy link

SoyG commented Jan 24, 2024

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
Copy link

caron0k commented Apr 11, 2024

552.12 not fix it yet...

@Chuckame
Copy link

#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
Copy link

FyZzyss commented Aug 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-by-nvidia This bug has been confirmed by NVIDIA's support team reported-to-nvidia The bug has been reported in NVIDIA's support ticketing system workaround-available
Projects
None yet
Development

No branches or pull requests