Bug 483259

Summary: Suppress systemd wall messages at reboot/poweroff
Product: [Plasma] plasmashell Reporter: cogebok177
Component: Session ManagementAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: kde, kde, nate, smowtenshi
Priority: NOR Keywords: usability
Version First Reported In: 6.0.1   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description cogebok177 2024-03-11 16:13:32 UTC
SUMMARY
Since version 251, systemd's default behavior is to print wall messages on calls to systemctl poweroff/reboot/halt. These wall messages follow the format of:
"The system is going down for reboot NOW!"
Plasma intercepts these wall messages and displays them as a toast notification with associated sound.

This is undesirable behavior - it adds unnecessary noise to the shutdown process, and a user may misinterpret the notification as an actually important notification they missed while shutting down their device. A user does not need to be informed of a shutdown or reboot they just triggered.

STEPS TO REPRODUCE
1. Shut down or reboot device from plasma
2. Watch/listen for wall message notification in plasma

OBSERVED RESULT
Wall message toast notification appears and notification sound moments before plasma itself shuts down.

EXPECTED RESULT
Plasma shutdown process should be clear of extraneous notifications.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.5.6-zen2-1-zen
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
To resolve this issue, all calls to systemd poweroff/reboot/halt should have the "--no-wall" flag appended, likely in ksmserver or libkworkspace. This has been available since systemd version 253. See poweroff(8) man page for additional info.
Comment 1 Nate Graham 2024-03-11 19:32:00 UTC
Hm, maybe. Currently we intentionally show these messages. The question is, can we distinguish between automatic ones vs ones deliberately set by an administrator?
Comment 2 cogebok177 2024-03-12 18:20:08 UTC
I'm personally of the opinion that an administrator is very unlikely to use the GUI power controls in plasma to begin with. 
Best-case scenario, a conscientious admin will call qdbus org.kde.shutdown in a wrapper script that prints its own wall message anyways. What's much more likely is an admin calling poweroff directly or in a script also printing its own wall message, unaffected by any KDE changes.

In either case, the systemd message would still be of little use as systemd - unlike sysv - provides no way to schedule the shutdown built into the command, instead relying on systemd timers or a script. The wall message will always appear too late to be useful in warning a user of an impending shutdown, although this is more a systemd problem.
Comment 3 Nate Graham 2024-03-13 18:03:12 UTC
Yeah, you might be right.
Comment 4 David Edmundson 2025-06-01 14:07:39 UTC
> The question is, can we distinguish between automatic ones vs ones deliberately set by an administrator?

Unfortunately we cannot
Comment 5 Kai Uwe Broulik 2025-06-01 19:07:18 UTC
We can apparently turn those off:

> The WallMessage and EnableWallMessages properties reflect the shutdown reason and wall message enablement switch which can be set with the SetWallMessage() method described above.