Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Once suspend, never back the display output until reboot since NixOS 24.11 #959

Closed
kachick opened this issue Nov 25, 2024 · 14 comments · Fixed by #972
Closed

Once suspend, never back the display output until reboot since NixOS 24.11 #959

kachick opened this issue Nov 25, 2024 · 14 comments · Fixed by #972
Labels
bug Something isn't working

Comments

@kachick
Copy link
Owner

kachick commented Nov 25, 2024

Since GH-943

Both HDMI and DisplayPort. I'm using HDMI switcher, but directly connecting DisplayPort having same issue

Partially similar of GH-894

@kachick kachick added the bug Something isn't working label Nov 25, 2024
@kachick kachick added this to 🛸 Nov 25, 2024
@github-project-automation github-project-automation bot moved this to 🙋‍♂ in 🛸 Nov 25, 2024
@kachick
Copy link
Owner Author

kachick commented Nov 25, 2024

Want #802 for addressing these issues

@kachick
Copy link
Owner Author

kachick commented Dec 1, 2024

Clicked power button does not resolve this, so looks different of #894 🤔

This is a much blocker for daily driver use...

@kachick
Copy link
Owner Author

kachick commented Dec 1, 2024

Also happened in moss...

@kachick
Copy link
Owner Author

kachick commented Dec 1, 2024

🙄 I have 2 NixOS installed devices, both are powered by AMD APU...

@kachick
Copy link
Owner Author

kachick commented Dec 1, 2024

NixOS/nixpkgs#225819 👁️

@kachick
Copy link
Owner Author

kachick commented Dec 1, 2024

https://github.com/search?q=repo%3Atorvalds%2Flinux+suspend+amd&type=commits

image

Much activity...

image

uname --kernel-release
6.6.63

Am I using old kernel even after NixOS 24.11...? 🤔

https://github.com/torvalds/linux/releases/tag/v6.6

@kachick

This comment was marked as outdated.

@kachick kachick moved this from 🙋‍♂ to 💪 in 🛸 Dec 1, 2024
@kachick
Copy link
Owner Author

kachick commented Dec 1, 2024

