Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
get rid of broadcast to all terminals when suspending?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
jmbreuer
n00b
n00b


Joined: 07 Sep 2011
Posts: 18

PostPosted: Tue Aug 30, 2022 6:14 pm    Post subject: get rid of broadcast to all terminals when suspending? Reply with quote

Since some recent updates, suspending (usually to RAM) my system from KDE/Plasma will print a wall message to any and all shells/terminals/ssh logins/... on the machine, like this:

Code:
Broadcast message from user@host (Fri 2022-08-26 12:30:13 CEST):

The system is going down for suspend NOW!


While I appreciate that this may be a useful thing to have in some scenarios, for me it's mostly an annoyance - top/watch/... like stuff in terminals gets unnecessarily corrupted, and the message contains a bell character so the system will go into suspend while at the same time trying to play the bell sample, which causes it to be distorted/interrupted and unnecessarily startling. And/or cause the bell alert to be played on other machines that happen to have a shell open on mine.

How/where does this message originate, and how/where do I configure what, when and where it's sent?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Tue Aug 30, 2022 6:18 pm    Post subject: Reply with quote

I think coming from
Code:

sys-auth/elogind

Maybe try
Code:

busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager EnableWallMessages

and if true run

sudo busctl set-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager EnableWallMessages b false

from
https://bbs.archlinux.org/viewtopic.php?id=276700
A better approach is to set
Code:

BroadcastSuspendInterrupts=no


in
Code:

/etc/elogind/logind.conf

see
Code:

man loginctl

_________________
:)
Back to top
View user's profile Send private message
jmbreuer
n00b
n00b


Joined: 07 Sep 2011
Posts: 18

PostPosted: Thu Sep 01, 2022 7:58 am    Post subject: Reply with quote

Thank you very much, alamahant!

This got me in the right direction for sure.

My system's running sys-apps/systemd, not sys-auth/elogind. Currently, in systemd it's not a configurable option (surprise, surprise...), but apparently it's been patched out in newer versions again:

https://github.com/systemd/systemd/issues/23520

The busctl approach works well though (needs to be run as root). I'll see if I can wrap that command up as a systemd unit that will run "late enough" to be effective.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum