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

Multiple apps slow to a crawl after a KVM switch #779

Open
zsilet opened this issue Aug 20, 2024 · 7 comments
Open

Multiple apps slow to a crawl after a KVM switch #779

zsilet opened this issue Aug 20, 2024 · 7 comments

Comments

@zsilet
Copy link

zsilet commented Aug 20, 2024

In summary, I am noticing that multiple apps will become almost completely unresponsive after I use my KVM switch to leave, then return to pop_os. I have to minimize and restore the apps in question, after which they work as normal.

My setup is a laptop connected to a second monitor. KVM will switch keyboard/mouse/second monitor, while laptop screen stays active. On the second (switched) monitor, I have VSCode in one tile, while cosmic files / cosmic text, browser etc in a stack in a second tile.

I switch the KVM away, then back to the laptop, and often times I can observe that text input to VSCode/Cosmic text is unresponsive, and clicking/opening files in cosmic files is also unresponsive. This condition persists until I minimize the affected application/stack of applications. Once I restore them, the issue is immediately resolved.

Not all applications seem to be affected. For example, PCMan File Manager never shows the issue (whereas COSMIC files does so often).

I am happy to collect any additional information as necessary.

@jacobgkau
Copy link
Member

Booting, recreating the issue, then running sudo journalctl -b 0 > logs.txt to generate a log file might help the developers know what's causing this.

@zsilet
Copy link
Author

zsilet commented Aug 21, 2024

Adding journalctl log.
I switched away from pop_os around 12:00.
I switched back to pop_os right around 12:38:12, where the logs show my mouse and keyboard being re-detected. At this point I noticed my tilix session was unresponsive (would take 2-3 seconds for each keystroke to be recognized). I initiated the attached log from this tilix session.
Again, minimizing and restoring the window immediately fixed the issue (done after logs were taken.

The logs show a number of removable drive connect/disconnects while I was not using the computer. This is because I have a microprocessor dev kit attached (for my dayjob) that I power cycled a few times. I am not sure this is related, I will disconnect it though next time I switch away, so it doesn't interfere/cloud the issue. I will also disconnect the QL-800 printer next time around.

log.txt

@zsilet
Copy link
Author

zsilet commented Aug 21, 2024

Here is a video of the issue, as well as an additional log, from the time I switch away from pop-os to the time I switch back.
https://photos.app.goo.gl/Vm2CyTAvojyTBq7b6

log2.txt

@GilesBrule
Copy link

I can confirm this behavior. Browsers Edge and Floorp do this for sure, possibly other apps. This also happens if my laptop is undocked; close the lid and connect it to my KVM. Up until I saw this post, I had been closing the app to fix it, but minimizing and restoring does fix the problem.

@zsilet
Copy link
Author

zsilet commented Nov 6, 2024

Just a quick note that this issue is still reproducible on the latests popdev:master version.

@ids1024
Copy link
Member

ids1024 commented Nov 6, 2024

I've noticed this behavior sometimes without output hotplug. Though it doesn't seem to be consistent.

This would likely be an issue with Wayland frame callbacks. For some reason cosmic-comp isn't properly sending them for the new monitor the window and workspace are on, so they're throttled to 1/second.

@ids1024
Copy link
Member

ids1024 commented Nov 13, 2024

I think I've figured out what's going on here, and pop-os/cosmic-comp#990 should finally fix it.

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

4 participants