Slow Shutdown, Reboot error

Assistance is requested to resolve slow shutdown and reboot errors with a fresh installation of openSUSE 15.1 (BTRFS) running KDE on a (low power) desktop machine (HP EliteDesk 800 SFF/83E1, BIOS Q01 Ver. 02.07.01 04/23/2019) with EFI boot from an NVMe SSD. MS OS is not installed.

At ‘Shutdown’ the system hangs at ‘Reached target shutdown’ for 1-2 minutes, then shuts down. It can then be restarted normally. At ‘Reboot’ the system hangs at ‘Reached target shutdown’ for 1-2 minutes, then shows a blank screen for 1-2 minutes, then reboots to a normal looking KDE login screen that is non functional (no response to mouse or keyboard). It can then be restarted normally, after a hard reset.

I suspect these errors may be related to mounting or identifying Swap or perhaps to lvm2 services, installed automaticaly. Logs are not immediatly helpful or not understood. I have found some similar issues reported here but nothing simple enough for me to pursue. I have reached the point where my unskilled attempts to resolve these errors now risks compounding them.

Swap setup information (all from yast)
Kernel CLP
splash=silent resume=/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3020071038-part3 quiet

Partitioner - Device
Device: /dev/nvme0n1p3
Size: 2.00 GiB
Encrypted: No
Device Path: pci-0000:01:00.0-nvme-1-part3
Device ID 1: nvme-ADATA_SX8200PNP_2J3020071038-part3
Device ID 2: nvme-nvme.1cc1-324a33303230303731303338-414441544120535838323030504e50-00000001-part3
Partition ID: Linux Swap

Boot Log
OK ] Found device /dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3020071038-part3.
Starting Resume from hibernation us…TA_SX8200PNP_2J3020071038-part3…
OK ] Started Resume from hibernation usi…DATA_SX8200PNP_2J3020071038-part3.

LVM information
Yast services manager shows lvm2-lvmetad and lvme2-monitor running. LVM is not used.

I trust some of this may be useful.

Try stopping those services before shutdown. See if that improves things.

Other people have reported a similar problem related to LVM. Maybe look for earlier threads on the issue to see what others have done.

Thanks. Searching with ‘lvm+shutdown’ yields 9 hits. Consensus: if you don’t need them, ‘disable LVM services’. I’ll give it a go.

I followed this advice from a relevant bug report on the slow shudown issue: “Apparently setting the lvm2-monitor service to start “manually” and possibly stopping the lvm2-lvmtad and lvm2-lvmpolld services seems to be enough to solve the problem.”

Subsequently ‘Shutdown/Power-off’ proceedes without the long delay, but while ‘Reboot’ reaches ‘Shutdown’ without delay it then hangs (blank screen) for 3 minutes or so, then restarts grub2 with no mouse or keyboard input. Grub2 starts OS automatically after timeout and login screen is displayed, but again, no mouse or keyboard input. So ‘Reboot’ remains broken on this machine.

Interpreting the many semi-related threads is difficult for me. I found a link to a useful RedHat debugging guide and hints about possible issues related to network and CUPS services. I will keep looking.

You’re not an Opera user, are you? If so, make sure you close it completely before logging out, and don’t leave it running when not actively using it. I thought my brother’s old Toshiba AMD laptop was frozen after it went into screenlocker mode and I returned it to Opera opened in Plasma. It took what seemed like an eternity to get Opera to respond to close requests. I subsequently got Konsole to open, though it took a while. I opened top in Konsole, which showed nominal swap in use, and 70% of 3G RAM consumed, but I have my doubts about how completely Opera’s RAM got freed given how long it took to close Plasma and shut down.

Not since they changed hands, some time ago. New install so proceeding slowly.

I tried suggested network and print services ‘fixes’ to no avail. Reboot remains broken. Such fun.

you may de-install lvm2 and verify:

erlangen:~ # zypper se lvm2
Loading repository data...
Reading installed packages...

S | Name              | Summary                                    | Type   
--+-------------------+--------------------------------------------+--------
  | libbd_lvm2        | The LVM plugin for the LibBlockDev library | package
  | liblvm2cmd2_03    | LVM2 command line library                  | package
  | libudisks2-0_lvm2 | UDisks module for LVM2                     | package
  | lvm2              | Logical Volume Manager Tools               | package
  | lvm2-devel        | Development files for LVM2                 | package
  | lvm2-lockd        | LVM locking daemon                         | package
  | lvm2-testsuite    | LVM2 Testsuite                             | package
erlangen:~ # 

