https://bugs.kde.org/show_bug.cgi?id=459609
Bug ID: 459609 Summary: KWin switches the discrete GPU on every time a new Wayland window is opened in a switchable graphics setup Classification: Plasma Product: kwin Version: 5.25.5 Platform: Archlinux OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: wayland-generic Assignee: kwin-bugs-n...@kde.org Reporter: putr...@gmail.com Target Milestone: --- SUMMARY With dynamic switchable graphics set up on my system with Nouveau KWin appears to poke the dGPU every time a native Wayland window is opened (including Dolphin, System Settings, Konsole, KRunner and the logout/shutdown screen at least), my laptop's dGPU light indicator turns on and there is a delay (about 2s) before the window appears. If the dGPU is already on and/or I force the dGPU to stay off then there is no delay, and the issue does not occur with XWayland windows (for example if I start Dolphin with `QT_QPA_PLATFORM=xcb` set) nor with an X11 session. The dGPU does turn off again after a few seconds. While I suspect the delay part could just be something specific to my system I don't think KWin should even touch the dGPU unless said app is meant to use it (as it would use battery power unnecessarily), and when I tried this same setup with GNOME Wayland (I think it was with Fedora 34) it did not turn on the dGPU when not required other than on startup. STEPS TO REPRODUCE 1. Start a Plasma Wayland session 2. Wait until the dGPU turns off (say a minute or so) 3. Start a Wayland native app that does not use the dGPU (say Dolphin or Konsole) 4. Close said app and reopen it OBSERVED RESULT There is a significant delay before the app window appears in step 4 instead of being quick, and the dGPU turns on despite not being required. EXPECTED RESULT The app opens immediately in step 4. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.25.5 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6 Kernel Version: 5.19.9-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 15.5 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 530 (plus a GTX 960M as the dGPU) Manufacturer: Micro-Star International Co., Ltd. Product Name: GP62 6QF System Version: REV:1.0 ADDITIONAL INFORMATION In addition to the delay and the light indicator the file `/sys/kernel/debug/vgaswitcheroo/switch` also says "DynPwr" instead of "DynOff" for the dGPU when the issue occurs. Also, I did not try the proprietary driver in this scenario since it does not support power management for my old dGPU, plus I was not able to get any Wayland native apps to use the dGPU without crashing in that case anyway (I assume that could be a configuration error on my end). -- You are receiving this mail because: You are watching all bug changes.