aarch64-laptops / build

Build an Linux OS based image
235 stars 55 forks source link

shutdown without reboot hack #45

Open bm16ton opened 4 years ago

bm16ton commented 4 years ago

for sum reason on all kernels especially 5.7.x te shutdown is dicey IE it reboots instead of turning off because of errors. But my machine shutsdown fine if i disconnect the wifi (NOT shut it off) before shutting down. But I forget to disconnect so i made a systemd service to disconnect the wifi on shutdown early enuff for network-manager, qrtr to shutdown properly /etc/systemd/system/iw-disconnect.service [Unit] Description=disconnect wifi Before=shutdown.target

[Service] Type=oneshot RemainAfterExit=true ExecStart=/usr/local/bin/disconnect-wifi.sh TimeoutStartSec=0

[Install] WantedBy=shutdown.target

AND the contents of /usr/local/bin/disconnect-wifi.sh

!/bin/bash

nmcli device disconnect wlan0 exit

Now it boots and shutsdown perfectly