Bug#1035665: grub-efi-amd64: GRUB command "halt" generates 1 "unsafe shutdown" on NVMe-SSD (Samsung 980)
Alf
alf.debianfan at gmx.de
Sun May 7 12:12:46 BST 2023
Package: grub-efi-amd64
Version: 2.06-12
Severity: important
Tags: d-i
Dear Maintainer,
* What led up to the situation?
Select a command line in GRUB-menu ("c") and enter "halt to shutdown the PC.
Acording to official documentation on grub 2.06 (https://www.gnu.org/software/grub/manual/grub/grub.html paragraph 16.3.31) it should perform a shutdown using APM.
After every "halt" command the PC powers off and at next boot my NVMe-SSD, Samsung 980 has the SMART-attribute "unsafe shutdowns" increased by 1.
This indicates that the SSD's Buffers have not been transferred to NAND before the power is cut.
Remark: said SSD uses host memory buffer (HMB), a technique becoming popular.
Those unsafe shutdowns do NOT happen when I perform a "poweroff" or "shutdown -h" on a booted system (here Bookworm).
I tried to verify that it is not a single issue by discussing this issue in the German debianforum and got the same beheaviour on similar hardware confirrmed.
https://debianforum.de/forum/viewtopic.php?t=186800#p1326586
-- Package-specific info:
*********************** BEGIN /proc/mounts
/dev/nvme0n1p4 / ext4 rw,relatime,errors=remount-ro,stripe=32 0 0
/dev/nvme0n1p6 /home/ingo/data ext4 rw,noatime,errors=remount-ro,stripe=32 0 0
/dev/nvme0n1p1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
*********************** END /proc/mounts
*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=1024x768
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=de_DE
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=7
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=7
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec
insmod png
if background_image /usr/share/desktop-base/emerald-theme/grub/grub-16x9.png; then
set color_normal=white/black
set color_highlight=black/white
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/09_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Debian Bookworm on nvme0n1p4' {
search --fs-uuid --set=root 419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec
linux /vmlinuz root=UUID=419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec ro quiet
initrd /initrd.img
}
menuentry 'Debian Service System on nvme0n1p2' {
search --fs-uuid --set=root f137f033-f121-4857-9b00-f8ecaa32fff8
# linux /vmlinuz root=UUID=f137f033-f121-4857-9b00-f8ecaa32fff8 ro quiet nvme_core.default_ps_max_latency>
linux /vmlinuz root=UUID=f137f033-f121-4857-9b00-f8ecaa32fff8 ro quiet
initrd /initrd.img
}
menuentry 'Debian Test System on nvme0n1p5' {
search --fs-uuid --set=root 689af3dd-5898-4c3c-a688-366815c0f79f
linux /vmlinuz root=UUID=689af3dd-5898-4c3c-a688-366815c0f79f ro quiet
initrd /initrd.img
}
menuentry "--------" {
normal
}
menuentry " Reboot" {
reboot
}
#menuentry " Shutdown" {
# halt
#}
menuentry "--------" {
normal
}
### END /etc/grub.d/09_custom ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec
echo 'Loading Linux 6.1.0-7-amd64 ...'
linux /boot/vmlinuz-6.1.0-7-amd64 root=UUID=419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-7-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec' {
menuentry 'Debian GNU/Linux, with Linux 6.1.0-7-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-7-amd64-advanced-419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec
echo 'Loading Linux 6.1.0-7-amd64 ...'
linux /boot/vmlinuz-6.1.0-7-amd64 root=UUID=419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-7-amd64
}
menuentry 'Debian GNU/Linux, with Linux 6.1.0-7-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-7-amd64-recovery-419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec
echo 'Loading Linux 6.1.0-7-amd64 ...'
linux /boot/vmlinuz-6.1.0-7-amd64 root=UUID=419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-7-amd64
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Debian GNU/Linux 12 (bookworm) (on /dev/nvme0n1p2)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-f137f033-f121-4857-9b00-f8ecaa32fff8' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root f137f033-f121-4857-9b00-f8ecaa32fff8
linux /vmlinuz root=UUID=f137f033-f121-4857-9b00-f8ecaa32fff8 ro quiet
initrd /initrd.img
}
submenu 'Advanced options for Debian GNU/Linux 12 (bookworm) (on /dev/nvme0n1p2)' $menuentry_id_option 'osprober-gnulinux-advanced-f137f033-f121-4857-9b00-f8ecaa32fff8' {
menuentry 'Service System on nvme0n1p2 (on /dev/nvme0n1p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--f137f033-f121-4857-9b00-f8ecaa32fff8' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root f137f033-f121-4857-9b00-f8ecaa32fff8
linux /vmlinuz root=UUID=f137f033-f121-4857-9b00-f8ecaa32fff8 ro quiet
initrd /initrd.img
}
menuentry 'Service System on nvme0n1p2 (recovery mode) (on /dev/nvme0n1p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-root=UUID=f137f033-f121-4857-9b00-f8ecaa32fff8 ro single-f137f033-f121-4857-9b00-f8ecaa32fff8' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root f137f033-f121-4857-9b00-f8ecaa32fff8
linux /vmlinuz root=UUID=f137f033-f121-4857-9b00-f8ecaa32fff8 ro single
initrd /initrd.img
}
}
menuentry 'Debian GNU/Linux 12 (bookworm) (on /dev/nvme0n1p5)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-689af3dd-5898-4c3c-a688-366815c0f79f' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 689af3dd-5898-4c3c-a688-366815c0f79f
linux /vmlinuz root=UUID=689af3dd-5898-4c3c-a688-366815c0f79f ro quiet
initrd /initrd.img
}
submenu 'Advanced options for Debian GNU/Linux 12 (bookworm) (on /dev/nvme0n1p5)' $menuentry_id_option 'osprober-gnulinux-advanced-689af3dd-5898-4c3c-a688-366815c0f79f' {
menuentry 'Test System on nvme0n1p5 (on /dev/nvme0n1p5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--689af3dd-5898-4c3c-a688-366815c0f79f' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 689af3dd-5898-4c3c-a688-366815c0f79f
linux /vmlinuz root=UUID=689af3dd-5898-4c3c-a688-366815c0f79f ro quiet
initrd /initrd.img
}
menuentry 'Test System on nvme0n1p5 (recovery mode) (on /dev/nvme0n1p5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-root=UUID=689af3dd-5898-4c3c-a688-366815c0f79f ro single-689af3dd-5898-4c3c-a688-366815c0f79f' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 689af3dd-5898-4c3c-a688-366815c0f79f
linux /vmlinuz root=UUID=689af3dd-5898-4c3c-a688-366815c0f79f ro single
initrd /initrd.img
}
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg
*********************** BEGIN /proc/mdstat
cat: /proc/mdstat: No such file or directory
*********************** END /proc/mdstat
*********************** BEGIN LVM
*********************** END LVM
*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 13 May 7 12:19 nvme-Samsung_SSD_980_1TB_S649NL0T621719X -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-Samsung_SSD_980_1TB_S649NL0T621719X-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-Samsung_SSD_980_1TB_S649NL0T621719X-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-Samsung_SSD_980_1TB_S649NL0T621719X-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-Samsung_SSD_980_1TB_S649NL0T621719X-part4 -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-Samsung_SSD_980_1TB_S649NL0T621719X-part5 -> ../../nvme0n1p5
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-Samsung_SSD_980_1TB_S649NL0T621719X-part6 -> ../../nvme0n1p6
lrwxrwxrwx 1 root root 13 May 7 12:19 nvme-eui.002538d621a0aac5 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-eui.002538d621a0aac5-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-eui.002538d621a0aac5-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-eui.002538d621a0aac5-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-eui.002538d621a0aac5-part4 -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-eui.002538d621a0aac5-part5 -> ../../nvme0n1p5
lrwxrwxrwx 1 root root 15 May 7 12:19 nvme-eui.002538d621a0aac5-part6 -> ../../nvme0n1p6
*********************** END /dev/disk/by-id
*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 15 May 7 12:19 2310-B833 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 May 7 12:19 3ef0ed60-3517-4059-8b30-faf6ce892d2a -> ../../nvme0n1p6
lrwxrwxrwx 1 root root 15 May 7 12:19 419e6a3e-0a83-4f46-b3cb-dcd21f7bc2ec -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 15 May 7 12:19 689af3dd-5898-4c3c-a688-366815c0f79f -> ../../nvme0n1p5
lrwxrwxrwx 1 root root 15 May 7 12:19 855f657b-634f-4192-a99c-8b30f536cd86 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 May 7 12:19 f137f033-f121-4857-9b00-f8ecaa32fff8 -> ../../nvme0n1p2
*********************** END /dev/disk/by-uuid
-- System Information:
Debian Release: 12.0
APT prefers testing-security
APT policy: (500, 'testing-security'), (500, 'testing'), (50, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-7-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_USER, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages grub-efi-amd64 depends on:
ii debconf [debconf-2.0] 1.5.82
ii grub-common 2.06-12
ii grub-efi-amd64-bin 2.06-12
ii grub2-common 2.06-12
ii ucf 3.0043+nmu1
grub-efi-amd64 recommends no packages.
grub-efi-amd64 suggests no packages.
-- debconf information:
grub2/update_nvram: true
grub2/kfreebsd_cmdline:
* grub2/linux_cmdline_default: quiet
grub2/force_efi_extra_removable: false
grub2/enable_os_prober: false
grub2/kfreebsd_cmdline_default: quiet
* grub2/gnumach_cmdline:
* grub2/linux_cmdline:
More information about the Pkg-grub-devel
mailing list