Skip to content

bsp: generalize and update powerkey chapter#443

Open
BHahn42618 wants to merge 1 commit intomainfrom
WIP/bhahn/power_key
Open

bsp: generalize and update powerkey chapter#443
BHahn42618 wants to merge 1 commit intomainfrom
WIP/bhahn/power_key

Conversation

@BHahn42618
Copy link
Copy Markdown
Contributor

Append the powerkey chapter, with a check that the powerkey setting in systemd logind.conf is not overwritten by other configs. With the Yocto walnascar, the HandlePowerKey is deactivated by NXP in a seperate config which will overwrite the logind.conf. With that command the NXP config is shown.

@BHahn42618 BHahn42618 requested review from tremmet and ymoog as code owners April 9, 2026 10:38
@tremmet
Copy link
Copy Markdown
Contributor

tremmet commented Apr 9, 2026

Is this meant as a hint when something goes wrong? You do will fix this in the BSP, too?

Copy link
Copy Markdown
Contributor

@ymoog ymoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the point of this addition.
Either our BSP does everything as described here, then we don't need the hint.
Or our BSP does not do this. Then we either change the doc or fix the BSP.

Where do you see value/justification in this addition?

@BHahn42618
Copy link
Copy Markdown
Contributor Author

In the previous BSP's NXP was editing the logind.conf directly via a patch. Now they deploy a seperate config file. The new way they do it seems to be the "upstream Yocto way", as this is the way how poky does it with /usr/lib/systemd/logind.conf.d/00-systemd-conf.conf (this was already present in the last BSP). The problem is, that the config file overwrites the logind.conf, which we describe should be changed. With this addition, the user should see that there are config files that overwrite the logind.conf. Since the new way seems to be the upstream way, I would not change it in Yocto and only add this to the BSP doc.
Also the config from NXP is needed, as not setting the button to ignore will lead to the Board shutting down when using the button to wakeup from suspend, which was the function we defined as the default in the past.

@ymoog
Copy link
Copy Markdown
Contributor

ymoog commented Apr 13, 2026

In the previous BSP's NXP was editing the logind.conf directly via a patch. Now they deploy a seperate config file. The new way they do it seems to be the "upstream Yocto way", as this is the way how poky does it with /usr/lib/systemd/logind.conf.d/00-systemd-conf.conf (this was already present in the last BSP). The problem is, that the config file overwrites the logind.conf, which we describe should be changed. With this addition, the user should see that there are config files that overwrite the logind.conf. Since the new way seems to be the upstream way, I would not change it in Yocto and only add this to the BSP doc.

I am positive that the BSP doc section you are referring to instructs to change the file at runtime, i.e. boot the system, edit the /etc/systemd/logind.conf file, save it. This has not changed.
I understand that the override happens within Yocto, is that correct?
Assuming the above, if we or anyone else downstream wants to change anything in the compile time contents of such a config file, a new file in our meta layer would have to be created anyway. This then takes precedence and we need not worry about anything NXP is doing.

Also the config from NXP is needed, as not setting the button to ignore will lead to the Board shutting down when using the button to wakeup from suspend, which was the function we defined as the default in the past.

If I understood you correctly, we can take NXP version of the file, add our own flavour and save it in our meta layer.
I believe you mixed the runtime editing of the file with Yocto. If you want to add a hint, add it to the Yocto manual, not the BSP manual. But then again, using your own version of a config file is nothing new to Yocto, NXP just used to do it "incorrectly".

@BHahn42618 BHahn42618 force-pushed the WIP/bhahn/power_key branch from f1a36f9 to 9611f0a Compare April 13, 2026 16:54
@BHahn42618 BHahn42618 requested a review from cstoidner as a code owner April 13, 2026 16:54
Comment thread source/bsp/imx-common/peripherals/power-key.rsti Outdated
tremmet
tremmet previously approved these changes Apr 15, 2026
@BHahn42618 BHahn42618 force-pushed the WIP/bhahn/power_key branch 2 times, most recently from ba64a36 to c6d8846 Compare April 15, 2026 08:01
Generalize the power-key chapter and move to imx-common.
For head manuals a different path needs to be adjusted now, as NXP sets
the HandlePowerKey=ignore not in the logind.conf itself anymore, but a
config snipped for the logind.conf.

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
@BHahn42618 BHahn42618 force-pushed the WIP/bhahn/power_key branch from c6d8846 to 8aeab0c Compare April 15, 2026 08:04
@BHahn42618
Copy link
Copy Markdown
Contributor Author

rebase to main. imx91-93 pd26.1.0 manual was added

@BHahn42618 BHahn42618 changed the title bsp: Check that powerkey systemd setting is not overwritten bsp: generalize and update powerkey chapter Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants