Page 1 of 1

Beep sound shut down

Posted: Sat Mar 16, 2019 9:01 pm
by Ashiya
Hello,

I have some problems when I shut down my laptop
My laptop make a beep sound its like I force a shutdown.
It's same sound while I press power on/off for a long time,
It's seems that my laptop shut down in a brutal way.

Debian, Ubuntu don't have this problems...

Re: Beep sound shut down

Posted: Wed Mar 20, 2019 9:56 am
by manyroads
You probably need to blacklist your PC Speaker. You can try the help here:

https://blog.sleeplessbeastie.eu/2012/1 ... stem-bell/
https://wiki.archlinux.org/index.php/PC_speaker

Re: Beep sound shut down

Posted: Wed Mar 20, 2019 10:03 am
by Eadwine Rose
Disable system beep on logout:
go to /etc/modprobe.d/pc-speaker.conf

See if in there it has:

blacklist snd-pcsp
blacklist pcspkr

Re: Beep sound shut down  [Solved]

Posted: Wed Mar 20, 2019 12:16 pm
by male
check the file
/etc/default/grub
whether the line is commented out

Code: Select all

GRUB_INIT_TUNE="480 440 1"

Code: Select all

#GRUB_INIT_TUNE="480 440 1"

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 8:01 pm
by KBD
Since this thread is not too old I'm giving it a bump as I have the exact same problem. I checked the suggestions above and the file has sound blacklisted as Eadwine suggests, and hashed out as male mentions, but I still get a loud beep when I click on logout.
Any help appreciated.

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 8:06 pm
by Jerry3904
What kernel are you using?

Code: Select all

uname -r
Quick System Info would probably help as well.

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 8:12 pm
by KBD
Jerry3904 wrote: Mon Apr 22, 2019 8:06 pm What kernel are you using?

Code: Select all

uname -r
Quick System Info would probably help as well.
4.19.0-1-amd64

Code: Select all

System:    Host: mx Kernel: 4.19.0-1-amd64 x86_64 bits: 64 compiler: gcc v: 6.3.0 
           Desktop: Xfce 4.12.3 Distro: MX-18.2_x64 Continuum Apr 7  2019 
           base: Debian GNU/Linux 9 (stretch) 
Machine:   Type: Laptop System: Hewlett-Packard product: HP EliteBook 2560p v: A0001D02 
           serial: <filter> 
           Mobo: Hewlett-Packard model: 162B v: KBC Version 04.1E serial: <filter> 
           BIOS: Hewlett-Packard v: 68SSU Ver. F.02 date: 07/26/2011 
Battery:   ID-1: BAT0 charge: 35.6 Wh condition: 56.5/56.5 Wh (100%) 
           model: Hewlett-Packard Primary status: Charging 
CPU:       Topology: Dual Core model: Intel Core i5-2540M bits: 64 type: MT MCP 
           arch: Sandy Bridge rev: 7 L2 cache: 3072 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 20753 
           Speed: 823 MHz min/max: 800/3300 MHz Core speeds (MHz): 1: 798 2: 798 3: 798 4: 800 
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics 
           vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.19.2 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel Sandybridge Mobile v: 3.3 Mesa 18.2.6 
           direct render: Yes 
Audio:     Device-1: Intel 6 Series/C200 Series Family High Definition Audio 
           vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           Sound Server: ALSA v: k4.19.0-1-amd64 
Network:   Device-1: Intel 82579LM Gigabit Network vendor: Hewlett-Packard driver: e1000e 
           v: 3.2.6-k port: 4060 bus ID: 00:19.0 
           IF: eth0 state: down mac: <filter> 
           Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi v: kernel 
           port: 4040 bus ID: 24:00.0 
           IF: wlan0 state: up mac: <filter> 
Drives:    Local Storage: total: 111.79 GiB used: 8.90 GiB (8.0%) 
           ID-1: /dev/sda vendor: Kingston model: SA400S37120G size: 111.79 GiB 