[QUOTE=karlmistelberger;2922136]you may de-install lvm2 and verify: [snip]/QUOTE]
Seems next logical step. So:

# zypper se lvm2

S | Name           | Summary                                                   | Type      
--+----------------+-----------------------------------------------------------+-----------
  | liblvm2app2_2  | LVM2 application api library                              | package   
  | liblvm2cmd2_02 | LVM2 command line library                                 | package   
  | lvm2           | Logical Volume Manager Tools                              | package   
  | lvm2           | Logical Volume Manager Tools                              | srcpackage
  | lvm2-clvm      | Clustered LVM2                                            | package   
  | lvm2-clvm      | Clustered LVM2                                            | srcpackage
  | lvm2-cmirrord  | Clustered RAID 1 support using device-mapper and corosync | package   
  | lvm2-devel     | Development files for LVM2                                | package   
  | lvm2-lockd     | LVM locking daemon                                        | package   
  | lvm2-testsuite | LVM2 Testsuite                                            | package   
# 

But sadly reboot error persists.

[quote="“Tallowwood,post:9,topic:138827”]

Did you reboot twice?

Next step. Amended kernel CLP for possible issues related to nvme boot, as suggested here.
Added string ‘nvme_core.default_ps_max_latency_us=0’ [This is my first nvme machine. What is this doing?]

Result: some progress, reboot is now not delayed, but grub2 screen remains unresponsive to mouse and keyboard. Login with virtual keyboard is possible. KDE seems to start normally and is responsive to keyboard and mouse.

So, Reboot is now working (hooray!), but more tweaking is needed to fix unresponsive mouse and keyboard on grub2 boot screen.

The fun goes on. https://forums.opensuse.org/images/icons/icon7.png

Possibly we could spot clues from the following:

sudo mount | egrep -i 'sda|sdb|nvme'
cat /etc/fstab
sudo journalctl -b -1 | egrep -iA3 'ailed|shutdown'

If you get an error message about non persistent journal you can create directory /var/log/journal, then reboot to find a persisitent journal to try agaiin

OK

# mount | egrep -i 'sda|sdb|nvme'
/dev/nvme0n1p2 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=268,subvol=/@/.snapshots/1/snapshot)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/nvme0n1p2 on /var type btrfs (rw,relatime,ssd,space_cache,subvolid=259,subvol=/@/var)
/dev/nvme0n1p2 on /home type btrfs (rw,relatime,ssd,space_cache,subvolid=258,subvol=/@/home)
/dev/nvme0n1p2 on /srv type btrfs (rw,relatime,ssd,space_cache,subvolid=262,subvol=/@/srv)
/dev/nvme0n1p4 on /data type xfs (rw,nosuid,nodev,noexec,relatime,attr2,inode64,noquota,user)
/dev/nvme0n1p2 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,ssd,space_cache,subvolid=265,subvol=/@/boot/grub2/x86_64-efi)
/dev/nvme0n1p2 on /boot/grub2/i386-pc type btrfs (rw,relatime,ssd,space_cache,subvolid=266,subvol=/@/boot/grub2/i386-pc)
/dev/nvme0n1p2 on /root type btrfs (rw,relatime,ssd,space_cache,subvolid=263,subvol=/@/root)
/dev/nvme0n1p2 on /.snapshots type btrfs (rw,relatime,ssd,space_cache,subvolid=267,subvol=/@/.snapshots)
/dev/nvme0n1p2 on /usr/local type btrfs (rw,relatime,ssd,space_cache,subvolid=260,subvol=/@/usr/local)
/dev/nvme0n1p2 on /opt type btrfs (rw,relatime,ssd,space_cache,subvolid=264,subvol=/@/opt)
/dev/nvme0n1p2 on /tmp type btrfs (rw,relatime,ssd,space_cache,subvolid=261,subvol=/@/tmp)
/dev/sda on /mnt/grn_data01 type xfs (rw,relatime,attr2,inode64,noquota)
# 
> cat /etc/fstab
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /                       btrfs  defaults                      0  0
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /.snapshots             btrfs  subvol=/@/.snapshots          0  0
/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3020071038-part3  swap      swap   defaults                      0  0
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /var                    btrfs  subvol=/@/var                 0  0
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /tmp                    btrfs  subvol=/@/tmp                 0  0
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /root                   btrfs  subvol=/@/root                0  0
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /opt                    btrfs  subvol=/@/opt                 0  0
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /home                   btrfs  subvol=/@/home                0  0
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=eda410d2-7556-403c-b2d8-89d9b684a534  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=ADC3-2833                             /boot/efi               vfat   defaults                      0  0
UUID=759af14b-e10f-439c-8d17-558d1ad01bf1  /data                   xfs    user                          0  0
UUID=508b326b-4892-4c5b-b738-52f371c1caa1  /mnt/grn_data01         xfs    defaults                      0  0
>

