jacob-pro / solar-screen-brightness

Automatically adjust monitor / screen brightness at night using sunrise/sunset times
GNU Lesser General Public License v3.0
62 stars 4 forks source link

NVidia (Advanced) Optimus issue: SSB.exe forces dGPU in use #41

Open Hexaae opened 1 month ago

Hexaae commented 1 month ago

Please, can you fix this? SSB.exe when running locks dGPU=ON on a (Advanced) Optimus system. Obviously I can change screen brightness also in iGPU mode from Windows settings, and expected SSB.exe to work the same...

jacob-pro commented 1 month ago

Hmmm I think there is an API available to choose this in the graphics library this program is based on: https://docs.rs/wgpu/0.20.1/wgpu/enum.PowerPreference.html I will try and have a look when I have time. I would imagine it only uses the GPU when the window is open though so hopefully isn't very impactful?

Hexaae commented 1 month ago

Unfortunately even when minimized in the tray dGPU is still locked