System beep broken (again) in Xenial Xerus

Bug #1599599 reported by Anthony
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

This is my first ever bug report, so bear with me if I make mistakes.

System bell (aka PC speaker beep) is not working upon installing Ubuntu 16.04 Xenial Xerus.

The "beep" command has been installed and works, also "echo foo | wall" works. But "echo -e '\a'" and "printf '\a'" make no sound, nor does pressing the rubout or other keys in terminal and Gedit like it usually does.

lsmod shows pcspkr is loaded

****Note****
The symptoms are exactly the same as in bug #486154
https://bugs.launchpad.net/ubuntu/+source/linux-lts-xenial/+bug/486154

Just for the record, rmmod and reloading the pcspkr module, unblacklisting it, trying in vain to turn up the volume, and all the other usual steps are no longer relevant at this point. We are way beyond that here. Something very, very elusive in this 16.04 distro is blocking the bell. I suspect something new in 16.04 runs after you login which nullifies the standard error beep. Pressing down at the end in Gedit and the terminal also used to make the beep, but something is telling it not to anymore. The PC speaker works of course, as the alternative beep command and "echo foo | wall" prove.

Interestingly, Ubuntu can and does produce the system beep in two other instances:
1) Edit the grub menu at /etc/default /grub and remove the # hash at GRUB_INIT_TUNE="480 440 1" and you will get a beep when grub loads.
2) Press Backspace without entering your password at login, and you will get the error beep.

Description: Ubuntu 16.04 LTS
Release: 16.04

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-28-generic 4.4.0-28.47
ProcVersionSignature: Ubuntu 4.4.0-28.47-generic 4.4.13
Uname: Linux 4.4.0-28-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: dv430uuyn 1784 F.... pulseaudio
 /dev/snd/controlC0: dv430uuyn 1784 F.... pulseaudio
