Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brave 139.111 extremely laggy with hardware acceleration enabled (Nvidia) #23254

Open
ahydronous opened this issue Jun 6, 2022 · 41 comments
Open

Comments

@ahydronous
Copy link

ahydronous commented Jun 6, 2022

Description

Since the latest Brave update, my browser has been extremely laggy when scrolling an watching video. The latest Edge or Chrome do not have this issue. I am on Windows 11.

Steps to Reproduce

  1. Install Brave 139.111 or even the most recent nightly (141.33)
  2. Scroll or watch a video
  3. See heavy lag (<10 FPS performance)

Actual result:

Laggy browser

Expected result:

Smooth browser

Reproduces how often:

Always

Brave version (brave://version info)

139.111

Version/Channel Information:

Stable 139.111 and Nightly 141.33

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the nightly channel? Yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? No
  • Does the issue resolve itself when disabling Brave Rewards? No
  • Is the issue reproducible on the latest version of Chrome? No

Miscellaneous Information:

I run an Nvidia 3070Ti with the most recent driver (512.95)
Turning off 'Hardware Acceleration' fixes the extreme lag

@ahydronous
Copy link
Author

This is still an issue with the latest Brave version (1.39.122)

@Fooughhy
Copy link

Fooughhy commented Jun 21, 2022

How is it possible that all of these issues with hardware acceleration keep being down-prioritized? They are triaged, tagged as priority/P5, or just downright ignored...

I would like to mention one thing, though. Because I actually got this working. Has a lot of issues with Brave specifically being slow. I had forced a 122Hz refreshrate for all applications using "RivatunerStatisticsServer". So I added a profile for "brave.exe" which essentially disabled Rivatuner for that application. I also have/had "Fast-Sync" enabled globally (so a type of V-sync) in the Nvidia Control Panel (or specifically with NvidiaProfileInspector). I think I only changed the Rivatuner setting, as I still seem to have "Fast-Sync" for brave.exe in NvidiaProfileInspector. But this has at least fixed it for me.

image

@ahydronous
Copy link
Author

@Fooughhy I also have a high Hz monitor (144Hz) with Freesync (or as Nvidia calls it, 'Gsync Compatible'). Just tested setting V-sync to 'off' for Brave in Nvidia Control Panel, and setting Hardware Acceleration to 'on'. I still get janky scrolling.

@Fooughhy
Copy link

Just to confirm, did you restart brave in-between?

And also, do you have any other framerate-limiters enabled?

@ahydronous
Copy link
Author

I have found the culprit! (I did restart Brave inbetween beforehand, but your frame-limiter question did it).

Global 'Background Application Frame Rate' is set to '60'. Setting it to unlimited fixes the problems.

It seems that, unlike Edge or Chrome, Brave reports itself as being a background application even when in focus.
This seems a pretty severe bug that could impact many things @rebron.

@Fooughhy
Copy link

Wow, nice that you got it working! I had no idea that was the explanation for the issue though. But yeah, that explain why other browsers works fine at least! Nice man 👍

@rebron
Copy link
Collaborator

rebron commented Jun 21, 2022

cc: @atuchin-m @iefremov

@rebron rebron added the needs-investigation A bug not 100% confirmed/fixed label Jun 21, 2022
@lazymonkey2
Copy link

lazymonkey2 commented Jun 22, 2022

I have a laptop with intel cpu (i7-7700HQ), nvidia (gtx 1050) and intel integrated gfx card (hd graphics 630).
Not the latest hardware, but not too bad.
Brave was slow on this device: the ui was slow to react to input, in particular scrolling (chrome instead was working fine).
To fix the issue I had to disable hardware acceleration.
Now thanks to @ahydronous I got the idea to check nvidia control panel.
I have found that brave was set to use nvidia hardware, while chrome and firefox were set to use intel video card.
After setting brave to use intel video card (and enabliing hardware acceleration) the ui seems now smoother.
Also vivaldi and edge were set to use nvidia instead of intel card, so it seems that nvidia drivers automatically recognise both chrome and firefox, but not other browsers.
I think Brave developers should contact nvidia and ask to automatically set Brave to use intel graphics on computers like mine, which have two gfx cards.

@Fooughhy
Copy link

Fooughhy commented Jun 22, 2022

@424344 I do not think this is correct. You would want to use your actual GPU for the hardware acceleration, and not the CPU. I may be wrong, but I don't think the integrated GPU is actually active when you have a dedicated GPU as well. So this seems weird. I guess you are using a CPU for hardware acceleration in this case?

To add to this, I would assume your issue was fixed because it is the combination of Nvidia GPU and Brave that causes the issue.

@lazymonkey2
Copy link

I believe that I'm not using the cpu, but the gpu that intel integrated into the cpu.
Also I think that both the intel and nvidia gpu are active, after all the nvidia driver let me choose which one I want to use.
Having the ability to choose which gpu to use is the purpose of having two gpus on a laptop: to use less battery I'll use the intel gpu, to get more 3d performance, at the cost of increased battery usage, I'll use the nvidia gpu.
Surely the internal intel gpu is not as fast as the nvidia one, but for just browsing the web I believe it is enough.
Probably a web page that uses heavy 3D will be slower when run on intel gpu, but then I'll get again the slow user interface.

@LubomirBednar
Copy link

Hi. I have noticed the severe lagging of the browser after AMD and NVidia driver updates. I have followed the advice of disabling hardware acceleration in Brave, which fixed the issue. Then I did some digging and saw that my AMD graphics were disabled in device manager for some reason. After enabling it again, I switched the hardware acceleration back on and everything runs as smoothly as before. As to why that is, I haven't the faintest, but I'm hoping it will shed some light on the issue for the more enlightened among us.

@EaglePPP
Copy link

I have found the culprit! (I did restart Brave inbetween beforehand, but your frame-limiter question did it).

Global 'Background Application Frame Rate' is set to '60'. Setting it to unlimited fixes the problems.

It seems that, unlike Edge or Chrome, Brave reports itself as being a background application even when in focus. This seems a pretty severe bug that could impact many things @rebron.

Holy cow, this is the kinda solution (better than none)
Ive set Background Framelimit to 20 so its laggy as hell
When I turn it off, and turned on Brave Hardware acc it works (not perfectly thou)
Youtube videos are still having framedrops
When my two monitors play videos simultaneously not even both of thm are 1080p, they both stutters sometimes.
But in general much better than before
thx!

@AFilthyLeaf
Copy link

AFilthyLeaf commented May 5, 2023

This is still an issue with the latest Brave version (1.39.122)

This is still an issue on 1.51.110 lol.

But just so anyone new who finds this thread knows. This is caused by Background Application Max Framerate on NVIDIA. Change the option in program settings to off and restart brave to fix it.

Wish I found your post about this, would've saved me my troubleshooting adventures. This issue has existed for almost a year now apparently.

Edit:
NVIDIA appears to set exceptions for chrome.exe, msedge.exe, and firefox.exe. They didn't add smaller browsers (Brave and Vivaldi) to this exceptions list.

@JeanLuX
Copy link

JeanLuX commented Aug 18, 2023

This is still an issue with the latest Brave version (1.39.122)

This is still an issue on 1.51.110 lol.

But just so anyone new who finds this thread knows. This is caused by Background Application Max Framerate on NVIDIA. Change the option in program settings to off and restart brave to fix it.

Wish I found your post about this, would've saved me my troubleshooting adventures. This issue has existed for almost a year now apparently.

Edit: NVIDIA appears to set exceptions for chrome.exe, msedge.exe, and firefox.exe. They didn't add smaller browsers (Brave and Vivaldi) to this exceptions list.

Hello and thanks you !

I had the same problem and this option solved it.
In my case it was a bit unusual in that it only happened when an external monitor was present, because in this case the dedicated graphics card (dGPU) is used instead of the integrated one (iGPU).

image

My laptop is an XMG Fusion 15, Intel Core i7-9750H, 32 GB RAM + NVIDIA GeForce 1660 Ti Mobile

@deathuman
Copy link

Same issue here with Version 1.58.137 only on Brave, it works fine in both Chrome and Edge.
Setting "Background Application Max Frame Rate" to Off finally fixed it but having to find a github issue for a solution is not ideal.

@rafalohaki
Copy link

same issue here

@DF-wu
Copy link

DF-wu commented Oct 27, 2023

same issue here with RTX 3080.
Brave version: 1.59.124
Nvidia driver version: 545.84
The report of brave://gpu/

@seaque
Copy link

seaque commented Nov 23, 2023

This is still an issue with the latest Brave version (1.39.122)

This is still an issue on 1.51.110 lol.

But just so anyone new who finds this thread knows. This is caused by Background Application Max Framerate on NVIDIA. Change the option in program settings to off and restart brave to fix it.

Wish I found your post about this, would've saved me my troubleshooting adventures. This issue has existed for almost a year now apparently.

Edit: NVIDIA appears to set exceptions for chrome.exe, msedge.exe, and firefox.exe. They didn't add smaller browsers (Brave and Vivaldi) to this exceptions list.

I had been having this problem on Brave, Vivaldi, LibreWolf, Opera GX for years. This was the reason I quit using these, I could only use Ungoogled Chromium and official Firefox. Can't believe it existed because of this setting, thank you.

@geekyBoogiepop
Copy link

I think this issue needs more attention. I have an ASUS TUF Dash F15 Laptop with Nvidia 3070 Laptop, I stopped using Brave because of this issue a year ago, but I decided to try again but the issue is still there. I recently found this thread after searching a lot, and tried to do the solution provided above, but in my case the 3d settings for Brave are greyed out and can't change anything.

However, Background Application Max Frame Rate is disabled on the Global Settings.

The weird thing is that Brave uses the Nvidia GPU automatically while Chrome and Edge do not, at least this is what I found using the Armoury Crate app that ASUS provides, but the Nvidia Control Panel reports that it should use the integrated card, which is extremely odd.

image

image
Brave supposedly should use the integrated graphics.

image
Brave using the Nvidia Graphics Card.

The issues I'm experiencing are:

  • White Screen after resuming Brave
  • Scroll lags all the time

One thing I've noticed is that when I plug the charger to my Laptop, it switches to Performance mode and all these issues disappear.

@geekyBoogiepop
Copy link

I finally found a fix for this issue with a Hybrid GPU Setup, I urge the Brave team to apply this solution to people using hybrid setup or at least provide a section like "Nvidia common issues" in the download page and refer to the solutions provided in this thread.

I had the program settings in Nvidia control panel greyed out, to enable them I had to switch to Ultimate mode in Armoury Crate app from ASUS (this requires a reboot and switches completely to the NVIDIA GPU), then I could change the settings with NVIDIA Control Panel, but I found that Background Application Max Frame Rate was disabled by default, so I switched back to "Standard" mode again which uses MSHybrid technology provided by Windows and the one causing the issue with Hybrid Setups because Windows decides to use the NVIDIA GPU with Brave while others Web Browsers, Windows don't use the NVIDIA graphics card by default.

ApplicationFrameHost_yoiFkp9jIo

nvcplui_3JM30OZqyD

To fix this issue you have to go to the settings app, System > Display > Graphics, add Brave to the list and choose Power Saving (which uses the intel graphics) and restart the app if you had it opened. Now I have a very smooth experience with hardware acceleration enabled in Brave.

image

If you ever decide to use the NVIDIA GPU with Brave, you should switch to "Let Windows Decide" or "High Performance" but the issues come back unless you plug in the laptop which switch enables the Nvidia Graphics Card and everything works fine.

image

I'm not sure if you can automate this on the brave installer, but a FAQ for NVIDIA Users in the download page would be useful and surely bring a ton of users back to Brave.

@rebron @atuchin-m @iefremov

@mirh
Copy link

mirh commented Mar 23, 2024

microsoft/vscode#107016 (comment) and BrowserWorks/Waterfox#2979 (comment) speculate other browsers may be working not because of some better implementation or practice, but just because they are being special pleaded by dedicated app profiles.

Does it make any difference if you rename brave's executable to msedge.exe or chrome.exe?

@richardhttps
Copy link

microsoft/vscode#107016 (comment) and BrowserWorks/Waterfox#2979 (comment) speculate other browsers may be working not because of some better implementation or practice, but just because they are being special pleaded by dedicated app profiles.

Does it make any difference if you rename brave's executable to msedge.exe or chrome.exe?

Renaming brave's executable to chrome.exe did the trick for me!
Though I'd like to have a rather permanent solution to this issue. My dGPU is Arc and not Nvidia so I can't apply the suggested solutions above.

@mirh
Copy link

mirh commented May 5, 2024

A quick and dumb grep showed the executable names inside igd10um32xe.dll/igd10um64xe.dll, igdgmm32/igdgmm64.dll and IntelControlLib.dll/IntelControlLib32.dll.
Of course it's even dirtier this way, but just to understand if we are in the right direction you might want to try to hex edit "chrome" to some other phony name and see if that's enough to influence renamed brave.exe.
Also.. Open an issue on their dev forums perhaps?

@rebron rebron added this to General May 28, 2024
@rebron rebron moved this to Needs Info in General May 28, 2024
@R-Delgado1203
Copy link

can confirm this is still an issue, unfortunately had my NVME with my OS on it implode last night, after re installing everything, i usually have youtube running on my second monitor while gaming on the primary, had Destiny 2 open while watching videos, the video would stutter, only thing that solved the issue was disabling hardware acceleration in Brave, no max background set in nvdia, gsync if off and im running 165hz refresh on both monitors.

@geekyBoogiepop
Copy link

geekyBoogiepop commented May 31, 2024

microsoft/vscode#107016 (comment) and BrowserWorks/Waterfox#2979 (comment) speculate other browsers may be working not because of some better implementation or practice, but just because they are being special pleaded by dedicated app profiles.

Does it make any difference if you rename brave's executable to msedge.exe or chrome.exe?

I can confirm renaming brave.exe to chrome.exe FIXED all the issues. The GPU is properly selected when I run brave. I tested it on a clean Windows 11 Installation with no changes made to the Windows Power Settings. I want to add that before renaming it to chrome.exe I tried to add brave.exe to the Google Chrome profile with the NVIDIA Inspector and this DID NOT FIX the issue. Please @rebron @iefremov reconsider renaming brave.exe to chrome.exe as you did in the past and update brave as soon as possible, I've seen a lot of people not using brave because of a ton of GPU related issues because of this NVIDIA Profile bs.

I found that you already renamed brave.exe to chrome.exe in the past, why did you revert it?
EDIT: My bad, it was the GPU process name that was renamed.
#29113

@mirh
Copy link

mirh commented May 31, 2024

Because it's literally mentioned and linked there? They just renamed the gpu process, perhaps they are missing another.

Separately, an additional idea to help would be to use profile inspector to check on chrome's knobs, to see which one is responsible for the magic when applied to others.

@EaglePPP
Copy link

EaglePPP commented Jul 22, 2024

microsoft/vscode#107016 (comment) and BrowserWorks/Waterfox#2979 (comment) speculate other browsers may be working not because of some better implementation or practice, but just because they are being special pleaded by dedicated app profiles.
Does it make any difference if you rename brave's executable to msedge.exe or chrome.exe?

I can confirm renaming brave.exe to chrome.exe FIXED all the issues. The GPU is properly selected when I run brave. I tested it on a clean Windows 11 Installation with no changes made to the Windows Power Settings. I want to add that before renaming it to chrome.exe I tried to add brave.exe to the Google Chrome profile with the NVIDIA Inspector and this DID NOT FIX the issue. Please @rebron @iefremov reconsider renaming brave.exe to chrome.exe as you did in the past and update brave as soon as possible, I've seen a lot of people not using brave because of a ton of GPU related issues because of this NVIDIA Profile bs.

I found that you already renamed brave.exe to chrome.exe in the past, why did you revert it? EDIT: My bad, it was the GPU process name that was renamed. #29113

use the method in the issue is the correct way to solve this, instead of changing background frame rate higher.

@ahydronous
Copy link
Author

@rebron @LaurenWags

I know this is not your area and I hate to keep tagging you like this occasionally, but in the past you've been angels in getting issues alerted to the proper team.
This seems like a rather important one, and I imagine that with Brave's current popularity it should be possible to contact Nvidia and get brave.exe added to Nvidia their browser whitelist?

On top of that, the "workaround:disable-hw-acceleration" tag is wrong, I'm not sure if you have the rights to remove that.

@iefremov
Copy link
Contributor

@ahydronous can you try running brave with --enable-features=ModuleFileNamePatch ?

@geekyBoogiepop
Copy link

@iefremov here are the reports for both, ModuleFileNamePatch argument and without it. The issue is still there, the NVIDIA GPU is automatically used when I open brave, this doesn't happen with any other Chromium browser or Firefox.
about-gpu-2024-07-25T01-46-07-692Z.txt
ModuleFileNamePatch-about-gpu-2024-07-25T01-44-55-405Z.txt

Tell me if I can provide you any other information, please.

@geekyBoogiepop
Copy link

geekyBoogiepop commented Jul 30, 2024

I've been using Brave v1.68.131 for a couple of days now, and I haven't noticed this bug. Brave is using the integrated GPU. I haven't set Brave to Power Saving mode in the Windows graphics settings either. Can anyone check if the issue is fixed on their end, too?

@ahydronous
Copy link
Author

@iefremov I don't have access to an Nvidia GPU atm (long story).

@geekyBoogiepop do you have Background Max Application Frame Rate set to 60?

If not, you are talking about the separate issue of a hybrid GPU setup. Perhaps it would be better to create a separate issue for that, although if it is fixed, that won't be necessary haha

@geekyBoogiepop
Copy link

@ahydronous False alarm. The issue happened today, again, it is not fixed, who knows what happened during the last two days.

@L1ttleFlyyy
Copy link

This is still an issue with the latest Brave version (1.39.122)

This is still an issue on 1.51.110 lol.

But just so anyone new who finds this thread knows. This is caused by Background Application Max Framerate on NVIDIA. Change the option in program settings to off and restart brave to fix it.

Wish I found your post about this, would've saved me my troubleshooting adventures. This issue has existed for almost a year now apparently.

Edit: NVIDIA appears to set exceptions for chrome.exe, msedge.exe, and firefox.exe. They didn't add smaller browsers (Brave and Vivaldi) to this exceptions list.

I had been having this problem on Brave, Vivaldi, LibreWolf, Opera GX for years. This was the reason I quit using these, I could only use Ungoogled Chromium and official Firefox. Can't believe it existed because of this setting, thank you.

This solved the issue, thanks!

@delemir
Copy link

delemir commented Oct 12, 2024

I have found the culprit! (I did restart Brave inbetween beforehand, but your frame-limiter question did it).

Global 'Background Application Frame Rate' is set to '60'. Setting it to unlimited fixes the problems.

It seems that, unlike Edge or Chrome, Brave reports itself as being a background application even when in focus. This seems a pretty severe bug that could impact many things @rebron.

This worked for me. Thanks for pointing that out. Just to re-iterate for those who don't have the full context. This setting is found under the NVIDIA Control Panel, Select Manage 3D Settings. Then on the right Pane, select the Progam Settings Tab, select the Brave (brave.exe) program, if its not in the list simply click "Add" and browse to your Brave browser installation path (Default install path is C:\Program Files\BraveSoftware\Brave-Browser\Application\Brave.exe). Scroll down to "Background Application Max Frame Rate" and change the setting from "Use global setting (on)" to "Off". Restart the browser and test.

Note: Keep note of this setting as I've seen occurences where updating the Nvidia drivers may reset some application specific settings to their default value, it shouldn't be an issue but if you see the problem happening again after Nvidia driver update, double check to be sure.

Cheers!
Del

Image

@constatza
Copy link

constatza commented Oct 18, 2024

I am having the same issue on Linux, when I resume scrolling after idle cursor for a few seconds e.g. when reading. I have AMD 6800 though.

Disabling Hardware Accelaration resolves the lag, but that's not a profer fix.

@lazymonkey2
Copy link

lazymonkey2 commented Oct 18, 2024

when I resume scrolling after idle cursor for a few seconds e.g. when reading.

happens to me too (win10) but my laptop has an intel gfx card (intel hd graphics 630).
it also has an nvidia gfx card but I'm using it only for games (nvidia geforce gtx 1050).
anyway scrolling should work correctly even with intel, because it works perfectly with all other browsers (chrome, edge, vivaldi, firefox).
only brave has this issue (since years).

since it's not an nvidia I cannot fix it with the workaround using nvidia control panel.
I checked intel control panel but didn't find any useful setting.

should I file a new bug report for intel gpu?

@mirh
Copy link

mirh commented Oct 18, 2024

Linux has nothing to do with this, yeah (which is already stretched enough by mixing the profile issues of different vendors on windows)

@constatza
Copy link

Yes, and obviously even GPU type doesn't matter, since the problem persists among all vendors (Nvidia, AMD, Intel)

@ahydronous
Copy link
Author

ahydronous commented Oct 18, 2024

You guys are wrong. This is an issue specifically with Nvidia not whitelisting brave.exe for non-focused (background) program frame limiting rules. I can’t say with certainty since I don’t know the Nvidia Control Panel / Driver featureset on Linux, but I’m fairly certain it is only a setting on Windows.

The other issues you are speaking to are not related to this issue. Please open up separate issues for them.

@mirh
Copy link

mirh commented Oct 18, 2024

The problem is very much specific to manufacturers, since it's not the OS that is doing anything wrong. And in fact there isn't even a single report of AMD problems (no, linux doesn't count, both because it is broken itself but also because all drivers but nvidia's are shared).

It would be nice if somebody could check my aforementioned profile inspector/hexediting hunches though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Info
Development

No branches or pull requests