Mysterious, unstoppable alert sounds

I’m getting alert sounds in urxvt that I can’t seem to turn off.

here’s what I’ve tried:

  • xset -b
  • xset b off
  • having set bell-style none in /etc/inputrc
  • turning on visual bell in urxvt (this actually works, but hurts my eyes)

what are my options here?

The wild thing is… I believe I turned off the pc speaker bell at some point… now the bell is an audio file! I never set that up (intentionally)! it’s a drip sound. I can’t find anything about alert sounds or bells in the nixos settings, and I have no idea what piece of software is enabling it.

Any ideas? <3 <3 <3

ps. another option would be to tone down the visual bell. can I choose the color of it?!

1 Like

Has anyone resolved this issue? I’ve tried adding gtk-error-bell=0 to all my gtk configs like this stack exchange post suggests here, but nevertheless it persists. I am going insane please help me my family is dying.

If you use Pipewire, perhaps try pipewire: 0.3.63 -> 0.3.63 by r-ryantm · Pull Request #207895 · NixOS/nixpkgs · GitHub

2 Likes

Have you been able to resolve this? I’m having the same issue and now it has spread to firefox ‘find in page’ tool

Did you try the config linked in the previous comment?

No because i had a moment and realized it happened only after i open vim, so i set vim_configurable.costumize { vimrcConfig.customRC = "set belloff=all ..." ...} and it stopped happening

setting

/etc/pipewire/pipewire.conf.d/99-custom.conf
# the quotes are not required
{
   "context.properties": {
       "module.x11.bell": false 
   }
}

and restarting pipewire (systemctl --user restart pipewire.service) to test works
as suggested in the GitHub comment but is there I way I can get this into my pipewire block in my configuration.nix?

In unstable there is services.pipewire.extraConfig.pipewire

1 Like

ah, of course! Thanks

Awesome. Until then:

{ pkgs, ... }:
let json = pkgs.formats.json { };
in
{
  environment.etc = {
    "pipewire/pipewire.conf.d/99-silent-bell.conf".source =
      json.generate "99-silent-bell.conf" {
        "context.properties" = {
          "module.x11.bell" = false;
        };
      };
  };
}

The bell is still going nowhere for me, I can still hear it when I open the system logout menu or when I search a non-existent text in Firefox.

I tried putting this in my services.pipewire section in /etc/nixos/configuration.nix:

    # Disable the annoying system bell
    # Every item in this attrset becomes a separate drop-in file in /etc/pipewire/pipewire.conf.d
    extraConfig.pipewire = {
      "99-disable-bell" = {
        context.properties = { module.x11.bell = false; };
      };
    };

It generates the file /etc/pipewire/pipewire.conf.d/99-disable-bell.conf with contents

{
  "context": {
    "properties": {
      "module": {
        "x11": {
          "bell": false
        }
      }
    }
  }
}

The bell is still there after a reboot.

I also tried endgame’s solution of generating pipewire/pipewire.conf.d/99-silent-bell.conf directly, but that’s no longer allowed in NixOS 24.05.

EDIT: Oh and xset b off also doesn’t work.

You need to put quotes around the properties you don’t want to nest in the file, like so

    extraConfig.pipewire = {
     "99-disable-bell" = {
       "context.properties"= {
            "module.x11.bell" = false;
       };
     };
    };
  };

That creates a file that looks like

  "context.properties": {
    "module.x11.bell": false
  }
}

After doing that and running systemctl --user restart pipewire.service , my system is back to sanity

Thanks, that did the trick!