WillPower3309 / swayfx

SwayFX: Sway, but with eye candy!
MIT License
1.18k stars 48 forks source link

SwayFX does not allow non-primary GPUs to suspend #274

Open Sid127 opened 4 months ago

Sid127 commented 4 months ago

Swayfx currently initializes its DRM backend for every card available on the system, as can be seen in the log I have attached. Yes, I know I'm on the proprietary drivers, but I have also reproduced this using nouveau. This causes the non-primary GPU to stay active, preventing it from engaging in a runtime power management routine (entering D3cold state), increasing power consumption.

Relevant log lines:

00:00:00.030 [INFO] [wlr] [backend/drm/backend.c:200] Initializing DRM backend for /dev/dri/card0 (i915)
00:00:00.030 [DEBUG] [wlr] [backend/drm/drm.c:88] Using atomic DRM interface
00:00:00.030 [DEBUG] [wlr] [backend/drm/drm.c:100] ADDFB2 modifiers supported
00:00:00.030 [INFO] [wlr] [backend/drm/drm.c:253] Found 3 DRM CRTCs
00:00:00.030 [INFO] [wlr] [backend/drm/drm.c:180] Found 9 DRM planes
00:00:00.030 [INFO] [wlr] [backend/drm/backend.c:200] Initializing DRM backend for /dev/dri/card1 (nvidia-drm)
00:00:00.031 [DEBUG] [wlr] [backend/drm/drm.c:88] Using atomic DRM interface
00:00:00.031 [DEBUG] [wlr] [backend/drm/drm.c:100] ADDFB2 modifiers supported
00:00:00.031 [INFO] [wlr] [backend/drm/drm.c:253] Found 4 DRM CRTCs
00:00:00.031 [INFO] [wlr] [backend/drm/drm.c:180] Found 12 DRM planes
WillPower3309 commented 4 months ago

Thanks for raising the issue! I assume this isn't the case for upstream sway, but can you confirm?

Sid127 commented 4 months ago

Yes, this is not an issue with upstream, whichever is the current version of sway in the arch repos. It is, however, also an issue on hyprland-git

swwwee commented 1 month ago

I have the same issue with regular sway-1.9, using a 3060M. It is most likely an underlying issue with the nvidia-drivers as a whole, or wlroots not wanting to playing nice (both are possible).

E.g., I have my main monitor plugged into the iGPU to get around nauseating, terrible flickering. And I use reverse-prime, to offload GPU intensive tasks. In theory, the iGPU should only be used, and it is, until a process is offloaded. This powers on the GPU, but it also moves sway onto the graphics stack, preventing the GPU from powering off.

It really sucks, but we cannot control NVIDIA drivers or the wlroots project's stance on said drivers.

WillPower3309 commented 1 month ago

Yes, this is not an issue with upstream, whichever is the current version of sway in the arch repos. It is, however, also an issue on hyprland-git

To clarify, is this sway-git or was it 1.9?

Sid127 commented 1 month ago

it was whatever the latest release of Sway was at the time.

-------- Original Message -------- On May 30, 2024, 4:49 AM, William McKinnon wrote:

Yes, this is not an issue with upstream, whichever is the current version of sway in the arch repos. It is, however, also an issue on hyprland-git

To clarify, is this sway-git or was it 1.9?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>