Closed htot closed 4 years ago
@alext-mkrs I found systemd provides for conf directories that can be filled by packages to override default behavior. https://www.freedesktop.org/software/systemd/man/logind.conf.html
So instead of modifying /etc/systemd/logind.conf
we just seem to need a snipped in /usr/lib/systemd/logind.conf.d/pwr-button-handler.conf
containing:
HandlePowerKey=ignore
And this can be provided by the power-button-handler recipe.
Agreed?
@htot, yes, I think that's the way to go.
Sorry, literally zero time for the last couple of months for anything Edison-related...
Then this patch resolves the issue https://github.com/htot/meta-intel-edison/commit/631d6e182a030d454af98beeb2cf0e97c9a2da6e
Edison has a power button handler, but it currently doesn't work. Reason is systemd is handling the events, so pressing the power button shuts down the Edison.
To disable that we need to change /etc/systemd/logind.conf:
HandlePowerKey=ignore
With this set, power button handler detects:
Further:
I have patch in my queue that turns on Bluetooth for pairing on 3 presses, without further intervention. When this works we can enable phone pairing with tethering, and initial setup (oobe) done from phone browser. A single press could enable WiFi AP to do the same.
But I need to know best way to get login.conf modified. It could be done from post-install but that seems ugly.
@alext-mkrs Do you have better suggestion?