AdguardTeam / AdguardForWindows

AdGuard for Windows open bug tracker
https://adguard.com/
640 stars 72 forks source link

AdGuard interferes with NVIDIA Advanced Optimus #5099

Open Aydinv13 opened 2 months ago

Aydinv13 commented 2 months ago

AdGuard version

7.17

Browser version

-

OS version

-

What filters do you have enabled?

No response

What Stealth Mode options do you have enabled?

No response

Support ticket ID

No response

Issue Details

Steps to reproduce: As reported in this issue

  1. Enable advanced optimus
  2. Make sure laptop is in integrated GPU mode
  3. Start a game
  4. Make sure laptop in discrete GPU mode and some game is running
  5. Exit a game

Actual Behavior

Windows shows notification from Nvidia control panel telling it is unable to switch GPU mode

Expected Behavior

Laptop change GPU mode

Screenshots

Screenshot: image ### Additional Information _No response_
notaleksiej commented 2 months ago

А вот и я

ihurin commented 2 months ago

@Aydinv13 ZD 895994, direct contact.

Velgus commented 1 month ago

Having the same issue. A few things I can note:

For added context - this is "Advanced" Optimus, so it is more akin to automatically toggling a MUX switch (which allows the dGPU to directly send frames to the screen), rather than traditional Optimus (where, when active, the dGPU sends frames "through" the iGPU).

This is basically handled via virtual displays in the system - in essence, the same display is considered under-the-hood to be 2 displays, one coming from the iGPU and one coming from the dGPU, and Advanced Optimus switches between them when launching games.

Aydinv13 commented 2 weeks ago

@Velgus @notaleksiej @koguroff could you please check if the issue is gone with this build? @ihurin @cryptopatik222 @PavelParkhomenko please advise the build to anyone affected.

Here is the instruction: 1) Install the build 2) Go to Settings -> General Settings -> Advanced Settings and search for Use software rendering then turn it on 3) Save the settings 4) Restart AdGuard app 5) Enable Advanced Optimus

Velgus commented 2 weeks ago

Oddly, software rendering seems to have made the issue even worse. When enabled, it also throws the error when "enabling" the "NVIDIA GPU only" mode (not just disabling it, like before). So games will launch with the iGPU in use instead of switching to the dGPU.

I tested twice (verifying the settings change and restarting AdGuard) to make sure.

Aydinv13 commented 2 weeks ago

@Velgus could you collect the debug logs then:

Instruction 1. Collect the debug log as it's [explained here](https://kb.adguard.com/en/windows/solving-problems/adguard-logs). 2. Remember the exact time when the issue was reproduced. We will need it to find the corresponding records in the log file. 3. Send the archive to `devteam@adguard.com` and mention this issue number in the subject.

Also could you check if it persists in case you run AdGuard VPN along with AdGuard app

Velgus commented 2 weeks ago

I am reproducing and will send it. I do not use AdGuard VPN.

notaleksiej commented 2 weeks ago

@Velgus @notaleksiej @koguroff could you please check if the issue is gone with this build?

@ihurin @cryptopatik222 @PavelParkhomenko please advise the build to anyone affected.

Here is the instruction:

1) Install the build

2) Go to Settings -> General Settings -> Advanced Settings and search for Use software rendering then turn it on

3) Save the settings

4) Restart AdGuard app

5) Enable Advanced Optimus

No, the issue remains

notaleksiej commented 2 weeks ago

I've sent the logs

northis commented 1 week ago

@Velgus @notaleksiej @koguroff please, check out this build. We forced the software rendering in it. https://uploads.adguard.org/AdGuard-v7.18.4760.15.exe

notaleksiej commented 1 week ago

@Velgus @notaleksiej @koguroff please, check out this build. We forced the software rendering in it. https://uploads.adguard.org/AdGuard-v7.18.4760.15.exe

Nope, still doesn't work, I am sending the logs

notaleksiej commented 1 week ago

image

Aydinv13 commented 5 days ago

@Velgus @notaleksiej

For the AdGuard Ad blocker, we are planning to switch to a new GUI engine, so it would be helpful if you could check how AdGuard VPN will behave with NVIDIA Optimus, since AdGuard VPN already has this new engine in it.

northis commented 4 days ago

@Velgus @notaleksiej to help us resolve this issue, you can run our Advanced Uninstaller from here https://cdn.adtidy.org/distr/windows/Uninstall_Utility.zip (it described in our knowledge base). Just run Adguard.UninstallUtility.exe file and check if it blocks the display mode. This utility is written in WPF, just like AdGuard itself.

northis commented 3 days ago

@Velgus

or (b) enable AdGuard on startup, but manually click "Close AdGuard, but continue filtering" in the system tray every time you start the computer - neither of these are ideal.

As a workaround, you can check Enable filtering at system start-up in Advanced Settings and disable autorun for the UI.

Velgus commented 15 hours ago

Just run Adguard.UninstallUtility.exe file and check if it blocks the display mode. This utility is written in WPF, just like AdGuard itself.

The Uninstaller being open did not cause issues enabling "Nvidia GPU only" mode, but did cause issues going back to Optimus (integrated graphics) - same as the AdGuard app. So the same as the original issue - pre-"software rendering" option.

As a workaround, you can check Enable filtering at system start-up in Advanced Settings and disable autorun for the UI.

I tried this, but it does not seem to automatically enable the Web Browser extension when enabled, so it's still "not ideal" in the ways I mentioned in this post. It's a minor issue, but still, it would be nice if having that setting enabled meant that, when opening the web browser, it would default the extension to being enabled, so you don't have to toggle it on every time.