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

High CPU usage on Ubuntu 22.04 #2107

Open
oaklsb opened this issue Jan 9, 2024 · 18 comments
Open

High CPU usage on Ubuntu 22.04 #2107

oaklsb opened this issue Jan 9, 2024 · 18 comments

Comments

@oaklsb
Copy link

oaklsb commented Jan 9, 2024

Hello, I noticed Caprine using around 15-25% when idle on Ubuntu 22.04. Please let me know if you need more details. Thanks!

@hujberhunor
Copy link

Same here, but 91%
5.15.144-1-MANJARO
caprine 2.59.1
Top outpot 1940406 i3hunor 20 0 1133.2g 287120 103908 R 107.0 3.6 113:38.55 electron

@HenryTheVacuum
Copy link

Same on latest windows 11 lately

@avesst
Copy link

avesst commented Jan 11, 2024

Same on Debian. Driving me nuts.

@mstapaj
Copy link

mstapaj commented Jan 12, 2024

Same on Fedora 39. Higher CPU usage by about 5-10%

@Terrorzyw
Copy link

Kubuntu 23.10 flatpak same problem.

@tgm-git
Copy link

tgm-git commented Jan 26, 2024

I am seeing the same in Debian 12. Initially the app has an expected usage and then after several hours of uptime it starts using more CPU, usually taking up 90~% of one core.

Restarting the application seems to help the problem.

@dusatvoj
Copy link

Same @ arch linux. Eating one core.

@wkrska
Copy link

wkrska commented Jan 30, 2024

Same on Ubuntu 22.04.3 LTS, when application is in foreground it has one core pinned

@sgtcoder
Copy link
Contributor

I am having this issue too again. They fixed it in previous versions, but looks like the issue is back. Debian 12.

@heavykisiel
Copy link

I have this problem too on Arch it uses around 4% of my CPU while all other apps in idle are not even close to that. But thing what concerns me the most is temperatures of CPU. In idle having discord and firefox open with multiple tabs I have CPU cores temps around 37C to 42C, but when I turn this caprine on it quickly raises to 42C-49C.Its quite a lot in my opinion.

I find out that it might be due hardware acceleration not working properly. I have set it on true on caprine setting, but when I run app in terminal I have this erorr:
libva error: vaGetDriverNames() failed with unknown libva error
I have it installed newest version.
Caprine right now runs fully on CPU not touching GPU data at all. so maybe all that stuff is being calculated on CPU that is not very effective I guess.

@avesst
Copy link

avesst commented Jan 31, 2024

There is a pull request (#2110) ready which seems to fix the issue.

@sgtcoder
Copy link
Contributor

sgtcoder commented Feb 1, 2024

When running the below, the app opens and displays Messenger and then the screen turns white (this isn't an issue with "electron": "^28.2.1",. I noticed the CPU usage being low, but can't confirm usage.

Also, how do I build for a .deb package? I couldn't see that in the docs. Actually, npx electron-builder --linux

git clone https://github.com/bnabholz/caprine
cd caprine
git checkout fixes/high-cpu-usage

npm install && npm start

@phodamentals
Copy link

Same issue with CPU hitting at least 70% at all times while app is open.
OS: Pop!_OS 22.04 LTS
Caprine: 2.59.1

@sgtcoder
Copy link
Contributor

sgtcoder commented Feb 2, 2024

So here is what I did for a workaround solution for myself (so I can have it auto-pull into my repository server as well).

I forked this repo sindresorhus/caprine then pulled in the PR Fix: https://github.com/sindresorhus/caprine/pull/2110

I updated "electron": "^28.2.1" since that also was needed for me.

I also updated all the packages that could be updated without breaking.

Resulting in this: https://github.com/sgtcoder/caprine/releases

So maybe this could be a temp solution for now. It dropped my Intel CPU 20C.

@stkrknds
Copy link
Contributor

stkrknds commented Feb 2, 2024

Hi @sgtcoder . Could you test if #2109 fixes this issue. I suspect that the currently broken selector is causing elementReady to hang, resulting in high CPU usage.

@sgtcoder
Copy link
Contributor

sgtcoder commented Feb 2, 2024

Hi @sgtcoder . Could you test if #2109 fixes this issue. I suspect that the currently broken selector is causing elementReady to hang, resulting in high CPU usage.

I can take a peak later today :-)

@sgtcoder
Copy link
Contributor

sgtcoder commented Feb 2, 2024

#2109 (comment)

Hi @sgtcoder . Could you test if #2109 fixes this issue. I suspect that the currently broken selector is causing elementReady to hang, resulting in high CPU usage.

Hi, I posted it here and I still had issues with it

#2109 (comment)

For some reason though, updating electron and element-ready to the latest versions works well.

@fliker09
Copy link

On my old Xeon machine driving a single core to 100%. Any hope for getting a fix soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests