pop-os / cosmic-epoch

Next generation Cosmic desktop environment
3.21k stars 86 forks source link

System freezes when changing display scale #1267

Open jzetterman opened 5 days ago

jzetterman commented 5 days ago

This happens for me when running Cosmic DE on Arch Linux. I even freshly installed Arch and Cosmic to make sure it wasn't an issue with my existing installation. I have a 4k display which Cosmic detects and defaults to 200% scaling. When I attempt to change it to 100% the entire system freezes and requires a hard shutdown to reset. I tried changing TTY's when it was locked up but pressing Ctrl + Alt + F2 through F6 does nothing. So far this has only happened for me with Arch and on bare metal. I've tried Fedora in a VM and didn't experience this and I've run PopOS 24.04 on bare metal (same system) and didn't experience this.

CPU: Ryzen 9900x GPU: Radeon 6700XT Kernel: 6.11.9-arch1-1 x86_64 Cosmic Version: 1.0.0.alpha.3-1

Let me know if there's anything else I can provide to help.

kmandarin-orange commented 3 days ago

Can confirm I'm seeing the same behavior (unrecoverable freezes, power button light stays on and screen is completely unresponsive until force shutdown) on my system:

Oddly enough, the display scale change does get accepted after the reboot.

aboukirev commented 3 days ago

For Framework 13, AMD with new 2.8 K screen I see the same behavior. I performed a few experiments and here are some findings.

The screen supports and defaults to 120Hz refresh rate. If I change refresh rate to 60Hz, I can change scale to 150% and 100%. Refresh rate does not stick and resets to 120Hz every time I change scaling factor. I have to set it to 60Hz again to proceed. 175% scale is wonky and freezes regardless but sticks and I am at 175% after a hard restart.

I know it is a display problem - some modes do not work with 120Hz, for instance, and some do not work with 60Hz.

The COSMIC issue is that it does not let me change several parameters and hit Apply button, it applies after each parameter tweak. From what I see in the code, it calls cosmic-randr multiple times --mode and partial set of parameters in each call. It would be safer to set the entire mode line at once. Maybe some changes stick through freeze because of this partial application.

Another thing I noticed is that I cannot change resolution on the Framework 13 AMD laptop. Even in Pop_OS! I can change it from 2880x1920 to 1920x1200 with black space above and below. Not in COSMIC DE. I get the popup dialog asking whether I want to keep the change but no change is happening. The drop-down keeps native resolution selection.