LGUG2Z / komorebi

A tiling window manager for Windows 🍉
https://lgug2z.github.io/komorebi/
Other
9.64k stars 200 forks source link

[BUG]: High CPU and Disk usage #922

Closed topazrn closed 4 months ago

topazrn commented 4 months ago

Describe the bug CPU usage is around 20% on my i3-12100 and disk usage is 4MB/s while idle. I'm not sure if this is normal. Screenshot 2024-07-24 170838

I have made sure that I did not enable the custom FFM implementation because if I were to use it, my CPU usage would double. Screenshot 2024-07-24 171555

To Reproduce Steps to reproduce the behavior:

  1. komorebic start --ahk.
  2. Check Task Manager.

Expected behavior CPU usage I think should be 0% on idle. I'm also not sure what file is it reading constantly.

Operating System

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045

komorebic check Output

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\Topaz

Looking for configuration files in C:\Users\Topaz

Found komorebi.json; this file can be passed to the start command with the --config flag

No ~/.config/whkdrc found; you may not be able to control komorebi with your keyboard

Additional context I am using the example AHK config from the docs. But I think AHK is not the problem here because the CPU and disk usage are undiscernable between AHK and whkd.

LGUG2Z commented 4 months ago

The high disk IO suggests that there are probably a bunch of errors being written to the log file repeatedly. Can you run komorebi.exe in the foreground and share the log output?

topazrn commented 4 months ago

Aha! You are right! Turns out it has been repeatedly throwing these errors:

2024-07-24T13:19:25.499291Z  INFO komorebi::border_manager: listening
2024-07-24T13:19:25.499592Z  WARN komorebi::border_manager: restarting failed thread: The parameter is incorrect. (0x80070057)

I was following amnweb's dotfiles and it seems removing "border_implementation": "Windows", fixes the issue.

I should've checked the logs first before writing an issue. Thanks for the help!

LGUG2Z commented 4 months ago

So this option isn't supported on Win10 and there are some checks in place to stop people from trying to enable it once komorebi is running, but I think we need to default away from this option on startup if it is selected to avoid the experience you had 🤔