"shutdown now" used to turn off the LPC, doesn't anymore

in the beginning (June 2022), a “shutdown now” used to completely turn off everything (no battery drain). At some point this changed and now I have to “shutdown now” and then also press the circle button and select “power off”. Some posts in the forum imply that the shutdown command never turned off the LPC by itself, but it did mine (is that weird?). What’s the most correct procedure to turn the reform off now? And why could this behaviour have changed?

Normally this should work, but perhaps there is a regression. What’s your CPU module? Can you check with lsmod if reform2_lpc module is loaded?

The module is loaded. The CPU is the default one, Cortex A53 I think. Btw., “/proc/cpuinfo” doesn’t show this at all, very minimal.

You can find out what CPU module you have by running this:

cat /proc/device-tree/model

You can check whether the reform2_lpc module is loaded by running this:

grep '^reform2_lpc ' /proc/modules

You get more information about your CPU than with /proc/cpuinfo by running lscpu. What is your version of reform-tools? Is your system fully upgraded? Is something interesting printed when you run sudo reform-check?


$ lsmod | grep 'lpc'
reform2_lpc            12288  0

$ cat /proc/device-tree/model
MNT Reform 2 HDMI

$ grep '^reform2_lpc' /proc/modules 
reform2_lpc 12288 0 - Live 0x0000000000000000 (OE)


$ lscpu
Architecture:             aarch64
  CPU op-mode(s):         32-bit, 64-bit
  Byte Order:             Little Endian
CPU(s):                   4
  On-line CPU(s) list:    0-3
Vendor ID:                ARM
  Model name:             Cortex-A53
    Model:                4
    Thread(s) per core:   1
    Core(s) per cluster:  4
    Socket(s):            -
    Cluster(s):           1
    Stepping:             r0p4
    CPU(s) scaling MHz:   67%
    CPU max MHz:          1500.0000
    CPU min MHz:          1000.0000
    BogoMIPS:             16.66
    Flags:                fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
Caches (sum of all):      
  L1d:                    128 KiB (4 instances)
  L1i:                    128 KiB (4 instances)
  L2:                     1 MiB (1 instance)


$ apt show reform-tools
Package: reform-tools
Version: 1.37
Priority: optional
Protected: yes
Section: admin

Yes, reform-check prints interesting things:

$ doas reform-check
I: not installed:  blueman dunst firefox firmware-realtek gpiod inetutils-ping kde-style-breeze network-manager-gnome papirus-icon-theme pasystray qt5ct reform-firedecor swayidle wayfire wofi 
W: /boot/flash.bin is not the latest uboot
W: You can update it to the latest version by running as root:
W: eMMC does not contain latest uboot
W: You can update it to the latest version by running as root:
reform-flash-uboot emmc
W: SD-Card does not contain latest uboot
W: You can update it to the latest version by running as root:
reform-flash-uboot sd
W: /dev/mmcblk0p2 doesn't exist.
W: To update your eMMC to sysimage-v4 you can run reform-flash-rescue
W: Only run reform-flash-rescue if you intend a factory-reset of your eMMC
W: Do not use reform-flash-rescue if you boot from eMMC because this will overwrite your /boot partition
W: unexpected content in /etc/default/flash-kernel:
--- -	2024-04-02 11:36:16.221408921 +0200
+++ /etc/default/flash-kernel	2022-08-15 17:03:59.000000000 +0200
@@ -1,2 +1,2 @@
+LINUX_KERNEL_CMDLINE="console=ttymxc0,115200 console=tty1"
+LINUX_KERNEL_CMDLINE_DEFAULTS="ro no_console_suspend cma=512M pci=nomsi"
E: /etc/flash-kernel/preboot.d/00reform2_preboot contains default content overriding /usr/share/flash-kernel/preboot.d/00reform2_preboot
E: consider deleting /etc/flash-kernel/preboot.d/00reform2_preboot in favour of /usr/share/flash-kernel/preboot.d/00reform2_preboot
W: /etc/initramfs-tools/modules contains default content superseded by /usr/share/initramfs-tools/modules.d/reform.conf
W: consider restoring /etc/initramfs-tools/modules to its original state by running:
sed '/^###/d' /usr/share/initramfs-tools/modules | sudo tee /etc/initramfs-tools/modules
E: unexpected last line in /etc/skel/.profile, should be:
if [ "$(whoami)" = "root" ]; then cat /etc/reform-root-help; elif [ -z "$WAYLAND_DISPLAY" ]; then cat /etc/reform-help; fi
I: the following files differ from how they are shipped by reform-tools:
??5??????   /var/lib/alsa/asound.state


