GhostNaN / mpvpaper

A video wallpaper program for wlroots based wayland compositors.
GNU General Public License v3.0
713 stars 21 forks source link

Hanging at startup on NVIDIA #38

Closed BBaoVanC closed 2 months ago

BBaoVanC commented 1 year ago

Log output:

[*] Verbose Level 1 enabled
[+] Connected to Wayland compositor
[*] Output DVI-D-1 (Dell Inc. DELL 1907FPV CC388742ABGX) selected
[*] Output HDMI-A-1 (Hewlett Packard HP W2072a CNC217SP4S) selected
[*] OpenGL 4.6 EGL context created
[+] EGL initialized
[*] Loaded [ mpv.conf ] user configs from "~/.config/mpv/"

After adding some print statements, it seems to be hanging inside the mpv_render_context_create call at:

https://github.com/GhostNaN/mpvpaper/blob/786f3ffe275195439f6c02a695845c3bcf2ba784/src/main.c#L539

BBaoVanC commented 1 year ago

Just tested it on my AMD machine and it works fine, so maybe an NVIDIA related issue. I do have hardware acceleration enabled in mpv but disabling it makes no difference.

raffaem commented 1 year ago

Which drivers are you using? The proprietary ones or the open source ones?

If you have a recent enough graphics card, it should work with the open source drivers.

Aromate commented 1 year ago

I have the Nvidia GPU, in my laptop. It can not use proprietary driver, with mpvpaper. When debug it. Find the MPV maybe can not support Nvidia driver use mpv_render_context_create to render.

I find some information from Nvidia's document website. Like:

Nvidia driver doc

The following workstation features are not supported by any Wayland compositors or the Wayland protocol. They will also likely require new EGL extensions or other means to expose the related hardware functionality.

SLI and Multi-GPU Mosaic (Chapter 31, Configuring SLI and Multi-GPU Mosaic)

Frame Lock and Genlock (Chapter 32, Configuring Frame Lock and Genlock)

Swap Groups

Advanced display pipeline features including warp and blend, pixel shift, and emulated YUV420.

Stereo rendering

Maybe the Advanced display pipeline features including warp and blend, pixel shift, and emulated YUV420. it's the reason why the MPV not support.

So, please wait...the mesa's NVK driver, which new open source Nvidia driver, or use old open source mesa driver.

The propriety driver is very difficult to use, on other Linux. ( which not Debian, Red Hat, Ubuntu). On Gentoo, it's more.

GhostNaN commented 1 year ago

@Aromate Sorry for the late response, just saw this.

I have the Nvidia GPU, in my laptop. It can not use proprietary driver, with mpvpaper. When debug it. Find the MPV maybe can not support Nvidia driver use mpv_render_context_create to render.

There isn't a problem with mpv_render_context_create(). Something is going horribly wrong with the mix of EGL and Wayland. But from this commit: https://github.com/GhostNaN/mpvpaper/tree/f65700a3ecc9ecd8ca501e18a807ee18845f9441 It seems to work well enough, but I don't have a good explanation as to why we are seeing this behavior.

So, please wait...the mesa's NVK driver, which new open source Nvidia driver, or use old open source mesa driver.

This is a OpenGL/EGL issue. Having a new Vulkan driver most likely won't help. So unless libmpv starts supporting rendering to a Vulkan FBO, that won't change.

The propriety driver is very difficult to use, on other Linux. ( which not Debian, Red Hat, Ubuntu). On Gentoo, it's more.

Not going to argue with you on that. Despite recent advances with Wayland compatibility, there are still some issues.

GhostNaN commented 3 months ago

Please try the latest commits and compile from master. I believe this is now solved.

GhostNaN commented 2 months ago

After the last update 1.6, this problem should be fixed now. If this is not the case, feel free to reopen the issue.