How to disable (mute) system beeps on Fedora CoreOS Live

I booted up an HP Elitebook 850 G6 laptop with a USB stick containing

fedora-coreos-32.20200625.1.0-live.x86_64.iso

and noticed a loud system beep that sounded whenever I pressed backspace at the beginning
of a line in the terminal.

After running

[core@localhost ~]$ sudo rmmod snd_pcsp

the computer was silent, no system beeps could be heard.

Maybe there are other better ways of how to do avoid the system beep?

Anyway, the command

sudo rmmod snd_pcsp

could be useful for others that are disturbed by the system beep.

Best regards,
Erik Sjölund

I typically don’t run the Live ISO for very long (just long enough to do an install), but on my Fedora desktop system I do typically sudo rmmod pcspkr. Of course you can create a config file (via Ignition) that will make that happen permanently. Are you using an Ignition config when booting the Live ISO or not?

Embedding an ignition file into the iso will be my next experiment. I haven’t tried it yet but I plan to do this:

cat file.ign | coreos-installer iso embed -o /tmp/new.iso /tmp/fedora-coreos-32.20200625.1.0-live.x86_64.iso
sudo su -c "cat /tmp/new.iso > /dev/sda"

Out of curiosity, would it be possible to instead perform the modification directly on the USB stick device, like this?

cat file.ign | sudo coreos-installer iso embed /dev/sda

I think so, but I haven’t tested that path myself.

I rebooted the computer and booted up into fedora-coreos-32.20200625.1.0-live.x86_64.iso again
and typed sudo rmmod pcspkr

[core@localhost ~]$ sudo rmmod pcspkr
rmmod: ERROR: Module pcspkr is not currently loaded
[core@localhost ~]$

That didn’t work. Then I tried

[core@localhost ~]$ sudo rmmod snd_pcsp
[core@localhost ~]$

That worked just fine as before.

On another computer running Fedora 32, I created an Ignition file (to blacklist the kernel module snd_pcsp) and embedded the file into the live image

[erik@laptop fcos]$ emacs mute.yaml
[erik@laptop fcos]$ cat mute.yaml 
variant: fcos
version: 1.1.0
storage:
  files:
- path: /etc/modprobe.d/blacklist-snd_spcp.conf
  mode: 0644
  contents:
    inline: |
      blacklist snd_pcsp
[erik@laptop fcos]$ fcct mute.yaml > mute.ign
[erik@laptop fcos]$ cat mute.ign 
{"ignition":{"version":"3.1.0"},"storage":{"files":[{"path":"/etc/modprobe.d/blacklist-snd_spcp.conf","contents":{"source":"data:,blacklist%20snd_pcsp%0A"},"mode":420}]}}
[erik@laptop fcos]$ cat mute.ign | sudo coreos-installer iso embed /dev/sda
[erik@laptop fcos]$ 

The command coreos-installer iso embed /dev/sda finished almost instantly.

I rebooted the laptop and could see the text

Ignition: user provided config was applied

Unfortunately there was no autologin. Instead a login prompt was shown localhost login:

Yeah. That’s expected. We assume that if you provided an ignition config you’re not just “playing around in the Live environment” and you would have provided credential/user information in the ignition config. Can you put your SSH key or a password in the embedded ignition config? Configuring Users :: Fedora Docs

Thanks, it worked! I was able to log in. Blacklisting also worked. The kernel module snd_spcp was not loaded.

[erik@laptop fcos]$ cat mute.yaml
variant: fcos
version: 1.1.0
passwd:
  users:
- name: core
  password_hash: "$y$j9T$MVfkDQ7J0ZUssQ0CRjaYT1$ZvVfqcO5g6ouqs6.2353TkKeKTSUVDyDzUYH/fFcEQB"
storage:
  files:
- path: /etc/modprobe.d/blacklist-snd_spcp.conf
  mode: 0644
  contents:
    inline: |
      blacklist snd_pcsp
[erik@laptop fcos]$

I created a Github issue
https://github.com/coreos/fedora-coreos-tracker/issues/569
hoping the system beep could be disabled (or muted) by default.