You are not logged in.

#1 2024-07-08 10:01:09

Drack
Member
Registered: 2023-11-08
Posts: 5

[SOLVED] Kernel panic and session freeze while resuming from suspend

Since the beginning of July after updating my system, I cannot resume from sleep successfully while it was working properly since the Arch installation.

Here is an image of the log displayed on the screen:
PXL-20240707-015143045.jpg

I believe the problem lies into the Nvidia driver (I have a GTX 1060), because of the message:

BUG: scheduling while atomic: irq/54-nvidia/1209/0x00000000

I currently have the v555.58.02-1 installed (nvidia and nvidia-utils packages).

I would be glad if someone have a suggestion. May a good idea to try downgrading the driver?

Last edited by Drack (2024-08-07 19:55:06)

Offline

#2 2024-07-08 14:57:45

seth
Member
Registered: 2012-09-03
Posts: 56,367

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0 ?
https://bbs.archlinux.org/viewtopic.php?id=296954

Offline

#3 2024-07-08 20:51:53

Drack
Member
Registered: 2023-11-08
Posts: 5

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

Thanks for the suggestion Seth, I don't know how I didn't noticed this issue before (I've now seen also the ticket and the Reddit post about it).
However, I find out that this fix is already installed on my system... Since the date this issue appears and my problem are matching, I suppose that my issue is related to systemd or nvidia, but I've no clue on how to investigate this more.

Offline

#4 2024-07-08 21:06:58

seth
Member
Registered: 2012-09-03
Posts: 56,367

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

Feel free to downgrade nvidia or go straight for the 535xx-dkms driver from the AUR to sidestep the prevalent issues in the 550xx drivers, https://bbs.archlinux.org/viewtopic.php … 2#p2181442
(you'll need to establish the SYSTEMD_SLEEP_FREEZE_USER_SESSIONS fix in either case)

The backtrace says it's a recursive fault, can you still scroll up the console buffer?

Offline

#5 2024-07-09 07:29:29

Drack
Member
Registered: 2023-11-08
Posts: 5

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

I tried to downgrade from nvidia 555.58.02-1 to 545.29.06-19 using Pacman cache, but after rebooting, another graphical problem occurred (that was not present before).
Moreover, I was not able to scroll back the console buffer, the system was entirely frozen.
So I run an update (full-system) to re-install 555, and I planned to go for 535xx-dkms driver from there. But ! Surprisingly, with the nvidia 555.58.02-2 from 2024-07-07 and the kernel 6.9.8.arch1-1 which has also been upgraded, my issue disappeared: no more graphical problem nor resuming problem!

Thanks for the suggestions!

Last edited by Drack (2024-07-09 07:33:27)

Offline

#6 2024-07-10 20:59:17

Drack
Member
Registered: 2023-11-08
Posts: 5

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

Finally, after a successful first resume, the second one failed again with the same issue... I'll have to investigate.

Offline

#7 2024-07-10 21:58:22

seth
Member
Registered: 2012-09-03
Posts: 56,367

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

When you suspend/resume (you can inspect an older log from a successful cycle) does systemd complain that you're not supposed to set SYSTEMD_SLEEP_FREEZE_USER_SESSIONS?
If yes, try the 535xx behavior.

Offline

#8 2024-08-07 16:07:53

Drack
Member
Registered: 2023-11-08
Posts: 5

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

Hello ! Sorry for the long delay.

I'm here for an update. Problem solved with 535xx drivers and the SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false fix.

For future reference, I have a Nvidia GTX 1060 (NV136 / GP106) GPU as indicated by FreeDesktop.
Here is the bug I had with the 555.58 drivers, despite SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false which was shipped by the driver packagers:

août 07 14:25:12 citadel kernel: Oops: Oops: 0000 [#1] PREEMPT SMP PTI
août 07 14:25:12 citadel kernel: CPU: 0 PID: 1176 Comm: irq/54-nvidia Tainted: P           OE      6.10.3-arch1-2 #1 20bffa7dc84b9a89fd543afbd712f49dca71b693
[...]
août 07 14:25:12 citadel kernel: BUG: kernel NULL pointer dereference, address: 000000000000032c
août 07 14:25:12 citadel kernel: #PF: supervisor read access in kernel mode
août 07 14:25:12 citadel kernel: #PF: error_code(0x0000) - not-present page

On Seth's advice, I downgraded to 535xx drivers. First, I uninstalled the 555 series. Then, I installed nvidia-535xx-dkms (with its companions nvidia-535xx-utils and nvidia-535xx-settings).

Then, without SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false (because not shipped in this package), the TTY freezes when I issued the systemctl suspend command:

août 07 17:22:31 citadel systemd-logind[880]: The system will suspend now!
[...]
août 07 17:22:31 citadel systemd[1]: Reached target Sleep.
août 07 17:22:31 citadel systemd[1]: Starting System Suspend...
août 07 17:22:31 citadel systemd-sleep[13906]: Successfully froze unit 'user.slice'.
août 07 17:22:31 citadel systemd-sleep[13906]: Performing sleep operation 'suspend'...
août 07 17:22:31 citadel kernel: PM: suspend entry (deep)
août 07 17:22:31 citadel kernel: Filesystems sync: 0.007 seconds
[...]
[Frozen system!!!]
août 07 17:23:00 citadel systemd-logind[880]: Power key pressed short.
août 07 17:23:02 citadel systemd-logind[880]: Power key pressed short.
août 07 17:23:03 citadel systemd-logind[880]: Power key pressed short.
-- Boot e170afaa71bb45ee8e421900dc0db5b2 --

Finally, I setup the SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false fix by using sudo systemctl edit systemd-suspend.service and adding:

[Service]
Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false"

Reboot, and now I'm able to suspend and resume the system correctly! Thanks Seth. smile

Offline

#9 2024-08-07 19:52:27

seth
Member
Registered: 2012-09-03
Posts: 56,367

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#10 2024-08-09 12:12:33

Perdu
Member
Registered: 2020-07-30
Posts: 3

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

I don't know if this is the right place for this, but I have the same issue and I'd like to add additional details:
- the kernel panic only happens after a long sleep session (several hours)
- My fix was to reverting to both nvidia-550 and linux-6.9.6:
sudo pacman -U /var/cache/pacman/pkg/{nvidia-utils-550.90.07-3,nvidia-550.90.07-4,lib32-nvidia-utils-550.90.07-1,linux-6.9.6.arch1-1}-x86_64.pkg.tar.zst
- the 'Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false"' is already present in the service file. I guess it was pushed by some package

Offline

#11 2024-09-01 20:06:57

Th3Link
Member
Registered: 2022-04-05
Posts: 3

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

I had the same issues, just hadn't the time so solve it and stumbled over this post as i really want it to be solved now. However, time was my helping hand wink
For me it seems to be fixed with nvidia 560.
There are some "options" in the release notes (https://www.nvidia.com/de-de/drivers/details/230926/) that could roughly explain it, but nothing too obviously.

Offline

#12 2024-09-01 20:10:01

Perdu
Member
Registered: 2020-07-30
Posts: 3

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

Did you set some specific settings? 560 did NOT solve it for me

Offline

#13 2024-09-09 17:49:22

Th3Link
Member
Registered: 2022-04-05
Posts: 3

Re: [SOLVED] Kernel panic and session freeze while resuming from suspend

I haven't made any changes, but I need to retract my previous statement about it being helpful. The issue still persists, though it happens less frequently. It seems like the system suspends and wakes around 10 times, but I recently experienced two consecutive crashes while using an external monitor connected to a docking station.

Offline

Board footer

Powered by FluxBB