Partition: ID-1: / size: 107.53 GiB used: 7.86 GiB (7.3%) fs: ext4 dev: /dev/sda1 
           ID-2: swap-1 size: 2.00 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 49.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 292 Uptime: 1h 38m Memory: 7.70 GiB used: 1.04 GiB (13.5%) Init: SysVinit 
           runlevel: 5 Compilers: gcc: 6.3.0 Shell: bash v: 4.4.12 inxi: 3.0.33 

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 8:28 pm
by KBD
If I remove 'prompt at logout' the beep disappears, but I don't really want it to always logout, sometimes I want the shutdown option.
Edit: tried doing this and just using an action button set to shutdown and it still beeps :(

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 8:53 pm
by Jerry3904
Good sleuthing! Look at websearch result on "xfce prompt at logout beep" -- you're not the first!

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 9:01 pm
by KBD
Jerry3904 wrote: Mon Apr 22, 2019 8:53 pm Good sleuthing! Look at websearch result on "xfce prompt at logout beep" -- you're not the first!
I tried that 'xset b off' and it had no effect. I can hold the power button and it shuts off without a beep. I found a startup setting for 'beep on startup' and disabled that to no effect. I think I had this problem awhile back on this computer and found a solution, but my searches are bringing me no joy so far :(

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 9:30 pm
by JayM
At what point during shutdown does the beep occur?

Edit: a quick bit of research suggests that editing /etc/inputrc as root and uncommenting the line

Code: Select all

# set bell-style none
and rebooting will stop all beeping from the PC speaker on both logout and shutdown/reboot. It won't affect beeps that come from the sound card/internal stereo speakers though. That would have to be taken care of in your audio settings.

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 9:44 pm
by KBD
JayM wrote: Mon Apr 22, 2019 9:30 pm At what point during shutdown does the beep occur?
Just as I click on shutdown.

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 9:46 pm
by JayM
You were too fast for me. :) See my edit above.

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 10:01 pm
by KBD
JayM wrote: Mon Apr 22, 2019 9:30 pm At what point during shutdown does the beep occur?

Edit: a quick bit of research suggests that editing /etc/inputrc as root and uncommenting the line

Code: Select all

# set bell-style none
and rebooting will stop all beeping from the PC speaker on both logout and shutdown/reboot. It won't affect beeps that come from the sound card/internal stereo speakers though. That would have to be taken care of in your audio settings.
Thanks Jay. That was a good try but no joy.
I had recently upgraded ram in this machine, so I even pulled that stick of ram out and rebooted and it still beeped, so not a hardware problem. I was previously using Mint Cinnamon 19 on this computer and it did not beep when I shutdown, but that was from a hard drive, this is an SSD, not sure that could cause the problem though. This one has me stumped.
Edit: I have also ran LMDE3 and Ubuntu 18.04 with no beeps on this machine.

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 10:20 pm
by KBD
OK. I figured it out--systemd, Why did it not beep on Mint and Ubuntu and even LMDE? systemd. As soon as I booted into systemd under advanced boot options the shutdown beep was gone. Yet again systemd worms its way into my life. I thought I ran MX on this machine in the past without issue, and I did. At the time I was booting into the systemd kernel so that my brightness settings would hold.
Anyway, stick this into memory somewhere for the next person who comes along with this issue. I would mark this as [SOLVED] but I didn't start the thread.
[SOLVED FOR ME]

Re: Beep sound shut down

Posted: Mon Apr 22, 2019 10:46 pm
by JayM
This may shed some light on the issue:
https://superuser.com/questions/636533/ ... tdown-beep
and also
https://bugs.debian.org/cgi-bin/bugrepo ... bug=614893
Supposedly sysvinit was patched in 2018 and fixed this in version 2.92 but MX has version 2.88. If neither my first suggestion nor anything anyone else comes up with fixes it you could either try applying the patch yourself and recompiling sysvinit or ask Stevo to look into it for you. See message 20 in the second URL for the actual patch.

I would suggest using systemd is a work-around rather than a solution, plus this beep is probably annoying other people like the OP too, so maybe we can get it fixed for everyone in sysvinit.

Re: Beep sound shut down

Posted: Tue Apr 23, 2019 12:13 am
by JayM
I may be beating a dead horse since you already consider this solved by switching to systemd, but I just tested with my 32-bit netbook and don't hear any beeps on clicking shutdown. That got me to thinking: maybe in your UEFI settings, possibly under advanced settings (you may need to enable an administrative password to gain access to those) your PC speaker, which is blacklisted in MX in modprobe.d, is disabled and that this may cause all system beeps to be redirected to your sound card which is not blacklisted. If that's the case try enabling the PC speaker in the UEFI setup, boot with sysvinit, do a shutdown and see (hear) what happens.

Re: Beep sound shut down

Posted: Tue Apr 23, 2019 11:18 am
by KBD
Thanks for the suggestions and looking into this Jay!
My computer uses a legacy bios rather than UEFI.
It does sound like the default init system has a bug in showing up in certain computers. Would be great if this could be patched, at least by the MX 19 release.

Re: Beep sound shut down

Posted: Tue Apr 23, 2019 3:08 pm
by newguy
JayM wrote: Mon Apr 22, 2019 10:46 pm This may shed some light on the issue:
https://superuser.com/questions/636533/ ... tdown-beep
and also
https://bugs.debian.org/cgi-bin/bugrepo ... bug=614893
Supposedly sysvinit was patched in 2018 and fixed this in version 2.92 but MX has version 2.88. If neither my first suggestion nor anything anyone else comes up with fixes it you could either try applying the patch yourself and recompiling sysvinit or ask Stevo to look into it for you. See message 20 in the second URL for the actual patch.

I would suggest using systemd is a work-around rather than a solution, plus this beep is probably annoying other people like the OP too, so maybe we can get it fixed for everyone in sysvinit.
This is true, SysV init was patched to turn off the beep back around mid-2018. If you upgrade to the latest version (either from the package in Debian's Testing branch) or from source, you won't hear the shutdown beep anymore.

Re: Beep sound shut down

Posted: Tue Apr 23, 2019 3:57 pm
by KBD
Thanks newguy!

Re: Beep sound shut down

Posted: Tue Apr 23, 2019 4:49 pm
by Stevo
Sysvinit 2.93 from Buster has been backported and is on its way to the test repo. It works fine for me so far. What I upgraded was

Code: Select all

2019-04-23  13:29:52  upgrade  sysv-rc                                    all    2.88dsf-59.9                    2.93-8~mx17+1
2019-04-23  13:29:52  upgrade  sysvinit-core                              amd64  2.88dsf-59.9                    2.93-8~mx17+1
2019-04-23  13:29:52  upgrade  initscripts                                amd64  2.88dsf-59.9                    2.93-8~mx17+1
2019-04-23  13:29:52  upgrade  bootlogd                                   amd64  2.88dsf-59.9                    2.93-8~mx17+1
2019-04-23  13:29:51  upgrade  sysvinit-utils                             amd64  2.88dsf-59.9                    2.93-8~mx17+1

Re: Beep sound shut down

Posted: Tue Apr 23, 2019 5:14 pm
by Jerry3904
Well done, thanks.

Re: Beep sound shut down

Posted: Tue Apr 23, 2019 6:32 pm
by KBD
Thanks Stevo!

Re: Beep sound shut down

Posted: Tue Apr 23, 2019 11:50 pm
by KBD
Stevo wrote: Tue Apr 23, 2019 4:49 pm Sysvinit 2.93 from Buster has been backported and is on its way to the test repo. It works fine for me so far. What I upgraded was

Code: Select all

2019-04-23  13:29:52  upgrade  sysv-rc                                    all    2.88dsf-59.9                    2.93-8~mx17+1
2019-04-23  13:29:52  upgrade  sysvinit-core                              amd64  2.88dsf-59.9                    2.93-8~mx17+1
2019-04-23  13:29:52  upgrade  initscripts                                amd64  2.88dsf-59.9                    2.93-8~mx17+1
2019-04-23  13:29:52  upgrade  bootlogd                                   amd64  2.88dsf-59.9                    2.93-8~mx17+1
2019-04-23  13:29:51  upgrade  sysvinit-utils                             amd64  2.88dsf-59.9                    2.93-8~mx17+1
Confirmed. No more beep, yay!
Thanks again Stevo!
Thanks again to you as well newguy!

Re: Beep sound shut down

Posted: Wed Apr 24, 2019 1:06 am
by JayM
Thanks, Stevo! One more wee bug that affects some users has been squashed, or will be in MX 18.3 or 19. Meanwhile we can tell users that report this issue to just install sysvinit 2.93 from the test repo and reboot.

(KBD, don't forget to mark this solved.) :smile:

Re: Beep sound shut down

Posted: Wed Apr 24, 2019 3:38 am
by penguin
KBD wrote: Mon Apr 22, 2019 9:01 pm
Jerry3904 wrote: Mon Apr 22, 2019 8:53 pm Good sleuthing! Look at websearch result on "xfce prompt at logout beep" -- you're not the first!
I tried that 'xset b off' and it had no effect. I can hold the power button and it shuts off without a beep. I found a startup setting for 'beep on startup' and disabled that to no effect. I think I had this problem awhile back on this computer and found a solution, but my searches are bringing me no joy so far :(
The right form is xset -b. Put in the startup programs (whisker, settings,session and startup. No sounds anymore. I use HP8470p. I had also a HP 2570p that gifted to my brother, so I know very well what kind of HP you have.

Re: Beep sound shut down

Posted: Wed Apr 24, 2019 11:16 am
by KBD
JayM wrote: Wed Apr 24, 2019 1:06 am
(KBD, don't forget to mark this solved.) :smile:
Jay, I would, but not the original author. OP just had the exact same issue so I joined in.

Re: Beep sound shut down

Posted: Wed Apr 24, 2019 11:20 am
by KBD
penguin wrote: Wed Apr 24, 2019 3:38 am The right form is xset -b. Put in the startup programs (whisker, settings,session and startup. No sounds anymore. I use HP8470p. I had also a HP 2570p that gifted to my brother, so I know very well what kind of HP you have.
Thanks pengiun. These are solid machines, if a bit on the heavy side.