caprine icon indicating copy to clipboard operation
caprine copied to clipboard

High CPU usage on Ubuntu 22.04

Open 0x00000oak opened this issue 1 year ago • 18 comments

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

0x00000oak avatar Jan 09 '24 15:01 0x00000oak

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

hujberhunor avatar Jan 09 '24 18:01 hujberhunor

Same on latest windows 11 lately

HenryTheVacuum avatar Jan 10 '24 16:01 HenryTheVacuum

Same on Debian. Driving me nuts.

avesst avatar Jan 11 '24 17:01 avesst

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

mstapaj avatar Jan 12 '24 15:01 mstapaj

Kubuntu 23.10 flatpak same problem.

Terrorzyw avatar Jan 22 '24 22:01 Terrorzyw

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.

tgm-git avatar Jan 26 '24 13:01 tgm-git

Same @ arch linux. Eating one core.

dusatvoj avatar Jan 29 '24 00:01 dusatvoj

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

wkrska avatar Jan 30 '24 17:01 wkrska

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

sgtcoder avatar Jan 30 '24 17:01 sgtcoder

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.

heavykisiel avatar Jan 31 '24 13:01 heavykisiel

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

avesst avatar Jan 31 '24 19:01 avesst

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

sgtcoder avatar Feb 01 '24 15:02 sgtcoder

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

phodamentals avatar Feb 02 '24 01:02 phodamentals

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.

sgtcoder avatar Feb 02 '24 14:02 sgtcoder

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.

stkrknds avatar Feb 02 '24 16:02 stkrknds

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 avatar Feb 02 '24 16:02 sgtcoder

https://github.com/sindresorhus/caprine/pull/2109#issuecomment-1924884187

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

https://github.com/sindresorhus/caprine/pull/2109#issuecomment-1924884187

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

sgtcoder avatar Feb 02 '24 23:02 sgtcoder

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

fliker09 avatar Feb 17 '24 18:02 fliker09