This is rather strange. If GNOME is running on the AMD GPU, mpv shouldn’t be using the NVIDIA GPU by default. Can you check what version of the egl-wayland package you have installed? There was a bug that would cause it to still try to use the NVIDIA GPU in such cases (which would fail), but that should be fixed as of the latest version 1.1.10.
However, if you do want to have mpv use the NVIDIA GPU, with the latest 515 NVIDIA driver you can set __NV_PRIME_RENDER_OFFLOAD=1 which should work. Although do note that this also requires egl-wayland 1.1.10.
I just installed egl-wayland-git, i.e. compiled from the latest source. After setting __NV_PRIME_RENDER_OFFLOAD=1, the system will no longer freeze, and it can indeed be decoded by nvdec. If __NV_PRIME_RENDER_OFFLOAD=1 is not set, the system will still freeze
It is not normal for a userspace program to cause a kernel panic. The normal situation is that it cannot be decoded at most, so don’t let the system crash
Yeah, the fact that this is crashing the kernel instead of failing more gracefully is a bug in itself. Maybe __nv_drm_gem_nvkms_memory_prime_get_sg_table should be returning an empty sg_table instead of NULL in such cases.
Calling the NVIDIA GPU doesn’t mean it crashes, it crashes because NVDEC is called. When mpv video.mp4 is executed, AMD GPU is called; when prime-run mpv video.mp4 is executed, NVIDIA GPU is used, and the video can be played. However, when mpv --hwdec=auto video.mp4 is executed, NVDEC will be called, and the kernel will crash immediately.
Could you try running with --msg-level=vo=v? When I run mpv on a hybrid graphics system with --hwdec=auto or --hwdec=nvdec it does try to initialize nvdec, but fails to do so. This is expected since it’s running on the integrated GPU.
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu/cuda-nvdec] cu->cuGLGetDevices(&device_count, &display_dev, 1, CU_GL_DEVICE_LIST_ALL) failed -> CUDA_ERROR_INVALID_GRAPHICS_CONTEXT: invalid OpenGL or DirectX context
[vo/gpu/cuda-nvdec] CUDA hwdec only works with OpenGL or Vulkan backends.
[vo/gpu] Loading failed.
After further testing, I found that if I played a long video, the external monitor connected to the NVIDIA GPU would freeze after a while. I try to logout and login to the desktop again, the external monitor is still frozen.
~ » journalctl -r -p 3
Jun 10 01:19:08 laptop-legion gdm[612]: Gdm: Failed to list cached users: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.9 was not provided by any .service files
Jun 10 01:18:05 laptop-legion bluetoothd[719]: profiles/audio/avctp.c:avctp_control_confirm() Control: Refusing unexpected connect
Jun 10 01:18:01 laptop-legion gdm-launch-environment][5754]: GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Jun 10 01:17:57 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:17:54 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:17:51 laptop-legion gdm-password][6053]: gkr-pam: unable to locate daemon control file
Jun 10 01:17:43 laptop-legion bluetoothd[719]: profiles/audio/avctp.c:avctp_control_confirm() Control: Refusing unexpected connect
Jun 10 01:17:42 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:17:38 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:17:34 laptop-legion gnome-session-binary[5774]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed
Jun 10 01:17:34 laptop-legion gnome-session-binary[5774]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed
Jun 10 01:17:33 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:17:30 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:16:37 laptop-legion gdm-launch-environment][4733]: GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Jun 10 01:16:36 laptop-legion bluetoothd[719]: profiles/audio/avctp.c:avctp_control_confirm() Control: Refusing unexpected connect
Jun 10 01:16:36 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:16:31 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:16:28 laptop-legion gdm-password][5026]: gkr-pam: unable to locate daemon control file
Jun 10 01:16:25 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:16:24 laptop-legion bluetoothd[719]: profiles/audio/avctp.c:avctp_control_confirm() Control: Refusing unexpected connect
Jun 10 01:16:20 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:16:17 laptop-legion gnome-session-binary[4753]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed
Jun 10 01:16:17 laptop-legion gnome-session-binary[4753]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed
Jun 10 01:16:16 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:16:13 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:16:00 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:15:56 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:15:46 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0
Jun 10 01:14:24 laptop-legion kernel: [drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to apply atomic modeset. Error code: -22
Jun 10 01:05:29 laptop-legion bluetoothd[719]: profiles/audio/avctp.c:avctp_control_confirm() Control: Refusing unexpected connect
Jun 10 01:05:21 laptop-legion bluetoothd[719]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Jun 10 01:05:11 laptop-legion kernel: Bluetooth: hci0: Opcode 0x 401 failed: -16
Jun 10 00:48:07 laptop-legion bluetoothd[719]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Jun 10 00:48:01 laptop-legion gdm-launch-environment][623]: GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Jun 10 00:47:57 laptop-legion gdm-password][1030]: gkr-pam: unable to locate daemon control file
Jun 10 00:47:54 laptop-legion kernel: Bluetooth: hci0: Malformed MSFT vendor event: 0x02
Jun 10 00:47:53 laptop-legion gnome-session-binary[667]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed
Jun 10 00:47:53 laptop-legion gnome-session-binary[667]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed
Jun 10 00:47:52 laptop-legion kernel:
Jun 10 00:47:52 laptop-legion kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20211217/psobject-220)
Jun 10 00:47:52 laptop-legion kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.PB2], AE_NOT_FOUND (20211217/dswload2-162)
@fiepi
I am not able to repro issue on below configuration setup -
Acer Nitro AN517-41 + Arch Linux + kernel 5.18.10-arch1-1 + NVIDIA GeForce GTX 1650 + Driver 515.43.04 + BenQ EL2870U Display connected via HDMI + GNOME 42.3 + Windowing System Wayland
I am able to play video using below command without any issue.
[root@archbox-tecmint ~]# mpv -hwdec=nvdec h265_720p_20mbps_60fps.mp4
(+) Video --vid=1 () (hevc 1280x720 60.000fps)
(+) Audio --aid=1 () (aac 2ch 48000Hz)
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
[ao/alsa] Playback open error: No such file or directory
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[ao/jack] cannot open server
[ao] Failed to initialize audio driver ‘jack’
Could not open/initialize audio device → no sound.
Audio: no audio
VO: [gpu] 1280x720 yuv420p
V: 00:01:02 / 00:01:02 (100%) Dropped: 53
Exiting… (Interrupted by error)
[root@archbox-tecmint ~]#
Is it possible for you to install fresh OS and try running mpv player to rule out any system configuration issue.
I just replaced the hard drive a while ago, so I reinstalled the system once. 720P video can now be played using NVDEC. But I just tried to play a 4K 60fps game video that recorded under Windows using GeForce Experience, two seconds GNOME crashes and then goes back to GDM
kernel 5.18.12 + driver 515.57 + gnome 42.3 + 4k display via type-c to dp
720p:
~ » prime-run mpv --msg-level=vo=v --hwdec=nvdec paimon.flv
(+) Video --vid=1 (h264 1280x720 30.067fps)
(+) Audio --aid=1 (aac 2ch 44100Hz)
File tags:
Description: Bilibili VXCode Swarm Transcoder v0.7.22
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'wayland'
[vo/gpu/wayland] Registered for protocol wl_compositor
[vo/gpu/wayland] Registered for protocol wl_shm
[vo/gpu/wayland] Registered for protocol wl_output
[vo/gpu/wayland] Registered for protocol wl_output
[vo/gpu/wayland] Registered for protocol wl_data_device_manager
[vo/gpu/wayland] Registered for protocol xdg_wm_base
[vo/gpu/wayland] Registered for protocol wl_seat
[vo/gpu/wayland] Registered for protocol wp_presentation
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
[vo/gpu/wayland] Compositor doesn't support the zxdg_decoration_manager_v1 protocol!
[vo/gpu/wayland] Compositor doesn't support the zwp_idle_inhibit_manager_v1 protocol!
[vo/gpu/opengl] EGL_VERSION=1.5
[vo/gpu/opengl] EGL_VENDOR=NVIDIA
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL_ES OpenGL
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/wayland] GL_VERSION='4.4.0 NVIDIA 515.57'
[vo/gpu/wayland] Detected desktop OpenGL 4.4.
[vo/gpu/wayland] GL_VENDOR='NVIDIA Corporation'
[vo/gpu/wayland] GL_RENDERER='NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2'
[vo/gpu/wayland] GL_SHADING_LANGUAGE_VERSION='4.40 NVIDIA via Cg compiler'
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu/wayland] Registered output SKY 28U1 (0x4):
[vo/gpu/wayland] x: 2560px, y: 0px
[vo/gpu/wayland] w: 3840px (620mm), h: 2160px (330mm)
[vo/gpu/wayland] scale: 2
[vo/gpu/wayland] Hz: 60.075000
[vo/gpu/wayland] Registered output CSO 0x1609 (0x5):
[vo/gpu/wayland] x: 0px, y: 560px
[vo/gpu/wayland] w: 2560px (340mm), h: 1600px (220mm)
[vo/gpu/wayland] scale: 2
[vo/gpu/wayland] Hz: 165.018000
[vo/gpu] Resize: 0x0
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu/vaapi-egl] using VAAPI EGL interop
[vo/gpu/vaapi-egl] Trying to open a x11 VA display...
[vo/gpu/vaapi-egl] Trying to open a wayland VA display...
[vo/gpu/vaapi-egl/vaapi] Initialized VAAPI: version 1.15
[vo/gpu/vaapi-egl] Going to probe surface formats (may log bogus errors)...
[vo/gpu/vaapi-egl] Done probing surface formats.
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
Using hardware decoding (nvdec).
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 1280x720 cuda[nv12]
[vo/gpu] reconfig to 1280x720 cuda[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/wayland] Reconfiguring!
[vo/gpu] Resize: 1280x720
[vo/gpu] Window size: 1280x720 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 1280x720 (1:1)
[vo/gpu] Video display: (0, 0) 1280x720 -> (0, 0) 1280x720
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu/wayland] Handling resize on the egl side
[vo/gpu] Resize: 1280x720
[vo/gpu] Window size: 1280x720 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 1280x720 (1:1)
[vo/gpu] Video display: (0, 0) 1280x720 -> (0, 0) 1280x720
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Dither to 8.
[vo/gpu/wayland] Given DND offer with mime type text/plain
[vo/gpu/wayland] Given DND offer with mime type text/plain;charset=utf-8
[vo/gpu/wayland] Surface entered output SKY 28U1 (0x4), scale = 2
[vo/gpu/wayland] Handling resize on the egl side
[vo/gpu] Resize: 1280x720
[vo/gpu] Window size: 1280x720 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 1280x720 (1:1)
[vo/gpu] Video display: (0, 0) 1280x720 -> (0, 0) 1280x720
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Assuming 60.075000 FPS for display sync.
AV: 00:00:00 / 00:00:44 (1%) A-V: 0.000 Dropped: 2
[vo/gpu] Reallocating OSD texture to 2048x256.
AV: 00:00:44 / 00:00:44 (99%) A-V: 0.000 Dropped: 2
Exiting... (End of file)
[vo/gpu/wayland] Deregistering output CSO 0x1609 (0x5)
[vo/gpu/wayland] Deregistering output SKY 28U1 (0x4)
4k:
~ » prime-run mpv --msg-level=vo=v --hwdec=nvdec Genshin\ Impact\ 2022.07.15\ -\ 12.29.50.01.mp4 > 4k.log
~ » cat 4k.log
(+) Video --vid=1 (*) (h264 3840x2160 59.990fps)
(+) Audio --aid=1 (*) (aac 2ch 48000Hz)
File tags:
Date: 2022
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'wayland'
[vo/gpu/wayland] Registered for protocol wl_compositor
[vo/gpu/wayland] Registered for protocol wl_shm
[vo/gpu/wayland] Registered for protocol wl_output
[vo/gpu/wayland] Registered for protocol wl_output
[vo/gpu/wayland] Registered for protocol wl_data_device_manager
[vo/gpu/wayland] Registered for protocol xdg_wm_base
[vo/gpu/wayland] Registered for protocol wl_seat
[vo/gpu/wayland] Registered for protocol wp_presentation
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
[vo/gpu/wayland] Compositor doesn't support the zxdg_decoration_manager_v1 protocol!
[vo/gpu/wayland] Compositor doesn't support the zwp_idle_inhibit_manager_v1 protocol!
[vo/gpu/opengl] EGL_VERSION=1.5
[vo/gpu/opengl] EGL_VENDOR=NVIDIA
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL_ES OpenGL
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/wayland] GL_VERSION='4.4.0 NVIDIA 515.57'
[vo/gpu/wayland] Detected desktop OpenGL 4.4.
[vo/gpu/wayland] GL_VENDOR='NVIDIA Corporation'
[vo/gpu/wayland] GL_RENDERER='NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2'
[vo/gpu/wayland] GL_SHADING_LANGUAGE_VERSION='4.40 NVIDIA via Cg compiler'
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu/wayland] Registered output SKY 28U1 (0x4):
[vo/gpu/wayland] x: 2560px, y: 0px
[vo/gpu/wayland] w: 3840px (620mm), h: 2160px (330mm)
[vo/gpu/wayland] scale: 2
[vo/gpu/wayland] Hz: 60.075000
[vo/gpu/wayland] Registered output CSO 0x1609 (0x5):
[vo/gpu/wayland] x: 0px, y: 560px
[vo/gpu/wayland] w: 2560px (340mm), h: 1600px (220mm)
[vo/gpu/wayland] scale: 2
[vo/gpu/wayland] Hz: 165.018000
[vo/gpu] Resize: 0x0
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu/vaapi-egl] using VAAPI EGL interop
[vo/gpu/vaapi-egl] Trying to open a x11 VA display...
[vo/gpu/vaapi-egl] Trying to open a wayland VA display...
[vo/gpu/vaapi-egl/vaapi] Initialized VAAPI: version 1.15
[vo/gpu/vaapi-egl] Going to probe surface formats (may log bogus errors)...
[vo/gpu/vaapi-egl] Done probing surface formats.
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
Using hardware decoding (nvdec).
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 3840x2160 cuda[nv12]
[vo/gpu] reconfig to 3840x2160 cuda[nv12] bt.601/bt.601-525/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/wayland] Reconfiguring!
[vo/gpu] Resize: 3840x2160
[vo/gpu] Window size: 3840x2160 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 3840x2160 (1:1)
[vo/gpu] Video display: (0, 0) 3840x2160 -> (0, 0) 3840x2160
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu/wayland] Handling resize on the egl side
[vo/gpu] Resize: 3840x2160
[vo/gpu] Window size: 3840x2160 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 3840x2160 (1:1)
[vo/gpu] Video display: (0, 0) 3840x2160 -> (0, 0) 3840x2160
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Dither to 8.
[vo/gpu/wayland] Given DND offer with mime type text/plain
[vo/gpu/wayland] Given DND offer with mime type text/plain;charset=utf-8
[vo/gpu/wayland] Surface entered output SKY 28U1 (0x4), scale = 2
[vo/gpu] Resize: 3840x2160
[vo/gpu] Window size: 3840x2160 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 3840x2160 (1:1)
[vo/gpu] Video display: (0, 0) 3840x2160 -> (0, 0) 3840x2160
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu/wayland] Handling resize on the egl side
[vo/gpu] Resize: 3840x2160
[vo/gpu] Window size: 3840x2160 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 3840x2160 (1:1)
[vo/gpu] Video display: (0, 0) 3840x2160 -> (0, 0) 3840x2160
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Assuming 60.075000 FPS for display sync.
~ » journalctl -p 3 -r
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
Jul 21 22:23:33 laptop-legion kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001
I am not able to repro issue with 4k clip as below -
[root@archbox-tecmint ~]# mpv -hwdec=nvdec Sample\ 4k\ UHD\ (Ultra\ HD)\ video\ download\ -\ looks\ amazing\ on\ a\ 5k\ display.mp4
(+) Video --vid=1 () (h264 3846x2160 23.978fps)
(+) Audio --aid=1 () (aac 2ch 44100Hz)
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
[ao/alsa] Playback open error: No such file or directory
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[ao/jack] cannot open server
[ao] Failed to initialize audio driver ‘jack’
Could not open/initialize audio device → no sound.
Audio: no audio
VO: [gpu] 3846x2160 yuv420p
V: 00:04:28 / 00:04:29 (100%)
Exiting… (Interrupted by error)
[root@archbox-tecmint ~]#
Could you please share repro video clip if possible so that I can try the same locally.
Previously I had an external 4k monitor, and now I don’t have such a monitor around, so now I’m testing on the built-in screen, no crashes.
Kernel: 6.0.6
Driver: 520.56.06
prime-run mpv --msg-level=vo=v --hwdec=nvdec demo-4k.mp4
(+) Video --vid=1 (*) (h264 3840x2160 60.000fps)
(+) Audio --aid=1 (*) (aac 2ch 48000Hz)
File tags:
Date: 2022
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'wayland'
[vo/gpu/wayland] Registered for protocol wl_compositor
[vo/gpu/wayland] Registered for protocol wl_shm
[vo/gpu/wayland] Registered for protocol wl_output
[vo/gpu/wayland] Registered for protocol wl_data_device_manager
[vo/gpu/wayland] Registered for protocol xdg_wm_base
[vo/gpu/wayland] Registered for protocol wl_seat
[vo/gpu/wayland] Registered for protocol wp_presentation
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
[vo/gpu/wayland] Compositor doesn't support the zxdg_decoration_manager_v1 protocol!
[vo/gpu/wayland] Compositor doesn't support the zwp_idle_inhibit_manager_v1 protocol!
[vo/gpu/opengl] EGL_VERSION=1.5
[vo/gpu/opengl] EGL_VENDOR=NVIDIA
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL_ES OpenGL
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/wayland] GL_VERSION='4.4.0 NVIDIA 520.56.06'
[vo/gpu/wayland] Detected desktop OpenGL 4.4.
[vo/gpu/wayland] GL_VENDOR='NVIDIA Corporation'
[vo/gpu/wayland] GL_RENDERER='NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2'
[vo/gpu/wayland] GL_SHADING_LANGUAGE_VERSION='4.40 NVIDIA via Cg compiler'
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu/wayland] Registered output CSO 0x1609 (0x4):
[vo/gpu/wayland] x: 0px, y: 0px
[vo/gpu/wayland] w: 2560px (340mm), h: 1600px (220mm)
[vo/gpu/wayland] scale: 2
[vo/gpu/wayland] Hz: 165.018000
[vo/gpu] Resize: 0x0
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu/vaapi-egl] using VAAPI EGL interop
[vo/gpu/vaapi-egl] Trying to open a x11 VA display...
[vo/gpu/vaapi-egl] Trying to open a wayland VA display...
[vo/gpu/vaapi-egl/vaapi] Initialized VAAPI: version 1.16
[vo/gpu/vaapi-egl] Going to probe surface formats (may log bogus errors)...
[vo/gpu/vaapi-egl] Done probing surface formats.
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
Using hardware decoding (nvdec).
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 3840x2160 cuda[nv12]
[vo/gpu] reconfig to 3840x2160 cuda[nv12] bt.601/bt.601-525/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/wayland] Reconfiguring!
[vo/gpu] Resize: 3840x2160
[vo/gpu] Window size: 3840x2160 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 3840x2160 (1:1)
[vo/gpu] Video display: (0, 0) 3840x2160 -> (0, 0) 3840x2160
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu/wayland] Handling resize on the egl side
[vo/gpu] Resize: 3840x2160
[vo/gpu] Window size: 3840x2160 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 3840x2160 (1:1)
[vo/gpu] Video display: (0, 0) 3840x2160 -> (0, 0) 3840x2160
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Dither to 8.
[vo/gpu/wayland] Resizing due to xdg from 3840x2160 to 2560x1440
[vo/gpu] Resize: 3840x2160
[vo/gpu] Window size: 3840x2160 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 3840x2160 (1:1)
[vo/gpu] Video display: (0, 0) 3840x2160 -> (0, 0) 3840x2160
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu/wayland] Handling resize on the egl side
[vo/gpu] Resize: 2560x1440
[vo/gpu] Window size: 2560x1440 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 3840x2160 (1:1)
[vo/gpu] Video display: (0, 0) 3840x2160 -> (0, 0) 2560x1440
[vo/gpu] Video scale: 0.666667/0.666667
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu/wayland] Surface entered output CSO 0x1609 (0x4), scale = 2
[vo/gpu] Assuming 165.018000 FPS for display sync.
AV: 00:00:00 / 00:00:30 (0%) A-V: 0.011
[vo/gpu] Reallocating OSD texture to 4096x512.
AV: 00:00:29 / 00:00:30 (100%) A-V: 0.000
Exiting... (End of file)
[vo/gpu/wayland] Deregistering output CSO 0x1609 (0x4)