Problems with Shutdown taking a long time | Fedora 40 |

Sometimes my Fedora 40 doesn’t turn off until the end. During such an unsuccessful shutdown, the screen goes out, ssh and sunhine servers become unavailable, but the hardware does not turn off. I’ve been waiting for over 20 minutes, but it doesn’t help.
I can’t reproduce the problem on purpose, but it occurs periodically. The LED near the power button is on, the fans of the processor and video card are spinning. Forced shutdown via the power button of the system unit helps
How can I analyze this situation?

I am a novice fedora and linux user. Less than 10 days have passed since the installation of the system, if this information is relevant.

Please provide some Hardware info for us to help diagnose the issue. Provide in </> preformatted text : inxi -Fxzz

Then you can start by checking Logs.

From the Appls Menu : Logs

Or you can run a command like :

sudo journalctl -b -1

This command displays the logs for the current boot session -b with the last entry at the bottom -1 . Look for any errors or warnings around the time you attempted the shutdown.

You can also try during a problematic shutdown, pressing the Esc after initiating the shutdown process. This might reveal messages on the screen indicating what’s causing the issue.

Added f40

It sounds like a service is taking long to shut down, and holds the shutdown process up in the meantime. As a random guess, maybe a device on your LAN is keeping Sunshine active until that device closes the connection (maybe it’s Android and it keeps it open for a bit regardless of it not being in Recents).

During the long shutdown, try disconnecting the internet (unplug Ethernet or temporarily power-off wifi router); if it shuts down instantly after that, it’s likely a service keeping or having a connection active.

A very interesting assumption.
I tried to reboot fedora through an active session in sunshine, but the system rebooted successfully. Maybe this situation happens sometimes, I don’t know. There have been no unsuccessful shutdowns recently. I’ll try to read the system logs.

Here’s what I got after entering the command

inxi -Fxzz

вystem:
  Kernel: 6.8.8-300.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-34.fc40
  Desktop: GNOME v: 46.1 Distro: Fedora Linux 40 (Workstation Edition)
Machine:
  Type: Desktop Mobo: Micro-Star model: B460M PRO-VDH (MS-7C83) v: 1.0
    serial: <superuser required> UEFI: American Megatrends v: 1.70
    date: 08/28/2023
CPU:
  Info: quad core model: Intel Core i3-10100F bits: 64 type: MT MCP
    arch: Comet Lake rev: 3 cache: L1: 256 KiB L2: 1024 KiB L3: 6 MiB
  Speed (MHz): avg: 4153 high: 4289 min/max: 800/4300 cores: 1: 4099 2: 4154
    3: 4199 4: 4115 5: 4107 6: 4166 7: 4289 8: 4100 bogomips: 57600
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: AMD Navi 23 [Radeon RX 6600/6600 XT/6600M] vendor: Sapphire
    driver: amdgpu v: kernel arch: RDNA-2 bus-ID: 03:00.0
  Display: x11 server: X.Org v: 1.20.14 with: Xwayland v: 23.2.6 driver: X:
    loaded: amdgpu dri: radeonsi gpu: amdgpu resolution: 1920x1080
  API: OpenGL v: 4.6 vendor: amd mesa v: 24.0.6 glx-v: 1.4
    direct-render: yes renderer: AMD Radeon RX 6600 (radeonsi navi23 LLVM
    18.1.1 DRM 3.57 6.8.8-300.fc40.x86_64)
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: Intel Comet Lake PCH-V cAVS vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
  Device-2: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel
    bus-ID: 03:00.1
  API: ALSA v: k6.8.8-300.fc40.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.0.5 status: active
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Micro-Star MSI driver: r8169 v: kernel port: 3000 bus-ID: 04:00.0
  IF: enp4s0 state: up speed: 100 Mbps duplex: full mac: <filter>
  IF-ID-1: ham0 state: unknown speed: 10000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: TP-Link UB500 Adapter driver: btusb v: 0.8 type: USB bus-ID: 1-9:4
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.1
    lmp-v: 10
Drives:
  Local Storage: total: 1.82 TiB used: 148.68 GiB (8.0%)
  ID-1: /dev/nvme0n1 vendor: Silicon Power model: SPCC M.2 PCIe SSD
    size: 931.51 GiB temp: 38.9 C
  ID-2: /dev/sda vendor: Western Digital model: WD10EZEX-22MFCA0
    size: 931.51 GiB
