Games Freeze in Cinnamon but not in Gnome?

TL;DR - Video games freeze in Cinnamon but not in Gnome?

Hi!
I am a newbie in Nixos, but I like it.
So I have encountered a strange bug recently - when I was playing DOTA or CS2 - it pretty soon after launch got frozen to the point that I cannot even access tty session - it is completely unresponsive, only reboot helps.

After investigation - I discovered that it only happened on Cinnamon and other KDEs, but not on Gnome.
If I switched to Gnome, I didn’t even need to reboot, just rebuild and it runs totally fine!
But the problem is - since I come from Linux Mint - I really want to stay on Cinnamon all the time, without this strange switching.

Any help will be appreciated!

1 Like

Maybe it is worth adding that during initial installation I selected Gnome? I am not sure though if it had any effect in this case

Still no replies, but I’d like to fix it.
Bump

After you reproduce the issue and reboot, do you see any relevant errors/warnings in your system logs?

journalctl -b -1 -e

First of all - thank you for being the first to reply!

After further testing I discovered that the games run totally fine only UNTIL I start playing music in Google chrome? It instantly freezes up.

I tried opening incognito tab and thats it - runs fine
I tried opening websites with no music - runs fine
I tried opening youtube, even with muted tabs - freezes
I also tried opening deezer and start the music playing - freezes

Somebody in other chat suggested to look at my capslock if it was blinking or not (panicked) - but it is not blinking.
The freeze occurs - the music still keeps going for the next 5 seconds and the pc becomes totally unresponsive until reboot.

So far I just switch between Gnome and Cinnamon DE - but I’d really like to just stick with Cinnamon for all cases.
Here are the logs: https://pastebin.com/AaPGNkV8

1 Like

How are you currently configuring the audio in your system?

here is my configuration.nix - https://pastebin.com/YPDVN0ca

Specifically, at first my sound didn’t work on nix, so I added this

# Enable sound with pipewire.
  hardware.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    # If you want to use JACK applications, uncomment this
    jack.enable = true;
 
    # use the example session manager (no others are packaged yet so this is enabled by default,
    # no need to redefine it in your config for now)
    #media-session.enable = true;
  };

After that the sound was working but not with headphones, so I had to manually tweak it in the program called pwvucontrol

After I had that set up, I never tweaked with sounds in my config

I’m curious, does this still happen when you disable jack? or if you use pulseaudio instead of pipewire?

Does this issue happen when headphones are plugged in? If you undo these changes does the issue still persist?

Sorry for taking so long. I was testing all possible variants.
The pc freezes regardless of whether the headphones plugged in or not

None of the variants helped, disabling jack or pipewire, or pulseaudio - it was frozen in all those cases.
Logs:
With Jack and Pipewire - disabled
Jack and Pipewire disabled, pulswire enabled

but on Gnome it runs all the times without any freezes

Edit: sorry, didnt allow me to post link to pastebin with the logs and also community flagged me as “spam or advertisement”???.
Great
Im just trying to fix this annoying bug

1 Like

It’s alright. You can compare the logs at the end and see if it look like the same as the one you posted earlier.

Also, is deezer also running in chrome or as a chromium app? Does this happen with other apps like Firefox or mpv?

Edit: I found a similar post in [SOLVED] Linux Mint completely freezes when playing videos on chrome. - Linux Mint Forums where the issue was an overload on the GPU. The suggested fix was to disable the Cinnamon visual effects, so you might want to give that a try.

1 Like

Thank you, eljamm!

I don’t think that my laptop is bad in terms of Cinnamon taking too much of GPU or whatever - I come from Linux Mint and it was never an issue. So I disregarded that case right off the bat
This should be enough to run if without any issues

CPU: Intel i5-10300H (8) @ 4.500GHz 
GPU: NVIDIA GeForce GTX 1650 Ti Mobile 
GPU: Intel CometLake-H GT2 [UHD Graphics] 
Memory: 5319MiB / 15834MiB

But it really never occurred to me to try it with another browser - and oh god - it really helped!??!?!?!
I just tried to play CS or Dota with Firefox running instead of chrome - and it runs with no freezes at all.
I really don’t want to investigate this dirty thingy any further, so I will stick with this solution.
When gaming - use Firefox for background music
For everything else - use Chrome

Also, Android Studio is stupidly laggy on GNOME - but runs way faster on Cinnamon, I don’t know why, but it is.

In any ways, thank you for your help, you really saved me, I guess we can close it now

1 Like

I’m happy to help and welcome to NixOS :smile:

1 Like