> journalctl --system --reverse | grep user.slice
12月 02 00:16:24 algae systemd-sleep[3606]: Failed to freeze unit 'user.slice': Connection timed out
12月 02 00:14:27 algae systemd[1]: user.slice: Consumed 15min 16.390s CPU time, 12G memory peak, 8.4G read from disk, 1.1G written to disk, 1M incoming IP traffic, 451.5K outgoing IP traffic.
12月 01 23:33:12 algae systemd-sleep[3742]: Failed to freeze unit 'user.slice': Connection timed out
12月 01 23:31:12 algae systemd[1]: user.slice: Consumed 10min 16.670s CPU time, 8.7G memory peak, 5.1G read from disk, 842.7M written to disk, 5.5M incoming IP traffic, 826.7K outgoing IP traffic.
12月 01 00:18:24 algae systemd-sleep[9858]: Failed to freeze unit 'user.slice': Connection timed out
11月 29 02:48:05 algae systemd-sleep[223576]: Failed to freeze unit 'user.slice': Connection timed out
11月 26 04:16:05 algae systemd-sleep[278606]: Failed to freeze unit 'user.slice': Connection timed out
11月 25 22:22:11 algae systemd-sleep[209444]: Failed to freeze unit 'user.slice': Connection timed out
11月 25 12:24:08 algae systemd[1]: user.slice: Consumed 37.146s CPU time, 1.5G memory peak, 1.7G read from disk, 26.2M written to disk, 2.5M incoming IP traffic, 43.4K outgoing IP traffic.
11月 25 12:15:43 algae systemd[1]: user.slice: Consumed 3min 30.100s CPU time, 3.6G memory peak, 2.6G read from disk, 92.1M written to disk, 10.3M incoming IP traffic, 1.1M outgoing IP traffic.
11月 25 12:02:21 algae systemd[1]: user.slice: Consumed 34min 51.706s CPU time, 9.3G memory peak, 7.5G read from disk, 2G written to disk, 15.5K incoming IP traffic, 13.8K outgoing IP traffic.
11月 25 10:33:45 algae systemd-sleep[6472]: Successfully thawed unit 'user.slice'.
11月 25 03:57:48 algae systemd-sleep[6472]: Successfully froze unit 'user.slice'.
11月 25 03:40:31 algae systemd[1]: user.slice: Consumed 7min 40.098s CPU time, 5.1G memory peak, 3G read from disk, 381.6M written to disk, 202.4M incoming IP traffic, 3.9M outgoing IP traffic.
11月 24 20:10:31 algae systemd-sleep[215088]: Failed to freeze unit 'user.slice': Connection timed out
11月 24 09:21:36 algae systemd-sleep[84593]: Successfully thawed unit 'user.slice'.
11月 24 01:26:01 algae systemd-sleep[84593]: Successfully froze unit 'user.slice'.
11月 23 22:31:24 algae systemd-sleep[2472]: Successfully thawed unit 'user.slice'.
11月 23 22:25:46 algae systemd-sleep[2472]: Successfully froze unit 'user.slice'.
11月 23 10:03:00 algae systemd[1]: user.slice: Consumed 14min 37.368s CPU time, 6.1G memory peak, 5G read from disk, 788.1M written to disk, 56.9M incoming IP traffic, 7.2M outgoing IP traffic.
11月 23 02:41:54 algae systemd[1]: user.slice: Consumed 4h 52min 36.824s CPU time, 23.1G memory peak, 16.8G read from disk, 9.2G written to disk, 77.7M incoming IP traffic, 5.7M outgoing IP traffic.
11月 22 19:55:19 algae systemd[1]: user.slice: Consumed 4h 26min 4.396s CPU time, 24.3G memory peak, 25.2G read from disk, 11.8G written to disk, 25K incoming IP traffic, 14.9K outgoing IP traffic.
11月 22 16:47:28 algae systemd-sleep[113415]: Successfully thawed unit 'user.slice'.
11月 22 13:16:54 algae systemd-sleep[113415]: Successfully froze unit 'user.slice'.
11月 22 02:39:54 algae systemd-sleep[668762]: Failed to freeze unit 'user.slice': Connection timed out
11月 21 11:00:47 algae systemd-sleep[347911]: Successfully thawed unit 'user.slice'.
11月 21 03:29:05 algae systemd-sleep[347911]: Successfully froze unit 'user.slice'.
11月 20 15:38:46 algae systemd-sleep[73890]: Successfully thawed unit 'user.slice'.
11月 20 14:23:21 algae systemd-sleep[73890]: Successfully froze unit 'user.slice'.
11月 20 09:32:02 algae systemd-sleep[6339]: Successfully thawed unit 'user.slice'.
11月 20 02:52:52 algae systemd-sleep[6339]: Successfully froze unit 'user.slice'.
11月 20 02:44:11 algae systemd[1]: user.slice: Consumed 1h 29min 9.642s CPU time, 20.4G memory peak, 9.5G read from disk, 12.4G written to disk, 2.7G incoming IP traffic, 60.5M outgoing IP traffic.
11月 17 01:07:35 algae kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1001.slice/[email protected]/app.slice/app-gnome-kitty-1696066.scope,task=nix,pid=2482265,uid=1001
11月 17 00:37:21 algae kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=nix-daemon.service,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1001.slice/[email protected]/app.slice/app-gnome-google\x2dchrome-1699315.scope,task=chrome,pid=1991163,uid=1001
11月 11 21:11:24 algae systemd[1]: user.slice: Consumed 6min 23.843s CPU time, 5.0G memory peak, 0B memory swap peak, received 71.4M IP traffic, sent 2.2M IP traffic.
10月 28 16:10:46 algae systemd[1]: user.slice: Consumed 1min 11.971s CPU time, 4.7G memory peak, 0B memory swap peak, received 2.4M IP traffic, sent 276.7K IP traffic.
10月 28 16:05:25 algae systemd[1]: user.slice: Consumed 1h 31min 16.641s CPU time, 13.0G memory peak, 0B memory swap peak, received 554.7M IP traffic, sent 25.5M IP traffic.
10月 28 03:25:30 algae systemd[1]: user.slice: Consumed 6min 1.543s CPU time, 6.1G memory peak, 0B memory swap peak, received 17.2M IP traffic, sent 1.9M IP traffic.
10月 28 03:08:38 algae systemd[1]: user.slice: Consumed 2h 33min 9.057s CPU time, 16.8G memory peak, 0B memory swap peak, received 712.8M IP traffic, sent 47.9M IP traffic.
10月 27 19:48:35 algae systemd[1]: user.slice: Consumed 44min 45.847s CPU time, 9.8G memory peak, 0B memory swap peak, received 365.8M IP traffic, sent 12.1M IP traffic.
10月 27 16:58:37 algae systemd[1]: user.slice: Consumed 12h 6min 29.877s CPU time, 26.6G memory peak, 0B memory swap peak, received 8.1G IP traffic, sent 264.5M IP traffic.
10月 23 21:32:10 algae systemd[1]: user.slice: Consumed 6min 24.434s CPU time, received 67.3M IP traffic, sent 2.4M IP traffic.
10月 23 21:18:24 algae systemd[1]: user.slice: Consumed 4min 28.315s CPU time, 7.4G memory peak, 0B memory swap peak, received 57.5M IP traffic, sent 1.1M IP traffic.
10月 23 21:08:31 algae systemd[1]: user.slice: Consumed 2h 51min 34.014s CPU time, 18.5G memory peak, 0B memory swap peak, received 1.2G IP traffic, sent 54.9M IP traffic.
10月 22 13:50:41 algae systemd[1]: user.slice: Consumed 4h 40min 48.754s CPU time, received 1.4G IP traffic, sent 66.2M IP traffic.
10月 21 20:33:32 algae systemd[1]: user.slice: Consumed 16h 57min 42.062s CPU time, received 1.2G IP traffic, sent 89.1M IP traffic.
10月 20 23:46:08 algae systemd[1]: user.slice: Consumed 1h 44min 29.280s CPU time, 11.8G memory peak, 0B memory swap peak, received 248.6M IP traffic, sent 24.6M IP traffic.
10月 20 17:23:07 algae systemd[1]: user.slice: Consumed 11h 8min 11.291s CPU time, 30.7G memory peak, 0B memory swap peak, received 11.5G IP traffic, sent 216.5M IP traffic.
10月 11 11:11:05 algae systemd[1]: user.slice: Consumed 54min 56.053s CPU time, 8.4G memory peak, 0B memory swap peak, received 332.4M IP traffic, sent 14.5M IP traffic.
10月 10 22:05:25 algae systemd[1]: user.slice: Consumed 18.615s CPU time, received 28.9K IP traffic, sent 4.1K IP traffic.
10月 10 22:02:44 algae systemd[1]: user.slice: Consumed 1h 12min 7.498s CPU time, 13.4G memory peak, 0B memory swap peak, received 735.6M IP traffic, sent 22.6M IP traffic.
10月 04 02:08:44 algae systemd[1]: user.slice: Consumed 1h 42min 57.560s CPU time, 15.5G memory peak, 0B memory swap peak, received 2.4G IP traffic, sent 35.8M IP traffic.
10月 03 20:22:33 algae systemd[1]: user.slice: Consumed 5h 10min 35.198s CPU time, received 200.6M IP traffic, sent 20.0M IP traffic.
10月 03 13:31:25 algae systemd[1]: user.slice: Consumed 2h 11min 26.023s CPU time, 16.3G memory peak, 0B memory swap peak, received 805.0M IP traffic, sent 41.3M IP traffic.

