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

Windows GPU switching (Nvidia Optimus/MUX Switch) crashes player, requires workaround #395

Closed
Beck-919 opened this issue Mar 11, 2023 · 16 comments
Labels
bug Something isn't working

Comments

@Beck-919
Copy link

Describe the bug

Jellyfin media player crashes when trying to launch. Using latest version 1.8.1. Same issue as #297.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Jellyfin Media Player shortcut'
  2. Click on 'Jellyfin Media Player'
  3. See error '....'

Expected behavior

Jellyfin media player console opens.

Screenshots

Screenshot 2023-03-11 224408

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: 10.0.22621 Build 22621
  • Installation Method: Windows installer

Additional context

  1. Did not have any issue last week.
  2. Tried the solution given by @zjeffer in Jellyfin Media player will not launch Windows 11 #297, did not work.
  3. Also tried using version 1.7.1, to check if it fixes anything.
  4. No updates from Windows update.
  5. Here is the latest log: JellyfinMediaPlayer.log
  6. Have also commented on Jellyfin Media player will not launch Windows 11 #297, but that issue is closed. Hence opening a new one.
@Beck-919 Beck-919 added the bug Something isn't working label Mar 11, 2023
@iwalton3
Copy link
Member

It looks like the web client isn't loading at all. Do you just get a white screen? Does it actually "crash"?

You may want to try connecting devtools: https://github.com/jellyfin/jellyfin-media-player#web-debugger

@Beck-919 Beck-919 changed the title Jellyfin media player creashes in Windows 11 Jellyfin media player crashes in Windows 11 Mar 11, 2023
@Beck-919
Copy link
Author

It crashes immediately after, didn't want to attach a screenshot of blank desktop after it did.

I am still able to connect from the Android client as well as the localhost:8096 from the server.

Will follow up with the debugging screenshot.

@Beck-919
Copy link
Author

I am assuming this is what you meant by using the web-debugger. (Using Edge, which is Chromium based)

Screenshot 2023-03-11 232844

Screenshot 2023-03-11 233246

I have not used this before, so correct me if I am wrong. It doesn't seem to detect the device/app OR the app is crashing before it can detect.

@iwalton3
Copy link
Member

Since it is actually crashing I doubt the web debugger will work.

@Beck-919
Copy link
Author

Ah, ok! Let me know if any more logging is required from my end.

From the logs does it seem like it is something I could fix from my end or do I need to wait for a fix?

@iwalton3
Copy link
Member

The logs don't tell me anything useful. It seems the client just hard crashes before anything useful got logged.

@Beck-919
Copy link
Author

Anything else I should try? In hard crashes like this what is the next step?

I understand that the project is open-source and an issue like this may not be a top priority. That said, I am on the latest version of Windows 11, so you can probably expect similar issues to come in soon.

@zjeffer
Copy link

zjeffer commented Mar 12, 2023

Do you see anything in Reliability History or Event Viewer?

@iwalton3
Copy link
Member

I understand that the project is open-source and an issue like this may not be a top priority. That said, I am on the latest version of Windows 11, so you can probably expect similar issues to come in soon.

If multiple people start having this issue it becomes a fairly high priority item. I don't currently have any virtual machines running Windows 11 so my hope is someone else will find the problem and tell me what it is. I will probably just get it working in libvirt though if it does become a huge issue.

@Beck-919
Copy link
Author

@zjeffer, good idea:

Event Viewer for the crash:

Faulting application name: JellyfinMediaPlayer.exe, version: 0.0.0.0, time stamp: 0x63ea149b
Faulting module name: nvcuda64.dll, version: 31.0.15.3118, time stamp: 0x63f92c60
Exception code: 0xc0000409
Fault offset: 0x000000000053c834
Faulting process ID: 0x0x34E4
Faulting application start time: 0x0x1D956617C7FD55F
Faulting application path: C:\Program Files\Jellyfin\Jellyfin Media Player\JellyfinMediaPlayer.exe
Faulting module path: C:\WINDOWS\system32\DriverStore\FileRepository\nvami.inf_amd64_31d22b1b18d1e932\nvcuda64.dll
Report ID: f39ea7aa-ff3c-44f2-bd38-b17799220cc7
Faulting package full name:
Faulting package-relative application ID:

Reliability history for today:

image

I think the first event in Reliability History is expected, as Asus software is not that stable.

Sorry I waited a few days for reporting on this. When I tried to get these details yesterday, I started working fine!
I was going to close the issue if it was still working today. But you can see the results for itself.

@iwalton3, thanks for letting me know! Will these logs help you isolate the issue?

@Beck-919
Copy link
Author

Beck-919 commented Mar 14, 2023

Now that I looked over the Event Viewer log, I believe it is caused by Nvidia driver as the discrete card is disabled by the mux switch.
I tried to set it to use the integrated graphics in the Nvidia Control Panel, no go.

But the setting in Windows settings helps:

  1. Start -> Settings -> System -> Display -> Graphics.
  2. Add the program manually.
  3. Change the graphics option to 'Power Saving' for JellyfinMediaPlayer.exe.

Hopefully this will fix it, I will keep the ticket open for a few days to verify?

@iwalton3, please see if it is possible to default to using integrated graphics and/or have an option to choose one in the player settings. Most High Performance laptops nowadays feature auto-mux switches, so it might be a forward-looking change. Either way please let me know your thoughts on this.

Also @zjeffer, thanks. Your suggestion really helped.

@iwalton3
Copy link
Member

That's a fun detail. I wonder how an application declares that it requires "gaming mode". I did some quick googling but I did not see anything about setting that preference on the application manifest. It seems to imply that Windows "decides" somehow.

I'm leaving this open in case more people have this issue or someone finds a possible way to deal with this.

@iwalton3 iwalton3 changed the title Jellyfin media player crashes in Windows 11 Windows GPU switching (Nvidia Optimus/MUX Switch) crashes player, requires workaround Mar 14, 2023
@Beck-919
Copy link
Author

I am still seeing issues. The fix I mentioned fails after a restart or a new version (app) install.
Need to apply the fix again after removing the app from the 'Gaming Mode' list.

For some reason, Windows always tries to use the Nvidia driver and fails (obviously!).

@Beck-919
Copy link
Author

New ticket #410 opened, same issue.

@alexandrezhang
Copy link

modify"\Users\XXXX\AppData\Local\JellyfinMediaPlayerjellyfinmediaplayer.conf"
like this:
"useOpenGL": false,

@Beck-919
Copy link
Author

@alexandrezhang, I didn't require that particular fix. One of the updates seems to have resolved the issue.

I am closing this as I am no longer able to reproduce this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants