beep on shutdown - Suse

This is a discussion on beep on shutdown - Suse ; Friends, how can I get rid of this annoying beep on shutdown? What is this for? (I guess this is to wake up sleeping system administrators when an evil user tries to shutdown their system ...) If I use shutdown ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: beep on shutdown

  1. beep on shutdown

    Friends,

    how can I get rid of this annoying beep on shutdown? What is this for?

    (I guess this is to wake up sleeping system administrators when an
    evil user tries to shutdown their system ...)

    If I use shutdown as normal user by sudo it beeps. If I am root it
    does not beep.

    I tried the following:

    - Yast, edit /etc/config-files, System/Boot-Section
    set "HALT_SOUND" to "no"
    -> does nothing at all, also the other options

    - /etc/modprobe.d/blacklist
    set "blacklist pcspkr"
    -> has no influence

    - (Gnome) Sound Preferences Applet
    set "Sound an audible Bell" to [ ] (unchecked)
    set "Virtual feedback" to [x] (checked)
    -> I don't know what the first option is for. It does nothing. The
    virtual feedback works in a lot of programs but has also no
    influence on shutdown.

    I've seen the volume of the beep depends on the master volume settings
    made by the Gnome volum control applet. So I think, this beep does not
    come out of the simple pcspkr. It comes over the sound card.

    What else can I do?

    T.M.
    openSuse 11.0 64bit

  2. Re: beep on shutdown

    Torsten Mueller wrote:

    > I tried the following:
    >
    > - Yast, edit /etc/config-files, System/Boot-Section
    > set "HALT_SOUND" to "no"
    > -> does nothing at all, also the other options


    I've now visited the section in /etc/rc.d/halt where HALT_SOUND is to
    be used:

    # Make reboot noise and wait a few seconds to give harddisks the chance
    # to really flush their buffers before power goes down.
    if test -n "$REDIRECT" ; then
    case "$HALT_SOUND" in
    "yes"|"quint")
    echo -en "\033[10;393]\a\033[10;262]"
    ;;
    "octave")
    for tone in 524 491 440 393 349 328 295 262; do
    echo -en "\033[10;${tone}]\a"
    usleep 125000
    done
    echo -en "\033[10;262]"
    ;;
    "no")
    ;;
    *)
    echo -en "\033[10;440]\a"
    usleep 250000
    ;;
    esac
    else
    test "$HALT_SOUND" = "no" || echo -en "\a"
    fi

    I commented the entire section out - it did not help, it beeps on and
    on.

    Indeed I don't have neither a REDIRECT nor a HALT_SOUND variable in my
    environment at all. Is /etc/sysconfig/shutdown been read?

    And where does this beep really come from?

    T.M.

  3. Re: beep on shutdown

    On Sun, 31 Aug 2008 17:51:13 +0200, Torsten Mueller wrote:
    > And where does this beep really come from?

    As with all of these types of problems one must try and find the cause
    in the chain of events.

    So, although at first counter-intuitive, what you need to do is to
    set the HALT_SOUND to true, or preferably quint so that it is distinctive
    from the other beeping sound, test that the shutdown script does make the
    quint sound, then run the shutdown sequence and discover whether the other
    beeping sounds comes before or after the shutdown script.

    Under normal circumstances one would anticipate that it would come before,
    but until that possibility is eliminated, then one may only engage in idle
    speculation.


  4. Re: beep on shutdown

    J G Miller wrote:

    > So, although at first counter-intuitive, what you need to do is to
    > set the HALT_SOUND to true, or preferably quint so that it is
    > distinctive from the other beeping sound, test that the shutdown
    > script does make the quint sound, then run the shutdown sequence and
    > discover whether the other beeping sounds comes before or after the
    > shutdown script.


    Yes, I did this. HALT_SOUND is a variable written to
    /etc/sysconfig/shutdown. But I never saw it existing in my environment
    (as expected by /etc/rc.d/halt). So, when /etc/rc.d/halt runs it will
    do nothing at all related to this HALT_SOUND-value - it doesn't have
    one and it doesn't beep depending on this. The beep I mean is
    definitely from somewhere else.

    I could imagine that the beep I mean also depends on the HALT_SOUND
    environment variable. The question is: who is really responsible for
    reading /etc/sysconfig/shutdown and putting it's values into the
    environment? I guess this file is ignored in my case.

    T.M.

  5. Re: beep on shutdown

    On Mon, 01 Sep 2008 06:17:54 +0200, Torsten Mueller wrote:
    > HALT_SOUND is a variable written to /etc/sysconfig/shutdown.

    The shutdown script gets the value of HALT_SOUND by sourcing
    the configuration file /etc/sysconfig/shutdown

    At the top of the script /etc/rc.d/halt

    . /etc/sysconfig/shutdown

    > But I > never saw it existing in my environment
    > (as expected by /etc/rc.d/halt).


    When you say "my" environment, to which user are you referring?

    Unless the user also sources the configuration file

    /etc/sysconfig/shutdown

    the environmental variable HALT_SOUNDS will not be set in the
    environment of that user.

    > So, when /etc/rc.d/halt runs it will do
    > nothing at all related to this HALT_SOUND-value


    Obviously not if HALT_SOUND is not set in /etc/sysconfig/shutdown
    or that line is commented out in the /etc/rc.d/halt script.

    Now have you determined whether or not the beeping occurs before or after
    the /etc/rc.d/halt script runs, by some other means that that which I
    suggested?

  6. Re: beep on shutdown

    J G Miller wrote:

    > At the top of the script /etc/rc.d/halt
    >
    > . /etc/sysconfig/shutdown


    Sorry, I haven't seen this. So I can be sure now the file is read and
    the settings get script (!) variables, ok.

    > Now have you determined whether or not the beeping occurs before or
    > after the /etc/rc.d/halt script runs, by some other means that that
    > which I suggested?


    (First I detected that several other settings hindered me to hear the
    system bell - I had a visible bell in my terminal ... Now I get a nice
    hearable system bell.)

    Then I extracted the relevant lines from /etc/rc.d/halt into another
    script just to do some experiments. I get it beeping in my terminal in
    dependence of the settings in /etc/sysconfig/shutdown.

    Now I wanted to let beep the original code in /etc/rc.d/halt in octave
    mode. But I didn't get it beeping during a shutdown process at all.
    These lines were completely quiet.

    Indeed I have still a very loud beep in a higher frequency than a
    standard system beep which truely doesn't come from these lines. It
    comes from far above, immediately when I press after the
    shutdown command. This beep comes before any process is killed.

    T.M.


  7. Re: beep on shutdown

    Torsten Mueller wrote:

    > Indeed I have still a very loud beep in a higher frequency than a
    > standard system beep which truely doesn't come from these lines. It
    > comes from far above, immediately when I press after the
    > shutdown command. This beep comes before any process is killed.


    The first thing shutdown does is sending a message to all logged-in
    users using wall(1). This message includes a ^G character. If you have
    any console sessions open this will cause a bleep from the built-in
    speaker.

    --
    Huibert
    "Okay... really not something I needed to see." --Raven

+ Reply to Thread