Hello,
Currently we are facing a problem that we can’t shutdown Ubuntu system via power button after several times power cycling with our carrier board, below are our reproduce procedures.
1.Create a script to record number of ON times and launch a terminal to show its number on login through below method
(1) Press the Super key (windows key).
(2) Type "Startup Applications"
(3) Click on the Startup Applications option
(4) Click "Add"
(5) In the "name" field, type "on off test"
(6) In the "command" field, type gnome-terminal --geometry=80x24+100+100 -e "<ON_OFF_SCRIPT_PATH>/on_off.sh"
(7) Click "Add"
2.Enable automatic login
3.Issue below command to change power button behavior from ‘suspend’ to ‘shutdown’
$ gsettings set org.gnome.settings-daemon.plugins.power button-power 'shutdown'
4.Shutdown device
=> Start to do on off test right here
5. Press power button to power on device, after login into Ubuntu desktop, you’ll see gnome-terminal is launched and show the ON times
6. Wait around 1 minutes, press power button to shutdown system
7. Repeat power on/off via power button.
After repeating several times, we can’t shutdown Ubuntu system via power button but at that time systemd-logind still can detect that power key is pressed.
[Note]: Even we skip step (3) to keep power button its default behavior (i.e. “suspend”), issue is still there.
[Read from journal log]
...
systemd-logind[4694]: Power key pressed.
...
Below are the procedures what I did to build the image based on Jetpack 4.5.1
- Download “Tegra186_Linux_R32.5.1_aarch64.tbz2” & “Tegra_Linux_Sample-Root-Filesystem_R32.5.1_aarch64.tbz2” and de-compress them
$ sudo tar xvf Tegra186_Linux_R32.5.1_aarch64.tbz2 Linux_for_Tegra/
$ sudo tar xvf Tegra_Linux_Sample-Root-Filesystem_R32.5.1_aarch64.tbz2 -C ./Linux_for_Tegra/rootfs
- Change directory to Linux_for_Tegra and issue below command
$ sudo apply_binaries.sh
- Build our customize kernel and then copy kernel image and modules to target rootfs. Below are our changes:
1. [Add “INSTALL_MOD_STRIP=1” while doing module installation]
make ARCH=arm64 O=${TEGRA_KERNEL_OUT} modules_install INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=${TEGRA_MODULES_OUT}
2. [Makefile change]: Change form “–strip-debug” to “–strip-unneeded”
ifeq ($(INSTALL_MOD_STRIP),1)
mod_strip_cmd = $(STRIP) --strip-unneeded
else
mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP)
endif # INSTALL_MOD_STRIP=1
- Flash image
Currently I have no idea how to solve it. Is there any problem to build the image? Thanks.