# Minor issue with 2.6.28-r1 and r2

## EasterParade

Hi all,

Up to 4 weeks ago I used gentoo-sources 2.6.27-r7. Since 2.6.28-r1 there is a minor thing I'm missing: the system beep on the console. New 2.6.28-r2 didn't bring it back yet. System beep is not vital but I got used to it while working on the console.

I know it is not important and I like the 2.6.28. 

System is Asus P5N32-E Sli + Core2Duo with intel-hda audio. Sound works properly, no complaint there. On my other system, which is a P5W64WS Professionel + Core2Duo + Creative Audigy 2 ZS modules for emu10k1 load correctly but there's no sound at all ( alsamixer is unmuted ).

Is there any known problem with 2.6.28 ff. kernel and sound? If so does anyone know how to solve this?

Thanks for any input!

----------

## mikegpitt

Check your kernel config for CONFIG_INPUT_PCSPKR to make sure you are compiling it into the kernel, or as a module.

Also take a look at /etc/modprobe.d/blacklist.  There is usually a line in there commented out that blacklists pcspkr from loading.

----------

## EasterParade

Thanks. I must have looked the other way   :Smile:  . CONFIG_INPUT_PCSPKR wasn't set. I've set it as a module. But despite editing /etc/modprobe.d/backlist, pcspkr doesn't load.  Lsmod after boot shows it:

```
lsmod

Module                  Size  Used by

coretemp               10752  0

it87                   28952  0

w83791d                27612  0

hwmon_vid               6720  2 it87,w83791d

snd_pcm_oss            41728  0

snd_mixer_oss          18496  1 snd_pcm_oss

snd_seq_dummy           7108  0

snd_seq_oss            32896  0

snd_seq_midi_event     10688  1 snd_seq_oss

snd_seq                52384  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_seq_device         10644  3 snd_seq_dummy,snd_seq_oss,snd_seq

snd_hda_intel         494896  0

snd_pcm                74952  2 snd_pcm_oss,snd_hda_intel

snd_timer              23760  2 snd_seq,snd_pcm

i2c_nforce2            11072  0

snd_page_alloc         12688  2 snd_hda_intel,snd_pcm

snd_hwdep              11720  1 snd_hda_intel

snd                    58888  9 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_hda_intel,snd_pcm,snd_timer,snd_hwdep

soundcore              10720  1 snd

nvidia               8112120  36

```

Even modprobing it doesn't bring the system beep back. KDE cannot be the culprit; I've looked into the contolcenter as well.

Alsa isn't affected; its modules load and everything works. Hm...

May be I should compile pcspkr into the kernel?

----------

## mikegpitt

You minds well try and compile it in if the module is giving you problems.

Two questions:

1) When you said you edited the blacklist file, did you leave the 'blacklist pcspkr' line commented out?

2) Check your volume settings in alsamixer.  On some machines there is a level for the pcspkr.

----------

## chaonis

Having a DELL GX620. I am using kernel 2.6.25-gentoo-r8 with pcspkr built as module. Here is the issue:

In virtual terminal, the beep works (CTRL-G, echo -e "\a", beep, etc) with pcspkr loaded, user or root;

In windows (xfce4) terminal, the beep works only as root by calling program "beep" with pcspkr loaded. User mode calling "beep" does no work and gives "ioctl: Operation not permitted" message. Also neither CTRL-G nor echo -e "\a" work as root/user in windows terminal. I am using xfce4 terminal and the varialble, MiscBell=TRUE is set.

any idea? 

Other notes: when I use x11vnc, the vnc client beeps but not on the GX620; Also tried to follow this site but no dice: http://www.gentoo-wiki.info/HOWTO_Virtual_PC_Speaker

----------

## EasterParade

Sorry for not answering earlier; I was busy.

I can tell now that it has to be a simple permission problem. User root has the system beep with pcspkr built as module; user user is not allowed to beep   :Smile: 

I just have to give the permission back to user user as it has been before kernel 2.6.28* although I just don't know how to because I don't know what causes this.

May be chaonis problem goes into the same direction, I mean, about permissions...?

Thanks for the help, all.

----------

## chaonis

OK for the "ioctl: Operation not permitted" beep not working for unprivileged users from X terminal, I fixed it with:

```
# sudo chgrp audio /usr/bin/beep

# sudo chmod 4710 /usr/bin/beep
```

Read man beep for more info.

Now running /usr/bin/beep as regular user, the local PC speaker beeps. But doing echo -e '\a', it still does not. It is annoying for me since I run a lot of script via ssh session and /usr/bin/beep from remote session does not beep local machine. 

My workaround is use the program x11-apps/xkbevd with app-misc/beep:

```
# sudo emerge app-misc/beep x11-apps/xkbevd -av

# sudo chgrp audio /usr/bin/beep

# sudo chmod 4710 /usr/bin/beep

# mkdir -p ~/.xkb/

# echo -e "soundDirectory= \"\"\nsoundCmd      = \"/usr/bin/beep\"\nBell()          \"-f 1000\"\nBell(ImAlive)   \"-f 2000\"" > ~/.xkb/xkbevd.cf 

# sudo modprobe pcspkr

# xkbevd -bg
```

This is even better since I can use the options such as frequency, duration, etc., given by /usr/bin/beep.

----------

## EasterParade

With new kernel gentoo-sources-2.6.28-r3 beep came back but only on terminal. After starx, on KDE, the only root gets beep ( on halt, on no other occasion ) => KDE related?

----------