sudo journalctl -b -1 | egrep -iA3 ‘ailed|shutdown’
See pastebin

Providing this required a reboot. Sad to say bad reboot is back - 3 minute delay, non-responsive grub2, non-responsive login. Strangely, after about a minute the mouse became responsive in login screen and I was able to login with virtual keyboard.
The mystery deepens …


 > rpm --query --whatprovides /var/log/journal
systemd-logger-234-lp151.26.4.1.x86_64
 > 

IMHO, it’s usually better to forcibly reinstall the “systemd-logger” package …
[HR][/HR]In addition, the following package maintenance should be executed:

  • rpm --rebuilddb
  • zypper verify
  • rpm --verify --all
  • rpmconfigcheck

At each step, repair any issues which have been reported by the tools.
[HR][/HR]Additionally manual Btrfs housekeeping should be executed:

  • btrfs balance start -dusage=85 /
  • btrfs balance start -musage=70 /

[HR][/HR]Once all that has been done, reboot and then, check that the system behaviour is as it should be.

Thank-you for responding but I do not quite understand.

This is what I get:

rpm --query --whatprovides /var/log/journal systemd-logger-234-lp151.26.4.1.x86_64
file /var/log/journal is not owned by any package
no package provides systemd-logger-234-lp151.26.4.1.x86_64
systemd-logger-234-lp151.26.4.1.x86_64 conflicts with namespace:otherproviders(syslog) provided by rsyslog-8.33.1-lp151.6.10.1.x86_64
     ] deinstallation of rsyslog-8.33.1-lp151.6.10.1.x86_64
     ] do not install systemd-logger-234-lp151.26.4.1.x86_64

Not quite understood. See post above.

In addition, the following package maintenance should be executed:

rpm --rebuilddb
zypper verify
rpm --verify --all
rpmconfigcheck

At each step, repair any issues which have been reported by the tools.

Completed. No issues are reported.

Additionally manual Btrfs housekeeping should be executed:

btrfs balance start -dusage=85 /
btrfs balance start -musage=70 /
# btrfs balance start -dusage=85 /
Done, had to relocate 43 out of 83 chunks
#

# btrfs balance start -musage=70 /
Done, had to relocate 2 out of 61 chunks
# 

Once all that has been done, reboot and then, check that the system behaviour is as it should be.

Reboot error persists. Symptoms unchanged - 3 minute delay, non-responsive grub2, non-responsive login. After about a minute the mouse became responsive in login screen and I was able to login with virtual keyboard.

Just a wild stab: try appending plymouth.enable=0 to your line beginning with linu using the E key at your Grub menu. If it helps, you can uninstall plymouth*.

Tested. Reboot error persists.
Would this parameter persist after shutdown/reboot?
Are there additional logs that could be enabled to track shutdown/reboot process?
inxi --recommends reports …
The following files are missing from your system:
File: /etc/lsb-release
File: /proc/mdstat
File: /var/run/dmesg.boot

Thanks for your advice with this.

No. If you want it to stay it needs to go in /etc/default/grub and grub.cfg updated. Do that with YaST preferably. Or just uninstall Plymouth*.

Are there additional logs that could be enabled to track shutdown/reboot process?
You could take quiet off the kernel cmdline in same manner as adding plymouth.enable=0. Other than that the only ones I’m familiar with are for X trouble on https://01.org/linuxgraphics/documentation/how-report-bugs. Uploading the entirety of journalctl -b -1 might be useful (without grepping anything).

inxi --recommends reports …
The following files are missing from your system:
File: /etc/lsb-release
File: /proc/mdstat
File: /var/run/dmesg.boot
lsb-release you can install, but what it could help I cannot imagine. mdstat is about RAID, pointless unless you are using MD RAID. dmesg.boot I never heard of. I’m guessing it duplicates journalctl -b. If you are using the ancient inxi from standard openSUSE repos, I recommend removal and installing current from upstream https://smxi.org/docs/inxi-installation.htm#inxi-manual-install

Thank-you for taking time to provide technical advice and to answer my questions about plymouth.

To restate: After shutdown, the reboot process hangs for 2 minutes, then grub2 screen is shown but is unresponsive and default OS is booted after countdown. The openSUSE login screen is unresponsive for 1 minute, then mouse AND keyboard become responsive and user can login normally. The system then operates more or less as expected. The basic logs seem to show no obvious reports for these issues.