$ grep mmc /etc/mtab
/dev/mmcblk1p1 /boot ext2 rw,relatime,errors=remount-ro 0 0


$ grep mmc /etc/fstab
#/dev/mmcblk1p2 / auto errors=remount-ro 0 1
#/dev/mmcblk1p1 /boot auto errors=remount-ro 0 1
/dev/mmcblk1p1 /boot auto errors=remount-ro 0 1

Regarding the SD, I didn’t modify it, but I did transfer debin to the nvme drive, apart from the boot partition.

$ ls -l /dev/mmcblk*
brw-rw---- 1 root disk 179,   0 Apr  2 11:43 /dev/mmcblk0
brw-rw---- 1 root disk 179, 256 Apr  2 11:23 /dev/mmcblk0boot0
brw-rw---- 1 root disk 179, 512 Apr  2 11:23 /dev/mmcblk0boot1
brw-rw---- 1 root disk 179,   1 Apr  2 11:43 /dev/mmcblk0p1
crw------- 1 root root 240,   0 Apr  2 11:23 /dev/mmcblk0rpmb
brw-rw---- 1 root disk 179, 768 Apr  2 11:23 /dev/mmcblk1
brw-rw---- 1 root disk 179, 769 Apr  2 11:23 /dev/mmcblk1p1
brw-rw---- 1 root disk 179, 770 Apr  2 11:23 /dev/mmcblk1p2

P.S.: I did not modify any of /etc/default/* by hand, nor anything about alsa, the warnings about them are surprising to me.

P.P.S: looking at the warnings above…

$ doas reform-flash-uboot sd
/sbin/reform-flash-uboot: 94: SDDEV: parameter not set

Should I try setting it like this:

$ sudo SDDEV='mmcblk1p1' reform-flash-uboot sd #?
1 Like

update: I had trouble upgrading because of manpages-dev, but now the system is fully upgraded. The problem persists.
I tried resolving some of the reform-check warnings, but they are probably unrelated.

I deleted /etc/flash-kernel/preboot.d/00reform2_preboot
I did this:

sed '/^###/d' /usr/share/initramfs-tools/modules | sudo tee /etc/initramfs-tools/modules

The uboot script complais about both SDDEV and MMCDEV.

sudo SDDEV=/dev/disk/by-label/MNTREFORMBOOT reform-flash-uboot sd
[sudo] password for andrei: 
Downloading uboot to /boot/flash.bin and comparing checksum
Get:1 https://source.mnt.re/reform/reform-boundary-uboot/-/jobs/artifacts/2023-10-18/raw/flash.bin?job=build [1,054 kB]
Fetched 1,054 kB in 1s (1,436 kB/s)       
/usr/sbin/reform-flash-uboot: 97: MMCDEV: parameter not set

… so I got scared.

Thank you! This is a bug in reform-flash-uboot which I need to fix. Thank you for reporting it! I can ping you once the next reform-tools version is out or, if you like, send you a fixed version of that script before that.

About the “shutdown now” problem, there was some discussion on that topic yesterday on IRC about how to fix it:


1 Like

It’s not urgent. I can definitely wait for the update through the normal channels.
Thank you.