Manjaro Shutdown Time Sometimes Slow

Still 6 sec and nothing special. Then it has nothing to do the shutdown/reboot process. I would point to the GNOME DE or the UEFI.

Please a full log now:

journalctl -b -1 | curl --upload-file - https://aptget.xyz/boot.log

It will create a link for you.

1 Like

It’s telling me that I can’t include links in my post now. Why is that? Is there a limit to how many links can I post in a day or something?

Sorry, you can’t include links in your posts

No idea :man_shrugging: Post it like this: https://aptget.xyz with `.

Alright. Here’s the link: http://aptget.xyz/kXedW/boot.log

Sorry i don’t anything relevant that is pointing to a 90s shutdown process. 6s shutdown time is not bad on a spinning disk.

What i could guess is watchdog or zswap or maybe the mitigation of spectre meltdown etc…

In /etc/default/grub at GRUB_CMDLINE_LINUX="" add for example
nowatchdog, run sudo update-grub and reboot to activate it.

You can also add zswap.enabled=0 or mitigations=off.

But, well on the logs it seems it runs good enough on a spinning disk.

Or there is something weird with the UEFI? Is it in legacy mode or do you run the uefi with a legacy profile?

Weird thing is that sometimes I get slow shutdowns too, on an NVMe SSD and 16 gb RAM.

There is lots of disk activity for about 60 seconds before the “watchdog did not stop”, which is strange as I have little RAM usage, little disk cache and little swap, as I close many programs before shutdown.

Happened in kernels 5.7, 5.8 and the 5.9 rc currently using.

System is a Ryzen 2700x, AMD rx 570 video card

Okay, so basically I should edit my /etc/default/grub's GRUB_CMDLINE_LINUX="" line to be:
GRUB_CMDLINE_LINUX="nowatchdog zswap.enabled=0 mitigations=off"

Right?

2 Likes

Also, if I find that my UEFI is set to Legacy Mode, what should I change it to?

Additionally, this is what my /etc/default/grub contains:

GRUB_DEFAULT=saved
GRUB_TIMEOUT=1
GRUB_TIMEOUT_STYLE=menu
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
GRUB_CMDLINE_LINUX="nowatchdog zswap.enabled=0 mitigations=off"

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

Do you sense something wrong in it that might be delaying the shutdown?

Change the UEFI to a profile like: “Optimized for Windows 7” or “Optimized for Other OS” or something similar. I don’t mean CSM legacy BIOS.

Nope, nothing there.

Additionally audit=0 could reduce the log writes by skipping the audits and therefore the disk writes.

AND

Check which scheduler you use:

cat /sys/block/sda/queue/scheduler

bfq is normally the scheduler for spinning HDDs.

@megavolt

Changing from legacy to UEFI means a re-install in 99% of all cases.

:scream:

Also had a look at the log and it could be something hanging after journald was stopped (so I’m more inclined to suspect a firmware issue than to the DE)

@snowden17_38

Could you have a look if there is an UEFI firmware / BIOS update available for your MoBo?

GRUB_CMDLINE_LINUX="nowatchdog zswap.enabled=0 mitigations=off audit=0"

That’s what you mean, right?

And, here’s my cat /sys/block/sda/queue/scheduler output:
[mq-deadline] kyber bfq none

How do I look up whether there’s a BIOS/UEFI update pending for my device? Do you mean I should check out my manufacturer’s website for drivers and stuff? Or can I check if there’s an update pending from the BIOS/UEFI menu that appears when I keep pressing F2 during boot?

Moreover, if there are any updates as such, aren’t they supposed to be installed automatically? I’m sorry if I’ve said something obscure/otherworldly.

Yes, for firmware / BIOS updates.

It depends on your manufacturer, but I don’t know any that installs firmware automatically. As for mouse / CPU / … updates: yes they are built into the kernel or if not like nVidia drivers, they still get updated automatically.

Never apologize unless:

  • I’m screaming at the top of my lungs
  • Holding my foot
  • jumping up and down
  • Calling you names
    :stuck_out_tongue_winking_eye: :crazy_face:

yes

While mq-deadline is a good scheduler for SSDs and sort of, it can be really slow on spinning disks.

Better use bfq which focuses on delivering the lowest latency rather than achieving the maximum throughput. Therefore it can react better, but it will cost you a little more CPU Power.
https://algo.ing.unimo.it/people/paolo/disk_sched/

To change that on the fly:

sudo su
echo bfq > /sys/block/sda/queue/scheduler

and check what has been chosen:

cat /sys/block/sda/queue/scheduler

For changing that permanently, you have to set udev rule like this:

# set scheduler for rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"

in a file like: /etc/udev/rules.d/60-ioschedulers.rules (you need to create it)

Source: Improving performance - ArchWiki

1 Like

This is what I got from the manufacturer’s drivers’ website: https://www.dell.com/support/home/en-in/product-support/product/latitude-15-3500-laptop/drivers
What do you suggest? I think the first one is the one we’re aiming for but there is only an .exe download. That’s only relevant for Windows.

I had to format it like this because it’s not letting me add a link in a post.

After the echo command one, I did cat /sys/block/sda/queue/scheduler, and it gave:
mq-deadline kyber [bfq] none
I see the brackets are now around bfq, so now that’s the one which is selected, right?

And, I created that file as you said and saved the text in it. Doing cat /etc/udev/rules.d/60-ioschedulers.rules now gives:
# set scheduler for rotating disks ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"

So, it’s copied into that file. Tell me if I did anything wrong.

As I see there is also another format: rcv
You need to download that one, put it on a usb drive with fat32 formatted.

Quote from Dell:

Installation

  1. Copy the downloaded file to a USB drive. The USB drive does not need to be bootable device.
  2. Insert the USB drive into any USB port.
  3. Power on the system.
  4. At the DELL logo screen, press F12 to access the one-time boot menu.
  5. Select BIOS Update in the section.
  6. Click Flash from file to browse the USB drive to locate the downloaded file.
  7. Select the file and click Submit.
  8. Verify the existing system BIOS information and the BIOS update information.
  9. Click Update BIOS.
  10. Review the Warning message and click Confirm Update BIOS! to proceed with the update.
    The system restarts and displays a progress bar at the Dell logo screen. The system restarts again when the update is complete.

https://www.dell.com/support/home/de-de/drivers/driversdetails?driverid=7tvnm&oscode=wt64a&productcode=latitude-15-3500-laptop

1 Like

Yes worked.

Yes look good. Have to correct myself: “#” means it is a comment. It should look like this:

# set scheduler for rotating disks 
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"

First line: Comment
Second line: udev rule

Check after reboot if bfq is still selected for the device: /dev/sda