simongreenwood.me.uk/fixing-a-frozen-screen-caused-by-systemd-256.md

50 lines
3.3 KiB
Markdown
Raw Normal View History

2025-02-08 21:47:24 +00:00
[![Simon Greenwood](/images/profile.png)](https://simongreenwood.me.uk/)
# [Simon Greenwood](https://simongreenwood.me.uk/)
Gracefully degrading
- [About Me](https://simongreenwood.me.uk/pages/about-me.html#about-me)
- [Contact info](https://simongreenwood.me.uk/pages/contact.html#contact)
- [My CV](https://simongreenwood.me.uk/pages/curriculum-vitae.html#curriculum-vitae)
- [CV Part 2](https://simongreenwood.me.uk/pages/cv-part-2.html#cv-part-2)
- [Social](https://gotosocial.grnwds.uk/@simon)
[Home](https://simongreenwood.me.uk/) [Technical](/category/technical.html) [Listening Diary](/category/listening-diary.html) [Tags](/tags.html) [Archives](/archives.html) [Atom](https://simongreenwood.me.uk/feeds/all.atom.xml)
# Fixing a frozen screen caused by systemd 256
Posted on Sat 03 August 2024 in [Technical](https://simongreenwood.me.uk/category/technical.html)
[Systemd version 256](https://github.com/systemd/systemd/releases/tag/v256) has been rolled out in several distributions recently, including Arch and Debian and variants. It adds a feature where user sessions are frozen when the system enters sleep, but in my case, running Manjaro Linux with KDE on a Gen 1 Lenovo T14, this meant that when the system woke, the screen remained frozen and required a reboot by switching to the command line with `Ctrl-Alt-F3`.
At first I perhaps unfairly assumed that this was KDE as it affected the desktop but left the mouse working and indeed the system accessible with through the console, but after a bit of digging around in the system journal with `journalctl -b-1 -p4 --no-pager` (a really useful command that I didn't know before), I found the error `Cannot start frozen unit Session 10 of User xxxxx` from systemd.
Searching on that brought up the problem and conclusively pointed at the 256 update, and a solution, or at least a fix until the issue is fixed.
The fix is to add an override to the `systemd-suspend` service. This doesn't actually have a service file in `/etc/systemd/system` in Manjaro at least, so you need to create the directory `/etc/systemd/system/systemd-suspend.service.d` and create an override file called `disable_freeze_user_session.conf` with these contents:
```
[Service]
Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false"
```
Save this, and restart systemd with `systemctl daemon-reload`.
This disables user freeze on sleep and for me at least, reverted to the previous behaviour. I found that a lot of the examples mentioned Nvidia video hardware, which I don't have, so it's probably a wider issue than I've found.
I've added a comment to the [Github issue](https://github.com/systemd/systemd/issues/33083).
[tech](https://simongreenwood.me.uk/tag/tech.html) [freeze](https://simongreenwood.me.uk/tag/freeze.html) [laptop](https://simongreenwood.me.uk/tag/laptop.html) [systemd](https://simongreenwood.me.uk/tag/systemd.html)
© 2025 - This work is licensed under a [Creative Commons Attribution-ShareAlike](http://creativecommons.org/licenses/by-sa/4.0/deed.en_US)
Built with [Pelican](http://getpelican.com) using [Flex](http://bit.ly/flex-pelican) theme
\|
Switch to the [dark](javascript:void(0)) \| [light](javascript:void(0)) \| [browser](javascript:void(0)) theme
[![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/80x15.png)](http://creativecommons.org/licenses/by-sa/4.0/)