mpv-player / mpv-player/mpv

`vo=gpu` keeps dGPU awake while using the iGPU for hw decoding

Open
#15,981 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

os:linux
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv Information
mpv 0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0
FFmpeg version: 7.1
FFmpeg library versions:
   libavcodec      61.3.100 (runtime 61.19.100)
   libavdevice     61.1.100 (runtime 61.3.100)
   libavfilter     10.1.100 (runtime 10.4.100)
   libavformat     61.1.100 (runtime 61.7.100)
   libavutil       59.8.100 (runtime 59.39.100)
   libswresample   5.1.100 (runtime 5.3.100)
   libswscale      8.1.100 (runtime 8.3.100)
Other Information
- Linux version:
NAME="Fedora Linux"
VERSION_CODENAME=""
PRETTY_NAME="Fedora Linux 41 (Workstation Edition)"
CPE_NAME="cpe:/o:fedoraproject:fedora:41"
DEFAULT_HOSTNAME="fedora"

- Kernel Version:
Linux sieger 6.13.5-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Feb 27 15:07:31 UTC 2025 x86_64 GNU/Linux

- GPU Model:
06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c6)
01:00.0 3D controller [0302]: NVIDIA Corporation GA107M [GeForce RTX 3050 Mobile] [10de:25a2] (rev a1)

- Mesa/GPU Driver Version:
GPU0 (radv): Mesa 25.0.0
GPU1 (NVIDIA): 570.86.16

- Window Manager and Version:
KDE Plasma Version: 6.3.1

- Source of mpv:
fedora repository
Reproduction Steps

On a laptop with an AMD iGPU + NVIDIA dGPU, play either a H.264 or HEVC file with mpv --no-config $file --hwdec=yes --log-file=log.txt.

Expected Behavior

Output of watch cat /sys/class/drm/card0/device/power_state should be D3cold while mpv is open.

Actual Behavior

Output of watch cat /sys/class/drm/card0/device/power_state is D0 while mpv is open.
Output of sudo lsof /dev/nvidia0 shows mpv opening 5 file descriptors.

Image

Log File

log.txt

Sample Files

Big Buck Bunny

I carefully read all instruction and confirm that I did the following:
  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided mpv command on the AMD iGPU/NVIDIA dGPU setup, then inspect log.txt and the reported power-state and /dev/nvidia0 observations. Done means hardware decoding still works while the NVIDIA device remains in D3cold and mpv no longer opens the reported NVIDIA device descriptors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
audio-video-rtc, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.