Bug#1070346: how to activate the module "pcspkr" (PC speaker)

2024-05-06 Thread Hans Ulrich Niedermann
Hi,

JFTR, I am not a Debian developer or Debian package maintainer. I am
the upstream maintainer of the beep software.

On 2024-05-04 00:53 +, Bjarni Ingi Gislason 
wrote:

> Package: beep
> Version: 1.4.9-1.1
> Severity: normal
> 
> Dear Maintainer,
> 
>* What led up to the situation?
> 
>No sound with "beep -e $(tty)"

Probably unrelated to your question: Is there any particular reason why
you give beep a specific device and avoid the autodetection?

> -.-
> 
>   I (as root) do not get any sound from
> 
> 1) tput bel
> 
> 2) beep -e $(tty) 

What kind of hardware is this? AMD64 and Realtek ALC C887-VD... no-name
desktop PC from parts, or maybe some PC laptop, or even some Apple
Intel CPU Macbook, iMac, Mac Pro?

Do you get any PC speaker sound ever?

Modern (as in post-2005 to post-2015) desktop PCs often come with
the PC speaker header not connected, which saves a few cents in bill
of material and assembly.

> [root503]:~# beep --debug -e $(tty)
> 
> beep: Verbose: evdev driver_detect 0x563df6280700 /dev/tty2
> beep: Verbose: b-lib: opened /dev/tty2 as 3
> beep: Verbose: evdev: 3 does not implement EV_SND API
> beep: Verbose: console driver_detect 0x563df62806a0 /dev/tty2
> beep: Verbose: b-lib: opened /dev/tty2 as 4
> beep: Verbose: beep: using driver 0x563df62806a0 (name=console, fd=4,
> dev=/dev/tty2) beep: Verbose: 1 times 200 ms beeps (100 ms delay
> between, 0 ms delay after) @ 440 Hz beep: Verbose: console
> driver_begin_tone 0x563df62806a0 440 beep: Verbose: console
> driver_end_tone 0x563df62806a0 beep: Verbose: console driver_end_tone
> 0x563df62806a0 beep: Verbose: console driver_fini 0x563df62806a0

Everything looking good so far.

So the userspace until the kernel works as intended, and the problem
appears be inside the kernel or the hardware, probably in the hardware
configuration, be it the software configurable or the hardware
configurable part.

