[GH-ISSUE #1152] High CPU usage, killing process lowers cpu , app works #925

Open
opened 2026-05-05 07:17:19 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @gandalfTheGreyWizard on GitHub (Apr 28, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1152

Describe the bug
I don't know why when i run barrier in my pc the cpu usage goes very high in my 2 dual core computers and 2 raspberry pis. Now when i open up htop press F4 to filter and write barrier and from the list i close the 1st process from the top the cpu count decreases drastically. Same foes with my core 2 duo windows computer killing the high cpu using barrier.exe process while sharing the mouse decreases cpu usage from 60-70 percent to 3-10 usage percentage
To Reproduce

Steps to reproduce the behavior:

  1. Just turn on configure barrier and start sharing.

PS :-
Its so bad that when i share computer cursor with raspberry pi the rpi hangs with single core cpu usage 100% and the cursor freezes.

What to do (hacky)
Closing with htop(terminal command) -> press F4 (search for process named barrier) -> press F9 (kill menu) -> select 9 (SIGKILL) to terminate the program.
Now the cpu usage is max 10 %

Originally created by @gandalfTheGreyWizard on GitHub (Apr 28, 2021). Original GitHub issue: https://github.com/debauchee/barrier/issues/1152 **Describe the bug** I don't know why when i run barrier in my pc the cpu usage goes very high in my 2 dual core computers and 2 raspberry pis. Now when i open up htop press F4 to filter and write barrier and from the list i close the 1st process from the top the cpu count decreases drastically. Same foes with my core 2 duo windows computer killing the high cpu using barrier.exe process while sharing the mouse decreases cpu usage from 60-70 percent to 3-10 usage percentage **To Reproduce** Steps to reproduce the behavior: 1. Just turn on configure barrier and start sharing. PS :- Its so bad that when i share computer cursor with raspberry pi the rpi hangs with single core cpu usage 100% and the cursor freezes. What to do (hacky) Closing with htop(terminal command) -> press F4 (search for process named barrier) -> press F9 (kill menu) -> select 9 (SIGKILL) to terminate the program. Now the cpu usage is max 10 %
Author
Owner

@gandalfTheGreyWizard commented on GitHub (Apr 30, 2021):

note :- running barrier runs multiple sets of processes, killing the topmost process from the filter -> barrier list (htop) wont kill the program itself

<!-- gh-comment-id:830343836 --> @gandalfTheGreyWizard commented on GitHub (Apr 30, 2021): note :- running barrier runs multiple sets of processes, killing the topmost process from the filter -> barrier list (htop) wont kill the program itself
Author
Owner

@linaori commented on GitHub (Dec 15, 2021):

My Ubuntu client has very high CPU usage as well, this makes it really hard to work properly when doing more heavy load
image

<!-- gh-comment-id:994758875 --> @linaori commented on GitHub (Dec 15, 2021): My Ubuntu client has very high CPU usage as well, this makes it really hard to work properly when doing more heavy load ![image](https://user-images.githubusercontent.com/1754678/146188208-bd464a07-5ca6-4a14-9c7a-56528ac4c305.png)
Author
Owner

@alex-moon commented on GitHub (Dec 15, 2021):

Wanted to add to this. I have Barrier 2.4.0 running on Ubuntu 20.04 (server) and Mac OS 10.14.4 (client) - it works flawlessly a lot of the time, but at least once a day will suddenly max out the CPU on the Linux machine, freezing it up and requiring a hard shutdown.

My gut says this has something to do with me doing Angular (10.2) development on my Linux machine. The way I do this involves running ng serve inside docker machine with CHOKIDAR_USEPOLLING=true in the env. It watches for file changes and recompiles the chunk that has changed. This has caused problems for me in the past - the codebase has more than a thousand files in it (not including node_modules).

I haven't got logs for when the issue occurs yet but I will keep an eye on these in the future to see if there's anything illuminating in them.

<!-- gh-comment-id:994922799 --> @alex-moon commented on GitHub (Dec 15, 2021): Wanted to add to this. I have Barrier 2.4.0 running on Ubuntu 20.04 (server) and Mac OS 10.14.4 (client) - it works flawlessly a lot of the time, but at least once a day will suddenly max out the CPU on the Linux machine, freezing it up and requiring a hard shutdown. My gut says this has something to do with me doing Angular (10.2) development on my Linux machine. The way I do this involves running `ng serve` inside docker machine with `CHOKIDAR_USEPOLLING=true` in the env. It watches for file changes and recompiles the chunk that has changed. This has caused problems for me in the past - the codebase has more than a thousand files in it (not including `node_modules`). I haven't got logs for when the issue occurs yet but I will keep an eye on these in the future to see if there's anything illuminating in them.
Author
Owner

@linaori commented on GitHub (Dec 15, 2021):

I will add that when I'm using Slack, it will sometimes "freeze" my mouse and I can't properly use it anymore. If I then use the touchpad on my mouse, it will randomly reset the mouse position back to the center. Restarting barrier or slack fixes the issue for a while. I'm not sure what happens but something seems to be chugging the CPU in either.

I figured I'd mention this because it's electron.

<!-- gh-comment-id:994928901 --> @linaori commented on GitHub (Dec 15, 2021): I will add that when I'm using Slack, it will sometimes "freeze" my mouse and I can't properly use it anymore. If I then use the touchpad on my mouse, it will randomly reset the mouse position back to the center. Restarting barrier or slack fixes the issue for a while. I'm not sure what happens but something seems to be chugging the CPU in either. I figured I'd mention this because it's electron.
Author
Owner

@derbenx commented on GitHub (Jun 1, 2022):

I have an amd 6c12t system running the barrier 2.4.0 server. I too notice barrier doing 10% cpu and using 800+mb of ram on Windows 10. I mean it works, but for a relatively simple app, it shouldn't be above 1% CPU, right? Side note: OpenOffice barely uses 100mb of ram with 2 decent (bi yearly) spread sheets open. ;)

Both w10 and linux mint clients are using 0% cpu with much lower ram usage. It's just the server, even when I'm not using the server, typing directly to the machine.

Also, I want to add the DPI scaling doesn't work on the server if it's anything other than 100%. Which makes it really hard to see the words on the screen from the couch. 125% or more just drives the mouse cursor into the corner and switching screen doesn't let you move the cursor.

Thanks for the release though! Very useful otherwise!

<!-- gh-comment-id:1143212372 --> @derbenx commented on GitHub (Jun 1, 2022): I have an amd 6c12t system running the barrier 2.4.0 server. I too notice barrier doing 10% cpu and using 800+mb of ram on Windows 10. I mean it works, but for a relatively simple app, it shouldn't be above 1% CPU, right? Side note: OpenOffice barely uses 100mb of ram with 2 decent (bi yearly) spread sheets open. ;) Both w10 and linux mint clients are using 0% cpu with much lower ram usage. It's just the server, even when I'm not using the server, typing directly to the machine. Also, I want to add the DPI scaling doesn't work on the server if it's anything other than 100%. Which makes it really hard to see the words on the screen from the couch. 125% or more just drives the mouse cursor into the corner and switching screen doesn't let you move the cursor. Thanks for the release though! Very useful otherwise!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#925
No description provided.