Bug 2129387 - Systemd causes PC Speaker to emit a loud beep during reboot/poweroff, after suspend&resume
Summary: Systemd causes PC Speaker to emit a loud beep during reboot/poweroff, after s...
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 37
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
Whiteboard: AcceptedFreezeException
Depends On:
Blocks: F37FinalFreezeException
TreeView+ depends on / blocked
Reported: 2022-09-23 14:43 UTC by Kamil Páral
Modified: 2022-11-10 10:22 UTC (History)
15 users (show)

Fixed In Version: systemd-251.6-609.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-10-17 22:55:06 UTC
Type: Bug
bcotton: fedora_prioritized_bug+

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github systemd systemd issues 23520 0 None closed systemd-login disturbs all ptys on suspend 2022-10-03 06:55:39 UTC

Description Kamil Páral 2022-09-23 14:43:17 UTC
Description of problem:
After upgrading to Fedora 37 (systemd 251), but laptop started producing an extremely loud and annoying beep when rebooting or shutting down. It's a PC Speaker sound, and as such, it ignores any configuration of the regular speakers, including volume level, mute status, and even headphones plugged in! On my laptop, it's extremely loud and unpleasant, and if it happens during night when my family is sleeping, I'm beginning to see red.

On desktop [1] and test [2] lists, I got confirmation from other people that they experience it too.

[1] https://lists.fedoraproject.org/archives/list/desktop@lists.fedoraproject.org/thread/73QO72BIBAWX7YT7NAJ2GZQAT4UCFIER/
[2] https://lists.fedoraproject.org/archives/list/test@lists.fedoraproject.org/thread/73QO72BIBAWX7YT7NAJ2GZQAT4UCFIER/

There are more complaints on the internet:

which seem to point to this issue as a root cause or related to it:

I have to confirm that together with that beep, I also started to see messages like "System is going down NOW" in a VT which briefly flash on the screen during reboot (sometimes too fast to notice). So it seems plausible that these messages cause the beep to occur. (These messages also seem to sometimes break plymouth, the graphical screen during reboot, but that's not the point of this bug report).

It is interesting that the beep is emitted only sometimes. I haven't found a pattern yet. It seems like a race condition of sort. Other people claimed it happens always for them.

Please, abusing the PC speaker needs to stop, at least on graphical desktops! There is zero benefit in flashing the message on the screen for a fraction of a second, and the beep will make users extremely angry. If I were in the same room as my family sleeping when the beep occurred, and were I just a regular user, this would probably be the last day of Linux on my laptop. The beep is that loud and uncomfortable, especially at night.

Version-Release number of selected component (if applicable):
Thinkpad P1 gen3

How reproducible:
randomly, in my case (but others claim it beeps every time)

Steps to Reproduce:
1. ask the system to reboot or power off
2. hear a loud PC speaker beep (in my case, sometimes, possibly a race condition)

Expected results:
PC Speaker shouldn't be used on end-user graphical desktops. I have no idea about servers.

Comment 1 Kamil Páral 2022-09-23 14:47:04 UTC
I don't expect people to want to block Fedora 37 on this problem, but I'll at least propose it for a freeze exception, in case the freeze starts before this is resolved. I also nominate this as a Prioritized Bug, because I think many of our users will be extremely annoyed if we release in this state.

The solution likely includes a revert in systemd to no longer send the VT announce messages, or possibly blacklisting the pcspkr kernel module (at least on desktops), as an alternative.

Comment 2 Adam Williamson 2022-09-26 15:25:18 UTC
Funny thing is, I seem to remember this always used to happen *before* systemd. So it might be that this is sort of restoring an old behaviour rather than a new one. I agree it's kinda annoying and probably silly, though. For desktops at least.

Comment 3 Adam Williamson 2022-09-26 15:26:36 UTC
+4 in https://pagure.io/fedora-qa/blocker-review/issue/921 , marking accepted.

Comment 4 Zbigniew Jędrzejewski-Szmek 2022-10-01 18:25:46 UTC
Hmm, so the patches from https://github.com/systemd/systemd/issues/23520 are already included in v251.2,
and Kamil reported the issue with systemd-251.4-53.fc37.x86_64. So the that fix is clearly not enough.

In https://github.com/systemd/systemd/issues/23520#issuecomment-1141290377 the following was recommended:

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

Can somebody who can reproduce the issue test if this fixes it? If yes, then most likely we need
to disable those messages altogether by default.

Comment 5 Kamil Páral 2022-10-03 07:10:26 UTC
I finally found the reproducer! The beep doesn't occur when I cleanly boot my system and restart it. But when I SUSPEND AND RESUME it, it then beeps during reboot/poweroff! So whatever fix was applied earlier, it doesn't persist through suspend&resume.

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

This indeed silences the beep, and it persists through suspend&resume.

Comment 6 Ben Cotton 2022-10-05 14:41:09 UTC
In today's Prioritized Bugs meeting, we accepted this as a Prioritized Bug.

Comment 7 Kamil Páral 2022-10-13 09:22:48 UTC
@zbyszek.pl Can we please get a patch in F37 quickly, now that it's fixed in upstream? It would be great to have this fixed in F37 Final. Thanks!

Comment 8 Fedora Update System 2022-10-13 21:54:50 UTC
FEDORA-2022-bb55f82158 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-bb55f82158

Comment 9 Kamil Páral 2022-10-14 08:55:42 UTC
(In reply to Fedora Update System from comment #8)
> FEDORA-2022-bb55f82158 has been submitted as an update to Fedora 37.
> https://bodhi.fedoraproject.org/updates/FEDORA-2022-bb55f82158

Beeping is gone! :-)

Comment 10 Zbigniew Jędrzejewski-Szmek 2022-10-14 09:34:34 UTC
Beep! I mean thanks for checking.

Comment 11 Zbigniew Jędrzejewski-Szmek 2022-10-17 17:06:30 UTC
So… the update has been "pending→stable" for the last three days. Do I need to do something to push it out?

Comment 12 Fedora Update System 2022-10-17 22:55:06 UTC
FEDORA-2022-bb55f82158 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Kamil Páral 2022-10-18 07:57:40 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #11)
> So… the update has been "pending→stable" for the last three days. Do I need
> to do something to push it out?

To explain: This was because we're in a Final freeze, and during freeze, QA takes care of pushing things stable if they have an approved freeze exception. We wait a while to confirm that it's working well and also consider the risk of breaking something important. So everything was working as intended.

Note You need to log in before you can comment on or make changes to this bug.