Since kernel 5.15.5 suspending while video is playing and then later resume gives me black screen and unresponsive system
Brief summary of the problem:
Since kernel 5.15.5 ( tried 5.15.6 and 5.15.7 too with same results ) after suspending my system while playing a video in Firefox or MPV, if a video in Firefox was playing and later paused or continued ( tab not closed ) and/or if I'm playing a video using MPV ( not paused ), then suspend and later resume, I then have a black screen, unresponsive system and no sound from video is heard, I then have to cold reboot
If Firefox was playing a video but later closed the tab or playing a video using MPV but then paused it ( MPV still open ), suspend and later resume, resume works.
I've tried this numerous times and the kernel log shows the same errors from amdgpu
Dec 09 12:37:45 hostname kernel: amdgpu 0000:04:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring vcn_dec test failed (-110)
Dec 09 12:37:45 hostname kernel: [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block <vcn_v1_0> failed -110
Dec 09 12:37:45 hostname kernel: amdgpu 0000:04:00.0: amdgpu: amdgpu_device_ip_resume failed (-110).
Dec 09 12:37:45 hostname kernel: PM: dpm_run_callback(): pci_pm_resume+0x0/0xe0 returns -110
Dec 09 12:37:45 hostname kernel: amdgpu 0000:04:00.0: PM: failed to resume async: error -110
I've narrowed it down to this commit from the stable repository
reverting this commit and the issues are gone
Hardware description:
- Laptop: HP Pavilion Laptop 15-cw1507sa
- BIOS: F.46 01/04/2021
- CPU: AMD Ryzen 5 3500U
- GPU: <
lspci -nn | grep VGA
orlshw -C display -numeric
>
$ lspci -nn | grep VGA
04:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso [1002:15d8] (rev c2)
$ sudo lshw -C display -numeric
*-display
description: VGA compatible controller
product: Picasso [1002:15D8]
vendor: Advanced Micro Devices, Inc. [AMD/ATI] [1002]
physical id: 0
bus info: pci@0000:04:00.0
version: c2
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi msix vga_controller bus_master cap_list
configuration: driver=amdgpu latency=0
resources: irq:24 memory:e0000000-efffffff memory:f0000000-f01fffff ioport:e000(size=256) memory:fe600000-fe67ffff
- System Memory: 32GB
- Display(s): Embedded panel
- Type of Display Connection: eDP
System information:
- Distro name and Version: Arch Linux 5.15.5 ( also tried 5.15.6 and 5.15.7 )
- Kernel version: Linux version 5.15.5-1-byw-llvm-znver1 #1 SMP PREEMPT Thu, 25 Nov 2021 11:38:29 +0000
- Custom kernel: Based on Arch Linux kernel config compiled it using both GCC and LLVM, tried Arch Linux stock kernel
- AMD official driver version: n/a
How to reproduce the issue:
- Configure Firefox to use hardware acceleration ( it's default enabled now with version 94 or 95 and I use 95 )
- Configure MPV to use VA-API
### from from my ~/.config/mpv/mpv.conf
profile=gpu-hq
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
dscale=ewa_lanczossharp
tscale=oversample
vo=gpu
hwdec=vaapi-copy
gpu-context=x11vk
gpu-api=vulkan
vulkan-swap-mode=fifo
vulkan-queue-count=4
vulkan-async-transfer
vulkan-async-compute
swapchain-depth=2
video-sync=display-vdrop
then
- Open Firefox and go to youtube and choose a video to play
- Pause the video or leave it playing but don't close the tab
and/or...
- Open MPV and choose a video file to play that can be hardware accelerated ( mkv, mp4 for example )
- Leave it playing
then to fail the resume
- Suspend the system and resume and that's where I get a black screen and unresponsive system, no sound from video is heard
or to succeed in resume
- For Firefox - Close the tab(s) that have video(s) playing
- For MPV - Pause the video but don't close it
- Suspend and resume of the system works