brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
18k stars 2.36k forks source link

[Desktop] After sync v2 upgrade, seeing High GPU util, potentially some OOM Kills, Screen flickering and freezing up (when Grammarly extension enabled) #11412

Closed amahagaonkar closed 4 years ago

amahagaonkar commented 4 years ago

Description

After recent upgrade seeing a lot of issues on brave. Screen at times starts to flicker. Task manager shows GPU Process utilization creeping up. I do see render failures and eventually, the browser fully freezes up.

When it froze I saw that the utilization was more than 60% and continued to creep up before freezing. I managed to capture the screen recording

Steps to Reproduce

None

Actual result:

Screen Cap: freeze.gif

Expected result:

Reproduces how often:

No steps to reproduce

Brave version (brave://version info)

Brave 1.12.114 Chromium: 84.0.4147.135 (Official Build) (64-bit)
Revision c42bd09b3f24da1698d71d3b4f57402137163566-refs/branch-heads/4147@{#1102}
OS macOS Version 10.15.6 (Build 19G2021)
JavaScript V8 8.4.371.23
Flash (Disabled)

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

amahagaonkar commented 4 years ago

cc: @jumde

Martina-Neumayer commented 4 years ago

Same by me on Arch. I can't even watch something on YouTube.. switching to fullscreen totally kills (machine overheating) the browser and also entire system as well after a few seconds. By browsing for example facebook website or mewe after a while the fans begin to howl like crazy and I can't keep my laptop on my knees due to the enormous amount of generated heat.

I have also some screen glitches or failures/issues on many websites.. Tumblr (black screen + sometimes glitches), Twitter (lots of glitches + unsupported browser nag-info), Spotify (black screen + glitches) etc.

jsecretan commented 4 years ago

@amahagaonkar I don't suppose you use the Grammarly extension do you?

amahagaonkar commented 4 years ago

@amahagaonkar I don't suppose you use the Grammarly extension do you?

@jsecretan Thanks for reaching out. Yes, I have Grammarly extension enabled.

Brave-Matt commented 4 years ago

@amahagaonkar, Please try disabling/uninstalling the Grammarly extension and test to see if browser performance improves. Other users have confirmed that doing this resolves the issue.

amahagaonkar commented 4 years ago

I have some more datapoints. I can consistently repro this only when I enable grammarly on whatsapp web. So if you're running whatsapp web, changing quickly to different message windows triggers this. I think the default settings enables this on all websites.

Found a couple of workarounds. Disabling/Uninstalling helps. But if you want to use grammarly, chaging the setting to an onclick as opposed to default on all sites has yielded me better perf. Also just disabling this specifically for web.whatsapp.com helped too.

Screen Shot 2020-08-25 at 11 49 33 AM
bsclifton commented 4 years ago

Various user reports

  1. https://twitter.com/fturriaf/status/1298314370326376448

    update! just killed @Grammarly extension and everything returned to normal. Seems some compatibility issue. Hope it should be replicable @BraveSampson

  2. https://twitter.com/Sarve___tanvesh/status/1298308159728050176

    Yes, uninstalling grammarly fixed the high cpu usage issue. I hope they fix it soon.

  3. https://twitter.com/neneodonkor/status/1298050208601866240

    I did that and this is what I found. I will kill the extension and see if it improves.

  4. https://old.reddit.com/r/brave_browser/comments/ifstyq/more_flickering_screen_how_to_remedy_this/

    Hello Brave Community,

    I have seen posts regarding flickering web pages while using Brave from over a year ago. Today is the first time I have experienced this and I've been using Brave for about a year. I read something to do with the tiling of the pages that is revealed when hovering over certain areas. Not sure why this is happening to me now or if there was an update that made it start happening but is there a fix?

    UPDATE: I am running MacOS Sierra 10.12.6 (using an old 2011 iMac)

  5. https://community.brave.com/t/high-cpu-memory-performance/156347

    High CPU and Memory Usage (10 tabs) Version: V1.12.114

    I have no idea why, but this has only just started happening before it would work flawlessly. Anyone else having issues with this version?

    As much as 85% CPU and it is all coming from the Brave Browser (checked in both task managers)

    Thanks

Steps I have followed to cause crippling amounts of CPU usage

  1. Fresh profile
  2. Open docs.google.com and sign in
  3. Find a large sized Google document (with pictures, etc) and open it
  4. Copy the whole document to clipboard (Ctrl+A, Ctrl+C)
  5. Make new document (File > New in GDoc)
  6. Paste contents (Ctrl + V)
  7. Enjoy > 100% CPU for at least 1 minute if not

Eventually, it seems to settle down for me. I can't reproduce the problem after that.

Latest Brave update

The last Brave upgrade was for Chromium: https://chromium.googlesource.com/chromium/src/+log/84.0.4147.125..84.0.4147.135/?pretty=fuller&n=10000

The only noteworthy commit I found was the security fix (which is why the update was issued): https://swiftshader-review.googlesource.com/c/SwiftShader/+/47668

Even with that, didn't find anything that would have caused this. Opening the extension developer tools (via brave://inspect#extensions) doesn't show anything odd in the console. I do see blockages for chrome-extension://invalid/:1 Failed to load resource: net::ERR_FAILED. It's possible we may be blocking something they are requiring - not sure how to dig into this more

Grammarly

@ryanbr found data about various extension performance- Grammarly was near the top https://www.debugbear.com/blog/2020-chrome-extension-performance-report

There was a Grammarly extension update yesterday and there appear to be reviews mentioning performance impact https://twitter.com/BraveSampson/status/1298279439709507584

jumde commented 4 years ago

Some more data-points: Selecting text and adding comments to youtube also triggers this issue.

Martina-Neumayer commented 4 years ago

Well.. I don't use gramarly extension nowhere.

rushilsrivastava commented 4 years ago

I can reproduce this issue with no extensions on a fresh Brave Installation.

bsclifton commented 4 years ago

@Martina-Neumayer what version of Brave are you using? Curious if you're on Chromium 84 (Release - 1.12) or 85 (Beta/Nightly aka 1.14/1.15). We're working on 1.13 right now and it's in an RC stage with Chromium 85

I think most of the reports we've seen are on release AFTER this commit landed: https://swiftshader-review.googlesource.com/c/SwiftShader/+/47668

Martina-Neumayer commented 4 years ago

@bsclifton I'm on v. 1.14.62 Chromium: 85.0.4183.78 now. It is a beta from AUR.

bsclifton commented 4 years ago

The folks experiencing this who were affected by Grammarly- that issue has been found and fixed by the Grammarly team. A new release is available which you can grab (14.971.0). https://twitter.com/Grammarly/status/1298691333838667776

@w0ts0n got the following message from the Grammarly team, who reached out to us after issue was fixed:

It appears the problem was related to third-party cookies being disabled in some browsers, which caused the reports of high CPU usage

bsclifton commented 4 years ago

@Martina-Neumayer are there any extensions you're using? If so- would be great if you could share here or email me via clifton@brave.com 😄 I can look into if those have similar problems with 3rd party cookies

Martina-Neumayer commented 4 years ago

Okay.. My extensions are:

xBrowserSync (turned off - not used) chrome-extension://lcbjdhceifofjlpecfpeimnnphbcjgnc/

DownAlbum chrome-extension://cgjnhhjpfcdhbhlcmmjppicjmgfkppok/

Stylus chrome-extension://clngdbkpkpeebahjckkjfobafhncgmne/

Image-Toolbar chrome-extension://cpgaepnhfockgofcejphihfafgmenofb/

Search by Image (by Google) chrome-extension://dajedkncpodkggklbegccjpmnglmnflm/

SearchPreview chrome-extension://hcjdanpjacpeeppdjkppebobilhaglfo/

TinEye Reverse Image Search chrome-extension://haebnnbpedcbhciplfhjjkbafijpncjl/

Tampermonkey chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/

User-Agent Switcher chrome-extension://clddifkhlkcojbojppdojfeeikdkgiae/

Material Downloads - Download Manager chrome-extension://lkipihmhkkecjfkmgpphhipoenalokka/

Brave chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/

Disable HTML5 Autoplay chrome-extension://efdhoaajjjgckpbkoglidkeendpkolai/

Unpaywall (turned off - not used) chrome-extension://iplffkdpngmdjhlpjmppncnlhomiipha/

Nano Defender chrome-extension://ggolfgbegefeeoocgjbmkembbncoadlb/

Social Video Downloader chrome-extension://kfnnoammpigcglgbhcbbdpnekbcddahe/

GoodTwitter (turned off - not used) chrome-extension://jbanhionoclikdjnjlcmefiofgjimgca/

I don't care about cookies chrome-extension://fihnjjcciajhdojfnbdddfaoknhalnja/

MEGA chrome-extension://bigefpfhnfcobdlfbedofhhaibnlghod/

Speed Dial 2 New tab chrome-extension://jpfpebmajhhopeonhlcgidhclcccjcik/

Video Downloader professional chrome-extension://elicpjhcidhpjomhibiffojpinpmmpil/

Alternate Tab Order chrome-extension://ogppakblncmgfgonnlheigoghllopopb/

Video Downloader PLUS chrome-extension://fhplmmllnpjjlncfjpbbpjadoeijkogc/

iNinja VPN & Proxy, VPN to Unblock any sites chrome-extension://ookhnhpkphagefgdiemllfajmkdkcaim/

Twitter Media Downloader chrome-extension://cblpjenafgeohmnjknfhpdbdljfkndig/

NooBox chrome-extension://kidibbfcblfbbafhnlanccjjdehoahep/

Always Clear Downloads 2 chrome-extension://jcajchndfkmnaefkhoaoiagemplbfffn/

Nano Adblocker chrome-extension://gabbbocakeomblphkmmnoamkioajlkfo/

F.B.(FluffBusting)Purity chrome-extension://nmkinhboiljjkhaknpaeaicmdjhagpep/

NooBoss chrome-extension://aajodjghehmlpahhboidcpfjcncmcklf/

Nimbus Screenshot (turned off - not used) chrome-extension://bpconcjcammlapcogcnnelfmaeghhagj

But.. after todays Brave update (now is v. 1.14.65 Chromium: 85.0.4183.83) I discovered something else which worries me a bit. Look here please: https://pastebin.com/0ERneq9h

My machine specs are like this.. Hardware acceleration by Nvidia gpu works fine in other apps, games etc. Even in Firefox is okay.

2020-08-27_12-43

Edit.. I think I have it fixed. Just symlink or the best copy those missing libs files from your /usr/lib/ directory to the /usr/lib/brave-beta-bin/ and to /usr/lib/brave-beta-bin/swiftshader/ folders. Then restart the whole system and should be ok now.

In my case I need to copy also nvidia's versions of those libs as I am using this gpu at most (I have prime installed). Now its looks like that.. (see screenshot below) and works fine together with the enabled Vulcan support in the browser "flags".

The strange thing is that the browser does not look for libraries in default system folders, but uses its own custom paths. This should be asap fixed imho.

brave:gpu infos.. now is fine. https://pastebin.com/JXwPRzFD

2020-08-27_13-33

Martina-Neumayer commented 4 years ago

Update.. Well this worked for me circa half the hour. Then the browser start lagging, video playback is choppy and desyncgronized (audio vs. video), website scrolling "jumps" like a crazy, and at the end entire brave is unusable. I need to turn off the whole hardware acceleration support in settings to use the browser without those issues.

bsclifton commented 4 years ago

Well shoot ☹️ Sorry to hear. I did notice there was a security update specifically to swiftshader: https://swiftshader-review.googlesource.com/c/SwiftShader/+/47668

Unfortunately, I don't have access in Chromium bug tracker to view the issue it fixed: https://bugs.chromium.org/p/chromium/issues/detail?id=1115345

I'm curious if anyone has reported problems in that issue after the fix was merged

@diracdeltas @fmarier @jumde do any of you have access to the Chromium issue?

bsclifton commented 4 years ago

Going to close this issue as I believe the original complaint has been addressed. There still seems to be a general problem which requires HW accel to be turned off. We have the follow issue captured for that if you wanted to subscribe @Martina-Neumayer Frequent intermittent hanging when HW acceleration is enabled

@rushilsrivastava can you please try turning off HW acceleration under brave://settings/system?

bsclifton commented 4 years ago

@diracdeltas helped me check out the issue (thanks!) and there haven't been reports of problems after https://swiftshader-review.googlesource.com/c/SwiftShader/+/47668 (at least not in https://bugs.chromium.org/p/chromium/issues/detail?id=1115345). I'm curious if there was another change that is affecting you @Martina-Neumayer

We can move over to https://github.com/brave/brave-browser/issues/9824 😄