systemd/systemd#33083 ? 👀

> journalctl --system --reverse | grep -i 'Freezing user'
12月 02 00:16:30 algae kernel: Freezing user space processes completed (elapsed 0.001 seconds)
12月 02 00:16:30 algae kernel: Freezing user space processes
12月 01 23:33:14 algae kernel: Freezing user space processes completed (elapsed 0.001 seconds)
12月 01 23:33:14 algae kernel: Freezing user space processes
12月 01 23:33:13 algae kernel: Freezing user space processes completed (elapsed 0.001 seconds)
12月 01 23:33:13 algae kernel: Freezing user space processes
12月 01 10:31:47 algae kernel: Freezing user space processes completed (elapsed 0.001 seconds)
12月 01 10:31:47 algae kernel: Freezing user space processes
11月 30 21:45:35 algae kernel: Freezing user space processes completed (elapsed 0.016 seconds)
11月 30 21:45:35 algae kernel: Freezing user space processes
11月 26 08:32:44 algae kernel: Freezing user space processes completed (elapsed 0.018 seconds)
11月 26 08:32:44 algae kernel: Freezing user space processes
11月 25 23:02:32 algae kernel: Freezing user space processes completed (elapsed 0.018 seconds)
11月 25 23:02:32 algae kernel: Freezing user space processes
11月 25 10:33:45 algae kernel: Freezing user space processes completed (elapsed 0.002 seconds)
11月 25 10:33:45 algae kernel: Freezing user space processes
11月 24 20:29:11 algae kernel: Freezing user space processes completed (elapsed 0.009 seconds)
11月 24 20:29:11 algae kernel: Freezing user space processes
11月 24 09:21:36 algae kernel: Freezing user space processes completed (elapsed 0.002 seconds)
11月 24 01:26:01 algae kernel: Freezing user space processes
11月 23 22:31:24 algae kernel: Freezing user space processes completed (elapsed 0.001 seconds)
11月 23 22:31:24 algae kernel: Freezing user space processes
11月 22 16:47:28 algae kernel: Freezing user space processes completed (elapsed 0.002 seconds)
11月 22 16:47:28 algae kernel: Freezing user space processes
11月 22 09:35:20 algae kernel: Freezing user space processes completed (elapsed 0.002 seconds)
11月 22 09:35:20 algae kernel: Freezing user space processes
11月 21 11:00:47 algae kernel: Freezing user space processes completed (elapsed 0.002 seconds)
11月 21 11:00:47 algae kernel: Freezing user space processes
11月 20 15:38:46 algae kernel: Freezing user space processes completed (elapsed 0.001 seconds)
11月 20 15:38:46 algae kernel: Freezing user space processes
11月 20 09:32:02 algae kernel: Freezing user space processes completed (elapsed 0.002 seconds)
11月 20 09:32:02 algae kernel: Freezing user space processes
11月 19 08:57:28 algae kernel: Freezing user space processes failed after 20.007 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 19 08:57:08 algae kernel: Freezing user space processes
11月 19 08:57:08 algae kernel: Freezing user space processes failed after 20.006 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 19 08:56:48 algae kernel: Freezing user space processes
11月 19 06:56:47 algae kernel: Freezing user space processes failed after 20.002 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 19 06:56:47 algae kernel: Freezing user space processes
11月 19 06:56:27 algae kernel: Freezing user space processes failed after 20.005 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 19 06:56:27 algae kernel: Freezing user space processes
11月 19 04:56:06 algae kernel: Freezing user space processes failed after 20.001 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 19 04:56:06 algae kernel: Freezing user space processes
11月 19 04:55:46 algae kernel: Freezing user space processes failed after 20.002 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 19 04:55:46 algae kernel: Freezing user space processes
11月 19 02:55:25 algae kernel: Freezing user space processes failed after 20.003 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 19 02:55:25 algae kernel: Freezing user space processes
11月 19 02:55:05 algae kernel: Freezing user space processes failed after 20.006 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 19 02:54:45 algae kernel: Freezing user space processes
11月 18 20:48:45 algae kernel: Freezing user space processes failed after 20.002 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 20:48:25 algae kernel: Freezing user space processes
11月 18 20:48:25 algae kernel: Freezing user space processes failed after 20.009 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 20:48:05 algae kernel: Freezing user space processes
11月 18 10:39:55 algae kernel: Freezing user space processes failed after 20.000 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 10:39:35 algae kernel: Freezing user space processes
11月 18 10:39:35 algae kernel: Freezing user space processes failed after 20.002 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 10:39:15 algae kernel: Freezing user space processes
11月 18 08:19:03 algae kernel: Freezing user space processes failed after 20.008 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 08:18:43 algae kernel: Freezing user space processes
11月 18 08:18:43 algae kernel: Freezing user space processes failed after 20.007 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 08:18:23 algae kernel: Freezing user space processes
11月 18 06:18:22 algae kernel: Freezing user space processes failed after 20.005 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 06:18:02 algae kernel: Freezing user space processes
11月 18 06:18:02 algae kernel: Freezing user space processes failed after 20.001 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 06:17:42 algae kernel: Freezing user space processes
11月 18 04:17:41 algae kernel: Freezing user space processes failed after 20.002 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 04:17:21 algae kernel: Freezing user space processes
11月 18 04:17:21 algae kernel: Freezing user space processes failed after 20.004 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 04:17:01 algae kernel: Freezing user space processes
11月 18 02:17:00 algae kernel: Freezing user space processes failed after 20.005 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 02:16:40 algae kernel: Freezing user space processes
11月 18 02:16:40 algae kernel: Freezing user space processes failed after 20.003 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 18 02:16:20 algae kernel: Freezing user space processes
11月 17 23:46:16 algae kernel: Freezing user space processes failed after 20.000 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 23:45:56 algae kernel: Freezing user space processes
11月 17 23:45:56 algae kernel: Freezing user space processes failed after 20.000 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 23:45:36 algae kernel: Freezing user space processes
11月 17 21:45:36 algae kernel: Freezing user space processes failed after 20.007 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 21:45:35 algae kernel: Freezing user space processes
11月 17 21:45:15 algae kernel: Freezing user space processes failed after 20.004 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 21:44:55 algae kernel: Freezing user space processes
11月 17 19:44:55 algae kernel: Freezing user space processes failed after 20.008 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 19:44:35 algae kernel: Freezing user space processes
11月 17 19:44:34 algae kernel: Freezing user space processes failed after 20.009 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 19:44:14 algae kernel: Freezing user space processes
11月 17 17:44:14 algae kernel: Freezing user space processes failed after 20.003 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 17:43:54 algae kernel: Freezing user space processes
11月 17 17:43:53 algae kernel: Freezing user space processes failed after 20.003 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 17:43:33 algae kernel: Freezing user space processes
11月 17 15:43:33 algae kernel: Freezing user space processes failed after 20.003 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 15:43:33 algae kernel: Freezing user space processes
11月 17 15:43:13 algae kernel: Freezing user space processes failed after 20.006 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 15:42:52 algae kernel: Freezing user space processes
11月 17 13:42:52 algae kernel: Freezing user space processes failed after 20.005 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 13:42:32 algae kernel: Freezing user space processes
11月 17 13:42:32 algae kernel: Freezing user space processes failed after 20.001 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 13:42:12 algae kernel: Freezing user space processes
11月 17 11:42:11 algae kernel: Freezing user space processes failed after 20.008 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 11:41:51 algae kernel: Freezing user space processes
11月 17 11:41:51 algae kernel: Freezing user space processes failed after 20.007 seconds (5 tasks refusing to freeze, wq_busy=0):
11月 17 11:41:31 algae kernel: Freezing user space processes

systemd/systemd#33626

@kachick
Copy link
Owner Author

kachick commented Dec 1, 2024

> systemctl --version                            
systemd 256 (256.8)
+PAM +AUDIT -SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -XKBCOMMON +UTMP -SYSVINIT +LIBARCHIVE

@kachick
Copy link
Owner Author

kachick commented Dec 11, 2024

Summarizing this issue for visitor to resolve easily.

Check your environment might have same problem

# Using NixOS 24.11
> </etc/os-release | grep CPE_NAME
CPE_NAME="cpe:/o:nixos:nixos:24.11"

# systemd is 256 or newer
> systemctl --version
systemd 256 (256.8)

# There are some error logs
> journalctl --system --reverse --grep "Failed to freeze unit 'user.slice'" 
... systemd-sleep[3606]: Failed to freeze unit 'user.slice': Connection timed out

# kernel is older than 6.12.2(or v6.11.11)
> uname --kernel-release
6.6.63
> uname --kernel-release 
6.12.1

How to resolve on NixOS 24.11

Choose one of following options. And reboot

Set an env

systemd.services.systemd-suspend.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false";

Or bump to new kernel (Not yet checked, when I tried this way, it was still 6.12.1)

boot.kernelPackages = pkgs.linuxPackages_latest;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment