pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
489 stars 93 forks source link

30s+ Freezes when doing certain actions #929

Open liperium opened 1 month ago

liperium commented 1 month ago

Last update : link to comment

I have a weird bug that makes it so in certain use-cases the instant I interact, my screen freezes for a good ~30s.

Link to video that shows my mouse/screen : link

I have a good desktop computer ( 7700x cpu/7800XT, no problem with any other WM/DE ).

I am currently running cosmic-desktop through NixOs, but I have tried running the official PopOs! live image and I observed the same behavior. Original Issue I have had 0 issues running cosmic-launcher on the desktop computer.

I run cosmic-desktop on my laptop, and I've been enjoying it. But this issue makes it impossible for me to run on my desktop.

Please let me know what debug steps I can take to provide more useful information. Thanks in advance.

git-f0x commented 1 month ago

You could possibly try journalctl -e _EXE=/usr/bin/cosmic-comp after reproducing a freeze.

sebastianrasor commented 1 month ago

I'm experiencing this issue as well on an AMD Framework Laptop 13 running NixOS. I don't know if I'm just not patient enough, but the freeze is permanent for me and occurs when performing a few actions like interacting with top bar applets or certain XWayland context menus.

Edit: It seem like when this happens, it's just the display that's frozen. I had the freeze occur while I was watching a YouTube video and the video never stopped. I was even able to move my mouse cursor to the very top left to have an idea of where it was since I couldn't see it, then move it over the video to pause and play it again. I waited a couple minutes before rebooting, but the display never unfroze.

onlyreportingissues commented 1 month ago

Add

export COSMIC_DISABLE_DIRECT_SCANOUT=true

to the bottom of your .bashrc file in your home folder & see if it works after rebooting. It's a hidden file. Once the problem is fixed in the future, you can remove that line from your .bashrc file.

liperium commented 1 month ago

journalctl -e _EXE=/usr/bin/cosmic-comp

needed to dojournalctl -e | grep cosmic-comp

https://pastebin.com/mNpWxC5C

sebastianrasor commented 1 month ago

Add

export COSMIC_DISABLE_DIRECT_SCANOUT=true

to the bottom of your .bashrc file in your home folder & see if it works after rebooting. It's a hidden file. Once the problem is fixed in the future, you can remove that line from your .bashrc file.

This seems to have done the trick for me, however since I use NixOS and Home Manager I added the following Home Manager option:

home.sessionVariables = {
  COSMIC_DISABLE_DIRECT_SCANOUT = "true";
};
liperium commented 1 month ago

Add export COSMIC_DISABLE_DIRECT_SCANOUT=true to the bottom of your .bashrc file in your home folder & see if it works after rebooting. It's a hidden file. Once the problem is fixed in the future, you can remove that line from your .bashrc file.

This seems to have done the trick for me, however since I use NixOS and Home Manager I added the following Home Manager option:

home.sessionVariables = {
  COSMIC_DISABLE_DIRECT_SCANOUT = "true";
};

I have done that and added it to my .zshrc, .bashrc and home-manager, but still I have freezes.

sebastianrasor commented 1 month ago

Add export COSMIC_DISABLE_DIRECT_SCANOUT=true to the bottom of your .bashrc file in your home folder & see if it works after rebooting. It's a hidden file. Once the problem is fixed in the future, you can remove that line from your .bashrc file.

This seems to have done the trick for me, however since I use NixOS and Home Manager I added the following Home Manager option:

home.sessionVariables = {
  COSMIC_DISABLE_DIRECT_SCANOUT = "true";
};

I have done that and added it to my .zshrc, .bashrc and home-manager, but still I have freezes.

Have you confirmed that the variable is actually set in your environment by launching a terminal and running echo $COSMIC_DISABLE_DIRECT_SCANOUT?

liperium commented 1 month ago

Add export COSMIC_DISABLE_DIRECT_SCANOUT=true to the bottom of your .bashrc file in your home folder & see if it works after rebooting. It's a hidden file. Once the problem is fixed in the future, you can remove that line from your .bashrc file.

This seems to have done the trick for me, however since I use NixOS and Home Manager I added the following Home Manager option:

home.sessionVariables = {
  COSMIC_DISABLE_DIRECT_SCANOUT = "true";
};

I have done that and added it to my .zshrc, .bashrc and home-manager, but still I have freezes.

Have you confirmed that the variable is actually set in your environment by launching a terminal and running echo $COSMIC_DISABLE_DIRECT_SCANOUT?

Yes I have. I don't know if it's different, but it seems that the freezes happen less "instantly" and sometimes after a small delay instead of instantly on the action. I'll try to group them.

Cases where it seems completely fine now ( where it wasn't before direct scanout env var ) :

Cases where it freezes after a short delay for 2s to 10s:

Cases where it freezes instantly for 5s to 30s :

If there are any logs related that I can provide, feel free to ask. I thank you all for your time, this does seem like a really niche bug. e: Added info and formatting e2: After rebooting, it seems like dragging windows around for the first time result in freezes, but the subsequent attempts get better and better, till it's fluid.