moonlight-stream / moonlight-qt

GameStream client for PCs (Windows, Mac, Linux, and Steam Link)
GNU General Public License v3.0
10.12k stars 591 forks source link

[Unofficial AUR package] Hardware acceleration stopped working on NVIDIA Wayland system #1106

Open LibertyGM opened 10 months ago

LibertyGM commented 10 months ago

On the Nvidia card, hardware acceleration did not work for a long time in Wayland, but with the release of the new moonlight-qt-5.0.0, hardware acceleration began to work.

As soon as the Moonlight v5.0.1 update came out − hardware acceleration stopped working again, please return it. I do not understand what is the reason that hardware acceleration in moonlight-qt-5.0.0 worked fine, but in moonlight-qt-5.0.1 does not work.

And hardware acceleration stopped working again in Moonlight v5.0.1

In the moonlight-qt-5.0.0 version, hardware acceleration started working for me and I used the h265 codec. After upgrading to moonlight-qt-5.0.1, hardware acceleration stopped working for me.

When I put moonlight-qt-5.0.0 back on, I still get this error.

Screenshot_20231102_150648

Operating System: Arch Linux KDE Plasma Version: 5.27.9 KDE Frameworks Version: 5.111.0 Qt Version: 5.15.11 Kernel Version: 6.5.9-zen2-1-zen (64-bit) Graphics Platform: Wayland Processors: 16 × Intel® Core™ i7-10700K CPU @ 3.80GHz Memory: 62.7 ГиБ of RAM Graphics Processor: NVIDIA GeForce RTX 4080/PCIe/SSE2 Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7C80 System Version: 1.0

cgutman commented 10 months ago

What package are you using to install Moonlight? Flatpak, Snap, AppImage, etc.

LibertyGM commented 10 months ago

What package are you using to install Moonlight? Flatpak, Snap, AppImage, etc.

From AUR. moonlight-qt 5.0.1-1 https://aur.archlinux.org/packages/moonlight-qt

cgutman commented 10 months ago

Please run Moonlight from the terminal to gather logs and attach them here. It should be enough just to run until you get the hardware decoding error dialog.

moonlight | tee moonlight.log
LibertyGM commented 10 months ago

moonlight | tee moonlight.log

I launched both versions, both have a startup error, a screenshot in the very first message.

moonlight 5.0.0.log moonlight 5.0.1.log

LibertyGM commented 10 months ago

Please run Moonlight from the terminal to gather logs and attach them here. It should be enough just to run until you get the hardware decoding error dialog.

moonlight | tee moonlight.log

But what is strange is that everything works in the Flatpak version.

There is a moonlight file (binary) and it works fine.

Apparently the problem is in the AUR packaging itself.

Can you tell me how I can compile so that everything works?

cgutman commented 10 months ago

It depends on how you're expecting to get hardware acceleration on Nvidia.

There are 3 supported ways of acheiving that in Moonlight:

I'll ignore the first option since you're on Wayland.

Regarding the second option, this is an unofficial driver, so it may break with Nvidia driver updates. The 545 driver series was just released and there is a known issue with 545 drivers reported there.

For the third option, Moonlight must be compiled with nv-codec-headers installed and a version of FFmpeg built with NVDEC support. I'm not exactly sure how ArchLinux handles picking a default, but it appears to have multiple AUR packages that can satisfy that general ffmpeg requirement. Make sure whatever FFmpeg package you've selected has the NVDEC support enabled.

For the AUR packaging, my recommendation to the packager would be to add ffnvcodec-headers to makedepends to ensure Moonlight has NVDEC support that can be used with a supported build of FFmpeg.