Bug 482936

Summary: Haruna always uses both graphic cards when playing video
Product: [Applications] Haruna Reporter: elman <elman>
Component: genericAssignee: george fb <georgefb899>
Status: REPORTED ---    
Severity: normal Keywords: qt6
Priority: NOR    
Version First Reported In: 0.12.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: mpv
haruna

Description elman 2024-03-09 00:33:01 UTC
Created attachment 166748 [details]
mpv

SUMMARY
***
I have laptop with AMD iGPU and nVidia GPU. I'm using proprietary nVidia drivers. I'm using hybrid mode.
***

STEPS TO REPRODUCE
1. Play any video with Haruna.

OBSERVED RESULT
When paying a video, both GPUs are used. You can see it on screenshot. When I play video in mpv, only one is used (AMD iGPU).

EXPECTED RESULT
Only one GPU should be used.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.8-arch1-1 (64-bit)
Graphics Platform: Wayland

switcherooctl list

Device: 0
  Name:        Advanced Micro Devices, Inc. [AMD®/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series]
  Default:     yes
  Environment: DRI_PRIME=pci-0000_07_00_0

Device: 1
  Name:        NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q]
  Default:     no
  Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only
Comment 1 elman 2024-03-09 00:33:32 UTC
Created attachment 166749 [details]
haruna
Comment 2 elman 2024-03-09 00:58:08 UTC
Just found out that when I disable hardware decoding, it works the same as mpv. And mpv is not using hardware decoding by default, it seems. So I have to look for a solution to force using iGPU instead of nVidia.