You are not logged in.

#1 2023-08-17 09:41:17

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Mpv Doesn't Play Videos Using The DRM Video Output[Feature not Bug]

I sometimes watch movies without starting a WM just to save on resources or what have you. I've usually used drm while in TTY to accomplish this:

$ mpv --vo=drm video.mp4

However, recently I keep getting an error mentioning something about atomic support:

[vo/drm/drm] Failed to create DRM atomic context, no DRM Atomic support

My GPU:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn XT [Radeon HD 7870 GHz Edition]
	Subsystem: XFX Pine Group Inc. Pitcairn XT [Radeon HD 7870 GHz Edition]
	Kernel driver in use: amdgpu
	Kernel modules: radeon, amdgpu

I've switched between both radeon and amdgpu and I get the same results.

Last edited by rg_arc (2023-08-18 14:38:27)

Offline

#2 2023-08-17 13:29:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,684

Re: Mpv Doesn't Play Videos Using The DRM Video Output[Feature not Bug]

There was https://patchwork.kernel.org/project/in … @ffwll.ch/ - maybe similar was applied to mv?

Check the system journal/dmesg for messages from amdgpu + drm, esp. when trying to run mpv this way but also in general (might be an earlier problem resulting in this symptom)

Offline

#3 2023-08-17 15:44:05

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Re: Mpv Doesn't Play Videos Using The DRM Video Output[Feature not Bug]

Yeah after checking dmesg with amdgpu I saw:

amdgpu 0000:01:00.0: amdgpu: PCIE atomic ops is not supported

and

amdgpu 0000:01:00.0: [drm] fb0: amdgpudrmfb frame buffer device

I tried to tweak the mpv command by specifying the drm device and still no results. I'll see if I can patch it as recommended and hopefully that'll fix it for now.

Offline

#4 2023-08-17 15:54:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,684

Re: Mpv Doesn't Play Videos Using The DRM Video Output[Feature not Bug]

Patch it as recommended where?
Can you "--drm-atomic=no"

Offline

#5 2023-08-17 16:13:19

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Re: Mpv Doesn't Play Videos Using The DRM Video Output[Feature not Bug]

seth wrote:

Can you "--drm-atomic=no"

--drm-atomic=no gives me this warning:

Warning: option --drm-atomic is deprecated and might be removed in the future (this option is deprecated: DRM Atomic is required).
seth wrote:

Patch it as recommended where?

Well I guess there isn't a patch but I was assuming I should just revert to an older version of mpv or use a patch somewhere.

Last edited by rg_arc (2023-08-17 16:16:35)

Offline

#6 2023-08-17 19:25:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,684

Re: Mpv Doesn't Play Videos Using The DRM Video Output[Feature not Bug]

--drm-atomic=no gives me this warning:

Does it still work, though?
Does an older build of mpv?

Offline

#7 2023-08-18 04:53:25

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Re: Mpv Doesn't Play Videos Using The DRM Video Output[Feature not Bug]

Well I know it worked previously on this AMD machine. Also, I know it works fine on other machines using nvidia or intel graphics. I assume this may just be related to AMD at least until the bugs are ironed out.

Offline

#8 2023-08-18 06:19:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,684

Re: Mpv Doesn't Play Videos Using The DRM Video Output[Feature not Bug]

What I meant is whether the switch still disables the atomic mode and whether that allows you to play the video.

"amdgpu: PCIE atomic ops is not supported" isn't a new condition, so the breaking change is most likely in mpv, and lo and behold:
https://github.com/mpv-player/mpv/commi … 46a7f1f576

This isn't a "bug" that'll just go away.

Offline

#9 2023-08-18 11:32:03

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Re: Mpv Doesn't Play Videos Using The DRM Video Output[Feature not Bug]

The switch doesn't allow the video to play, no:

[find_files] Loading external files in .
[cplayer] Running hook: ytdl_hook/on_preloaded
[lavf] select track 0
[lavf] select track 1
[cplayer]  (+) Video --vid=1 (mpeg4 640x360 25.000fps)
[cplayer]  (+) Audio --aid=1 (mp3 2ch 48000Hz)
[vo/drm/drm] Picked DRM card 0, primary node /dev/dri/card1 as the default.
[vo/drm/drm] Driver: amdgpu 3.52.0 (20150101)
[vo/drm/drm] Connector 57 currently connected to encoder 56
[vo/drm/drm] Selected Encoder 56 with CRTC 40
[vo/drm/drm] Selected mode: 1920x1080 (1920x1080@60.00Hz)
[vo/drm/drm] Failed to create DRM atomic context, no DRM Atomic support
[cplayer] Error opening/initializing the selected video_out (--vo) device.
[lavf] deselect track 0
[cplayer] Video: no video
[ad] Codec list:
[ad]     mp3float (mp3) - MP3 (MPEG audio layer 3)
[ad]     mp3 - MP3 (MPEG audio layer 3)
[ad] Opening decoder mp3float
[ad] Requesting 1 threads for decoding.
[ad] Selected codec: mp3float (MP3 (MPEG audio layer 3))
[af] User filter list:
[af]   (empty)
[cplayer] Starting playback...
[cplayer] EOF code: 6  
[cplayer] finished playback, something happened (reason 4)
[cplayer] 
[cplayer] Exiting... (Errors when loading file)
[cplayer] Set property: shared-script-properties -> 1
[cplayer] Set property: user-data/osc/margins={"r":0,"b":0,"t":0,"l":0} -> 1
[cplayer] Set property: shared-script-properties -> 1

So you're saying its a feature not a bug?

Last edited by rg_arc (2023-08-18 12:41:22)

Offline

#10 2023-08-18 12:53:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,684

Re: Mpv Doesn't Play Videos Using The DRM Video Output[Feature not Bug]

"code simplification", yes. The feature was deliberately removed from mpv for radeon, nouveau and some other chips not supporting atomic actions.

Offline

Board footer

Powered by FluxBB