The problem got solved when upgrading to Fedora 41.
(using an AMD RDNA 2 GPU)
Update: The problem wasn't solved yet, see comment below.
Seems like it's still freezing on 41. For some reason an old cosmic-comp was installed after upgrading to Fedora 41. Only workaround for now is to use sudo dnf downgrade cosmic-comp which will install then version 0.1.0~git20240514.00.36bf611 from the fedora repo or to downgrade to a kernel that's not higher than kernel 6.10.
With the recent cosmic-comp update, you can edit the (hidden) .bashrc file in your home folder & add at the bottom of it:
export COSMIC_DISABLE_DIRECT_SCANOUT=true
This will disable direct-scanout & fix the freezing. Just remove this entry, once the problem is fixed in a future update.
@ryanabx Maybe this information can be added to the description page? I think many people could be affected by it.