CurrentDesktop: Unity
Date: Wed Jul 6 14:00:50 2016
HibernationDevice: RESUME=UUID=e8206eff-651f-4207-b0a8-9c5a06959711
InstallationDate: Installed on 2016-06-24 (12 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
IwConfig:
 enp2s0 no wireless extensions.

 lo no wireless extensions.
MachineType: Dell Inc. Vostro 430
ProcFB: 0 nouveaufb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-28-generic root=UUID=c3a8f971-548b-4666-b865-6bf917bef1c9 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-28-generic N/A
 linux-backports-modules-4.4.0-28-generic N/A
 linux-firmware 1.157.2
RfKill:

SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/13/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 2.4.0
dmi.board.name: 054KM3
dmi.board.vendor: Dell Inc.
dmi.board.version: A01
dmi.chassis.type: 3
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr2.4.0:bd01/13/2011:svnDellInc.:pnVostro430:pvr00:rvnDellInc.:rn054KM3:rvrA01:cvnDellInc.:ct3:cvr:
dmi.product.name: Vostro 430
dmi.product.version: 00
dmi.sys.vendor: Dell Inc.

Revision history for this message
Anthony (danthonyd) wrote :
Revision history for this message
Anthony (danthonyd) wrote :

For some reason I could only select one attachment to upload, the others happened automatically. Here is the other "at a minimum" I needed to include.

Revision history for this message
Anthony (danthonyd) wrote :

Also, I think/hope this is the version of the package:

linux-image-extra-4.4.0-28-generic:
  Installed: 4.4.0-28.47
  Candidate: 4.4.0-28.47
  Version table:
 *** 4.4.0-28.47 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Anthony (danthonyd)
description: updated
description: updated
Revision history for this message
Thomas Hood (jdthood) wrote :

Try doing "pactl upload-sample /usr/share/sounds/gnome/default/alerts/glass.ogg bell.ogg" and "xset b on" and "xset b 100".

Revision history for this message
Anthony (danthonyd) wrote :

No Thomas, that is absolutely not what we are looking for here. Aside from having to install:
gconf-editor and
dconf-editor and
gnome-control-center just to accomplish what I could have with "pactl upload-sample /usr/share/sounds/ubuntu/stereo/bell.ogg bell.ogg" these are samples that play through the sound card and out the external speakers, which is not what we need.

We want that old, I mean OLD scratchy beep that's emitted from that obscure black cylinder attached to the motherboard. It's that beep most people hate, that beep with no volume control.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.7 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7-rc6-yakkety/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Anthony (danthonyd) wrote :

Thank you Joseph, I will test v4.7-rc6 mainline build.

This is another first for me, so I need some time to learn this, plus I will set up and install Ubuntu 16.04 on a different machine to avoid risks, and test the bug on another computer. Hopefully I will have this all done within 24-48 hours.

Please provide links if you know of any step-by-step tutorials (the kind that don't leave out critical steps with the assumption that everyone already knows to do, and how to do those steps). For example, if I have to identify and remove all "out-of-tree modules" as the wiki mentions, I would like to know exactly what I am doing.

Thanks.

Revision history for this message
Anthony (danthonyd) wrote :

The problem is definitely 100% in 4.4.0-28-generic.

I installed Ubuntu 16.04 on a different computer and the beep worked properly. It initially had only 4.4.0-21-generic under /lib/modules/ then updated to 4.4.0-28 and the problem immediately started on that machine.

I'm going to assume it was this package responsible:
linux-image-extra-4.4.0-28-generic
version 4.4.0-28.47
Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP.

Note in the package changelog attached at line 14362 that reads:

  * [Config] Disable CONFIG_SND_HDA_INPUT_BEEP_MODE by default
    - LP: #582350

Anthony (danthonyd)
tags: added: kernel-bug-exists-upstream
removed: amd64 apport-bug xenial
Revision history for this message
Anthony (danthonyd) wrote :

First, Thomas, I apologize for sounding irritated above, but if you saw the volume of comments I've seen addressing the wrong (external/soundcard) speaker for this problem you would likely agree.

Joseph, I changed the tag to read 'kernel-bug-exists-upstream' as the problem persists with v4.7-rc6 mainline.

Note the output for $ modeinfo pcspkr

filename: /lib/modules/4.7.0-040700rc6-generic/kernel/drivers/input/misc/pcspkr.ko
alias: platform:pcspkr
license: GPL
description: PC Speaker beeper driver
author: Vojtech Pavlik <email address hidden>
depends:
intree: Y
vermagic: 4.7.0-040700rc6-generic SMP mod_unload modversions

Also, as my previous comment pointed out in the changelog for 4.4.0-28, I think this bug #582350 is the culprit.

tags: added: amd64 apport-bug xenial
Anthony (danthonyd)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Anthony (danthonyd) wrote :

I have rebooted several times using Advanced options for Ubuntu and switching between 4.4.0-21-generic and 4.7.0-040700rc6-generic.

Sometimes the beep actually works for both kernal modules (yes 4.4.0-21 and 4.7) and sometimes it doesn't, but usually it doesn't. In all cases it is very random and I can't isolate the cause.

I just restarted 3 times without touching anything during the boot process and letting it go straight to 4.7 generic. The first time the beep worked, even in Gedit. The 2nd and 3rd times the beep didn't work.

When I start with "upstart" option the beep always works, even with 4.4.0.28-generic as along as I get a command line. Sometimes the command line doesn't load and the system hangs. (The GUI never loads with "Upstart" option.)

Now, check out these results for:

$ sudo grep -ri "CONFIG_SND_HDA_INPUT_BEEP_MODE"

config-4.4.0-28-generic:CONFIG_SND_HDA_INPUT_BEEP_MODE=0
config-4.4.0-21-generic:CONFIG_SND_HDA_INPUT_BEEP_MODE=0
config-4.7.0-040700rc6-generic:CONFIG_SND_HDA_INPUT_BEEP_MODE=1

So it seems 4.7 mainline tried to fix this, but the problem must also be located elsewhere, likely in something getting overridden immediately after the login password is entered.

Revision history for this message
Anthony (danthonyd) wrote :

Logging in as Guest has a much higher beep success rate: 8 out of 9 boots succeeded. This also worked 4 out of 5 times on my initially reported machine with 4.4.0-28-generic.

Revision history for this message
Anthony (danthonyd) wrote :

Well the beep is back, for now. I noticed it working today and possibly was due to yesterday's updates (I'll attached a file called "updates_term_log.txt").
This could be one of those one time only scenarios, so I'll wait until after a few system restarts and report back.

Here is the output for yesterday's updates from /var/log/apt/history.log :

Start-Date: 2016-07-19 05:59:00
Commandline: aptdaemon role='role-commit-packages' sender=':1.113'
Upgrade: libunity-settings-daemon1:amd64 (15.04.1+16.04.20160209-0ubuntu2, 15.04.1+16.04.20160701-0ubuntu1), libnm-glib4:amd64 (1.2.0-0ubuntu0.16.04.2, 1.2.0-0ubuntu0.16.04.3), gstreamer1.0-plugins-ugly-amr:amd64 (1.8.1-1ubuntu0.1, 1.8.2-1ubuntu0.1), unity-schemas:amd64 (7.4.0+16.04.20160526.1-0ubuntu1, 7.4.0+16.04.20160715-0ubuntu1), update-notifier-common:amd64 (3.168, 3.168.1), binutils:amd64 (2.26.1-1ubuntu1~16.04, 2.26.1-1ubuntu1~16.04.1), unity-lens-applications:amd64 (7.1.0+16.04.20160217.2-0ubuntu1, 7.1.0+16.04.20160701-0ubuntu1), libnm-glib-vpn1:amd64 (1.2.0-0ubuntu0.16.04.2, 1.2.0-0ubuntu0.16.04.3), libnm0:amd64 (1.2.0-0ubuntu0.16.04.2, 1.2.0-0ubuntu0.16.04.3), unity:amd64 (7.4.0+16.04.20160526.1-0ubuntu1, 7.4.0+16.04.20160715-0ubuntu1), network-manager:amd64 (1.2.0-0ubuntu0.16.04.2, 1.2.0-0ubuntu0.16.04.3), thunderbird-gnome-support:amd64 (1:38.8.0+build1-0ubuntu0.16.04.1, 1:45.2.0+build1-0ubuntu0.16.04.1), libnm-util2:amd64 (1.2.0-0ubuntu0.16.04.2, 1.2.0-0ubuntu0.16.04.3), metacity-common:amd64 (1:3.18.4-0ubuntu0.3, 1:3.18.5-0ubuntu0.1), thunderbird-locale-en-us:amd64 (1:38.8.0+build1-0ubuntu0.16.04.1, 1:45.2.0+build1-0ubuntu0.16.04.1), unity-services:amd64 (7.4.0+16.04.20160526.1-0ubuntu1, 7.4.0+16.04.20160715-0ubuntu1), libunity-core-6.0-9:amd64 (7.4.0+16.04.20160526.1-0ubuntu1, 7.4.0+16.04.20160715-0ubuntu1), libmetacity-private3a:amd64 (1:3.18.4-0ubuntu0.3, 1:3.18.5-0ubuntu0.1), thunderbird:amd64 (1:38.8.0+build1-0ubuntu0.16.04.1, 1:45.2.0+build1-0ubuntu0.16.04.1), unity-settings-daemon:amd64 (15.04.1+16.04.20160209-0ubuntu2, 15.04.1+16.04.20160701-0ubuntu1), thunderbird-locale-en:amd64 (1:38.8.0+build1-0ubuntu0.16.04.1, 1:45.2.0+build1-0ubuntu0.16.04.1), update-notifier:amd64 (3.168, 3.168.1), base-files:amd64 (9.4ubuntu4.1, 9.4ubuntu4.2), gstreamer1.0-plugins-ugly:amd64 (1.8.1-1ubuntu0.1, 1.8.2-1ubuntu0.1)
End-Date: 2016-07-19 06:00:22

Revision history for this message
Anthony (danthonyd) wrote :

System beep is gone again. As for my post above (#13) it worked for that one time only, but stopped upon the next system reset.

Revision history for this message
Silviu Podariu (vuvulescu) wrote :

I would also like to see this 'echo -e "-a"' fixed somehow as i also used it as bell notification for remote ssh-jobs completing their tasks... Thanks Anthony for asking the question!

Revision history for this message
Anthony (danthonyd) wrote :

Hi Silviu, I'm glad you were able to sift through everything I added here (willingly or not). I don't find bug reporting, the way we're supposed to do it at least, to be a very straight-forward task....

Anyway, I found if you log in to one of the virtual consoles, Ctrl+Alt+F1 to Ctrl+Alt+F2, allows the bell to work, always. This seemingly narrows the troubleshooting to X11 GUI.

Revision history for this message
Anthony (danthonyd) wrote :

Solved with latest updates.

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
bam (mybigspam) wrote :

Hi Anthony,
have you "echo -e '\a'" working in Ubuntu X11 Terminal?
The only way I could get beeper sound in X11 is 'beep' command.
But in virtual consoles, all the methods work.
So maybe it's too early to set this bug as Fixed?

Anthony (danthonyd)
Changed in linux (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Anthony (danthonyd) wrote :

Thanks bam,
You're right, it's not fixed. Whenever I restart Ubuntu it's a gamble as sometimes the system beep works and sometimes it doesn't.
The 'beep' command always works, and when using virtual consoles (Ctrl+Alt+F1 to F6) the system beep always works, though the pitch seems higher.

I changed the status to Confirmed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.