chenxiaolong / jellyfin-ffmpeg-fedora

Unofficial Fedora packaging scripts for jellyfin-ffmpeg
10 stars 0 forks source link

Nvidia problems #2

Open boniek83 opened 1 year ago

boniek83 commented 1 year ago

Since upgrading to fedora 38 I have problems with seemingly random jellyfin playback issues. Playback stops till I restart machine that is transcoding. I've observed following logs in dmesg:

[ 1090.730454] NVRM: GPU at PCI:0000:08:00: GPU-61384354-22fb-d1e5-559a-ce6ceb5da0d6
[ 1090.730461] NVRM: Xid (PCI:0000:08:00): 31, pid=8798, name=ffmpeg, Ch 00000018, intr 10000000. MMU Fault: ENGINE HOST0 HUBCLIENT_HOST faulted @ 0x2_00200000. Fault is of type FAULT_PDE ACCESS_TYPE_READ
[ 1090.730964] NVRM: Xid (PCI:0000:08:00): 31, pid=8798, name=ffmpeg, Ch 00000020, intr 10000000. MMU Fault: ENGINE HOST6 HUBCLIENT_HOST faulted @ 0x2_01201000. Fault is of type FAULT_PDE ACCESS_TYPE_READ
[ 1095.649640] NVRM: Xid (PCI:0000:08:00): 31, pid=703, name=(udev-worker), Ch 00000002, intr 10000000. MMU Fault: ENGINE HOST6 HUBCLIENT_HOST faulted @ 0x1_01010000. Fault is of type FAULT_PDE ACCESS_TYPE_READ
lis 13 16:24:28 zen jellyfin[5279]: [16:24:28] [ERR] [58] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 1
lis 13 16:24:28 zen jellyfin[5279]: [16:24:28] [ERR] [58] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL GET /videos/20e4ce6a-af6d-42e8-8492-ab11fb4c374e/hls1/main/0.ts.
lis 13 16:24:28 zen jellyfin[5279]: MediaBrowser.Common.FfmpegException: FFmpeg exited with code 1
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Api.Helpers.TranscodingJobHelper.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, HttpRequest request, TranscodingJobType transcodingJobType, CancellationTokenSource cancellationTokenSource, String workingDirectory)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Api.Controllers.DynamicHlsController.GetDynamicSegment(StreamingRequestDto streamingRequest, Int32 segmentId)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Api.Controllers.DynamicHlsController.GetHlsVideoSegment(Guid itemId, String playlistId, Int32 segmentId, String container, Int64 runtimeTicks, Int64 actualSegmentLengthTicks, Nullable`1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable`1 segmentLength, Nullable`1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable`1 enableAutoStreamCopy, Nullable`1 allowVideoStreamCopy, Nullable`1 allowAudioStreamCopy, Nullable`1 breakOnNonKeyFrames, Nullable`1 audioSampleRate, Nullable`1 maxAudioBitDepth, Nullable`1 audioBitRate, Nullable`1 audioChannels, Nullable`1 maxAudioChannels, String profile, String level, Nullable`1 framerate, Nullable`1 maxFramerate, Nullable`1 copyTimestamps, Nullable`1 startTimeTicks, Nullable`1 width, Nullable`1 height, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 videoBitRate, Nullable`1 subtitleStreamIndex, Nullable`1 subtitleMethod, Nullable`1 maxRefFrames, Nullable`1 maxVideoBitDepth, Nullable`1 requireAvc, Nullable`1 deInterlace, Nullable`1 requireNonAnamorphic, Nullable`1 transcodingMaxAudioChannels, Nullable`1 cpuCoreLimit, String liveStreamId, Nullable`1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable`1 audioStreamIndex, Nullable`1 videoStreamIndex, Nullable`1 context, Dictionary`2 streamOptions)
lis 13 16:24:28 zen jellyfin[5279]:    at lambda_method845(Closure , Object )
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Server.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
lis 13 16:24:28 zen jellyfin[5279]:    at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
lis 13 16:24:28 zen jellyfin[5279]:    at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
lis 13 16:24:28 zen jellyfin[5279]:    at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
lis 13 16:24:28 zen jellyfin[5279]:    at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
lis 13 16:24:28 zen jellyfin[5279]:    at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

My gpu is geforce 1080ti. Relevant package versions: jellyfin-firewalld-10.8.11-3.fc38.noarch jellyfin-server-10.8.11-3.fc38.x86_64 jellyfin-web-10.8.11-3.fc38.noarch jellyfin-10.8.11-3.fc38.x86_64 jellyfin-ffmpeg-6.0-8.1.fc38.x86_64 nvidia-gpu-firmware-20231030-1.fc38.noarch xorg-x11-drv-nvidia-cuda-libs-535.129.03-2.fc38.x86_64 xorg-x11-drv-nvidia-libs-535.129.03-2.fc38.x86_64 xorg-x11-drv-nvidia-kmodsrc-535.129.03-2.fc38.x86_64 nvidia-settings-535.129.03-1.fc38.x86_64 xorg-x11-drv-nvidia-535.129.03-2.fc38.x86_64 akmod-nvidia-535.129.03-1.fc38.x86_64 nvidia-persistenced-535.129.03-1.fc38.x86_64 xorg-x11-drv-nvidia-cuda-535.129.03-2.fc38.x86_64 kmod-nvidia-6.5.10-200.fc38.x86_64-535.129.03-1.fc38.x86_64 nv-codec-headers-12.1.14.0-1.fc38.noarch

chenxiaolong commented 1 year ago

Can you try downloading the upstream portable binaries (eg. jellyfin-ffmpeg_6.0-8_portable_linux64-gpl.tar.xz from https://github.com/jellyfin/jellyfin-ffmpeg/releases/tag/v6.0-8) and replacing /usr/libexec/jellyfin-ffmpeg/{ffmpeg,ffprobe} with those? (You can revert back to the RPM's binaries later by reinstalling the RPM.)

I'm guessing the same thing will happen there since my package is compiled against the same nv-codec-headers version as theirs. If you encounter the same issue with the upstream binaries, you'll probably want to report the issue there.