> -.-
> 
> lsmod:
> 
> pcspkr 12288  0
> 
> -.-
> 
> /etc/modprobe.d/pcspkr-beep.conf contains
> 
> alias platform:pcspkr pcspkr
> 
> -.-
> 
> [root565]:/etc/modprobe.d# modprobe --first-time pcspkr
> modprobe: ERROR: could not insert 'pcspkr': Module already in
> kernel
> 
> -.-
> 
> grep -F pcspkr /lib/modules/* :
> 
> 6.6.15-amd64/modules.dep:kernel/drivers/input/misc/pcspkr.ko.xz:
> 6.6.15-amd64/modules.order:kernel/drivers/input/misc/pcspkr.ko
> 6.6.15-amd64/modules.alias:alias platform:pcspkr pcspkr
> 6.7.12-amd64/modules.dep:kernel/drivers/input/misc/pcspkr.ko.xz:
> 6.7.12-amd64/modules.order:kernel/drivers/input/misc/pcspkr.ko
> 6.7.12-amd64/modules.alias:alias platform:pcspkr pcspkr

The kernel looks good as well.

> -.-.
> 
> From /boot:
> 
> config-6.6.15-amd64
> config-6.7.12-amd64
> grub
> initrd.img-6.6.15-amd64
> initrd.img-6.7.12-amd64
> System.map-6.6.15-amd64
> System.map-6.7.12-amd64
> vmlinuz-6.6.15-amd64
> vmlinuz-6.7.12-amd64

That... gives an idea about the kernel versions installed, but beep
should work with any of them.

> -.-
> 
> alsamixer -c 1 shows for "beep"
> 
> Card: HDA ATI SB
> Chip: Realtek ALC C887-VD
> 
> Beep [dB gain: 4.50, 4.50]

Positve dB values look a bit weird, but least it is not -65dB. Have you
tried moving that value around a bit? Sometimes, changing a value has
some side effect.

> -.-
> 
>   There is no '/proc/sys/dev/input' directory.

How did you come up with the /proc/sys/dev/input path? That path does
not exist either on my Fedora development system nor on the Debian VM
which I use for testing software on.

> -- System Information:
> Debian Release: trixie/sid
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 6.1.0-18-amd64 (SMP w/2 CPU threads; PREEMPT)

Weird. The installed kernels are 6.6.15 and 6.7.12, but you are running
6.1.0. beep should work with any kernel from the last 20 years (at
least), though, so this should not matter to this issue.

> Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591
> (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to
> /usr/bin/dash Init: sysvinit (via /sbin/init)
> 
> Versions of packages beep depends on:
> ii  libc6  2.37-19
> 
> beep recommends no packages.
> 
> beep suggests no packages.
> 
> -- no debconf information

Thanks for not sending the report in Icelandic. I would not have
understood anything :-)

Nothing stands out here as the obvious problem you need to solve to get
PC beeper sound.

I have found a thread regarding the Realtek ALC887 front panel audio at
https://bbs.archlinux.org/viewtopic.php?id=275507 which suggests some
hda-verb command line to get the front panel audio to produce sound.
Perhaps the PC speaker sound needs some additional sound chip massaging
on that chipset as well?

While I hope my remarks are helpful, I fear they are not very much.

Regards,

Uli



Bug#1070346: how to activate the module "pcspkr" (PC speaker)

2024-05-03 Thread Bjarni Ingi Gislason
Package: beep
Version: 1.4.9-1.1
Severity: normal

Dear Maintainer,

   * What led up to the situation?

   No sound with "beep -e $(tty)"

-.-

  I (as root) do not get any sound from

1) tput bel

2) beep -e $(tty) 

[root503]:~# beep --debug -e $(tty)

beep: Verbose: evdev driver_detect 0x563df6280700 /dev/tty2
beep: Verbose: b-lib: opened /dev/tty2 as 3
beep: Verbose: evdev: 3 does not implement EV_SND API
beep: Verbose: console driver_detect 0x563df62806a0 /dev/tty2
beep: Verbose: b-lib: opened /dev/tty2 as 4
beep: Verbose: beep: using driver 0x563df62806a0 (name=console, fd=4, 
dev=/dev/tty2)
beep: Verbose: 1 times 200 ms beeps (100 ms delay between, 0 ms delay after) @ 
440 Hz
beep: Verbose: console driver_begin_tone 0x563df62806a0 440
beep: Verbose: console driver_end_tone 0x563df62806a0
beep: Verbose: console driver_end_tone 0x563df62806a0
beep: Verbose: console driver_fini 0x563df62806a0

-.-

lsmod:

pcspkr 12288  0

-.-

/etc/modprobe.d/pcspkr-beep.conf contains

alias platform:pcspkr pcspkr

-.-

[root565]:/etc/modprobe.d# modprobe --first-time pcspkr
modprobe: ERROR: could not insert 'pcspkr': Module already in
kernel

-.-

grep -F pcspkr /lib/modules/* :

6.6.15-amd64/modules.dep:kernel/drivers/input/misc/pcspkr.ko.xz:
6.6.15-amd64/modules.order:kernel/drivers/input/misc/pcspkr.ko
6.6.15-amd64/modules.alias:alias platform:pcspkr pcspkr
6.7.12-amd64/modules.dep:kernel/drivers/input/misc/pcspkr.ko.xz:
6.7.12-amd64/modules.order:kernel/drivers/input/misc/pcspkr.ko
6.7.12-amd64/modules.alias:alias platform:pcspkr pcspkr

-.-.

>From /boot:

config-6.6.15-amd64
config-6.7.12-amd64
grub
initrd.img-6.6.15-amd64
initrd.img-6.7.12-amd64
System.map-6.6.15-amd64
System.map-6.7.12-amd64
vmlinuz-6.6.15-amd64
vmlinuz-6.7.12-amd64

-.-

alsamixer -c 1 shows for "beep"

Card: HDA ATI SB
Chip: Realtek ALC C887-VD

Beep [dB gain: 4.50, 4.50]

-.-

  There is no '/proc/sys/dev/input' directory.

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-18-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), 
LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages beep depends on:
ii  libc6  2.37-19

beep recommends no packages.

beep suggests no packages.

-- no debconf information