Partition:
  ID-1: / size: 725.75 GiB used: 148.36 GiB (20.4%) fs: btrfs
    dev: /dev/nvme0n1p4
  ID-2: /boot size: 973.4 MiB used: 326.8 MiB (33.6%) fs: ext4
    dev: /dev/nvme0n1p3
  ID-3: /boot/efi size: 598.8 MiB used: 7.4 MiB (1.2%) fs: vfat
    dev: /dev/nvme0n1p2
  ID-4: /home size: 725.75 GiB used: 148.36 GiB (20.4%) fs: btrfs
    dev: /dev/nvme0n1p4
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 38.0 C mobo: N/A gpu: amdgpu temp: 38.0 C
  Fan Speeds (rpm): N/A gpu: amdgpu fan: 0
Info:
  Memory: total: 16 GiB available: 15.55 GiB used: 2.86 GiB (18.4%)
  Processes: 373 Uptime: 9m Init: systemd target: graphical (5)
  Packages: 27 Compilers: gcc: 14.0.1 Shell: Bash v: 5.2.26 inxi: 3.3.34

I didn’t found anything interestings in the systems log, except one error, but it repeats every shutdown:

ая 10 21:15:43 fedora systemd[1]: Using hardware watchdog 'iTCO_wdt', version 4, device /dev/watchdog0
may 10 21:15:43 fedora systemd[1]: Watchdog running with a timeout of 10min.
may 10 21:15:43 fedora kernel: watchdog: watchdog0: watchdog did not stop!
may 10 21:15:43 fedora systemd-shutdown[1]: Using hardware watchdog 'iTCO_wdt', version 4, device /dev/watchdog0
may 10 21:15:43 fedora systemd-shutdown[1]: Watchdog running with a timeout of 10min.
may 10 21:15:43 fedora systemd-shutdown[1]: Syncing filesystems and block devices.
may 10 21:15:43 fedora systemd-shutdown[1]: Sending SIGTERM to remaining processes...
may 10 21:15:43 fedora systemd-journald[664]: Journal stopped

I will try to enter “ESC” in the next problematic shutdown.

Same problem here since I switched from Geforce to Radeon this year in February. However, for me it’s not only when shutting down, but also when switching to suspend. Under Fedora 39 with kernel 6.7 it happened every few days, since Fedora 40 and kernel 6.8 it only happens about every ten days. Then it is exactly as you describe: The system seems to shut down completely, only the power LED stays lit and the fans keep spinning. If I want to switch the computer off completely, I have to force-shutdown with the powerbutton.
I really don’t know what the exact reason for this behavior could be, but since the last kernel updates and the associated AMD updates have definitely made a difference, I think we’ll have to wait patiently for the next updates. Until then I will also keep an eye on the logs and the shutdown process and post here if I find out anything.

Phoronix said a few weeks ago that kernel 6.10 is coming with more AMD updates, as you can read here:

There are also some fixes there, I’ll keep my fingers crossed!

The status of the kernel versions for Fedora can be viewed here:
https://bodhi.fedoraproject.org/updates/?packages=kernel

Here is my System-Info:

Mainboard ASUS PRIME Z370-A
RAM 32,0 GiB
CPU Intel Core i5-8600
GPU AMD Radeon RX7600XT
OS Fedora Linux 40.20240516.0 (Silverblue)
GNOME 46
Window-Manager Wayland
Kernel-Version Linux 6.8.9-300.fc40.x86_64

Can you try using a different kernel at boot?

Thanks for your reply!
Sadly i got only the current Kernel in my kernel-list.
Reverting to an earlier kernel version probably won’t help, as this problem has existed for me since I’ve had an AMD GPU and that’s since about kernel 6.7.6 and fedora silverblue 39.

Are you currently on Silverblue?

You can rebase to something else, to test things out. Probably the best feature for Silverblue is this redeployment of the OS.

Thanks for the tip! I’ll see if i can switch to a kernel older than 6.7 when i get the chance. Currently i’ll test whether the problem will also occur under xorg.

The Linux kernel has been updated to 6.8.10, video card drivers and some libraries. The system does not start on the new core. It hangs in grub at the “Loading Linux 6.8.10” stage. It does not respond to ESC.
On the other hand, now EVERY system shutdown from kernel 6.8.9 does not complete successfully. The ESC key does not lead to anything. I have no idea what to do about it.

I like my next attempt to upgrade to Linux from Windows, but this problem bothers me.

UPDATE:
The computer successfully turns on and off on the 6.8.8 core. Perhaps there are some problems with the new cores for my hardware.

Your issue might be different thant what the OP experienced. We have found that reinstalling the kernel has helped some people. Also, using the ESC is not relevant to your system as you are probably using Grub as the default bootloader. If you are still experiencing issues please start a new thread.