Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
timmn1
- Level 4
- Posts: 233
- Joined: Mon Jun 08, 2009 12:34 pm
- Location: Near intersection of I-80 and I-57 in US
beep: Error: Could not open any device [Solved]
Yesterday, I found out about a program called «beep», all it does is make the computer beep. It can be found in the official repos, so, being who I am, I installed it.
When I ran it, instead of a beep, I got:
Code: Select all
beep: Error: Could not open any device
I know the computer can beep, it beeps when it finishes the POST, so why can’t «beep» make it beep?
Here is the output from inxi:
Code: Select all
System:
Host: MS-7C56 Kernel: 5.4.0-100-generic x86_64 bits: 64 compiler: gcc
v: 9.3.0 Desktop: Cinnamon 5.2.7 Distro: Linux Mint 20.3 Una
base: Ubuntu 20.04 focal
Machine:
Type: Desktop System: Micro-Star product: MS-7C56 v: 1.0
serial: <superuser required>
Mobo: Micro-Star model: MPG B550 GAMING PLUS (MS-7C56) v: 1.0
serial: <superuser required> UEFI: American Megatrends LLC. v: 1.70
date: 06/23/2021
Battery:
Device-1: hidpp_battery_0 model: Logitech Wireless Mouse
charge: 55% (should be ignored) status: Discharging
Device-2: hidpp_battery_1 model: Logitech Wireless Solar Keyboard K750
charge: 100% status: Full
CPU:
Info: quad core model: AMD Ryzen 3 3300X bits: 64 type: MT MCP arch: Zen 2
rev: 0 cache: L1: 256 KiB L2: 2 MiB L3: 16 MiB
Speed (MHz): avg: 2199 high: 2202 min/max: 2200/3800 boost: enabled
cores: 1: 2199 2: 2202 3: 2195 4: 2197 5: 2200 6: 2200 7: 2200 8: 2200
bogomips: 60800
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: NVIDIA GK104 [GeForce GTX 760 OEM]
vendor: PC Partner Limited / Sapphire driver: nvidia v: 470.103.01
bus-ID: 2b:00.0
Display: x11 server: X.Org 1.20.13 driver: loaded: nvidia
unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~60Hz
OpenGL: renderer: NVIDIA GeForce GTX 760 (192-bit)/PCIe/SSE2
v: 4.6.0 NVIDIA 470.103.01 direct render: Yes
Audio:
Device-1: NVIDIA GK104 HDMI Audio vendor: PC Partner Limited / Sapphire
driver: snd_hda_intel v: kernel bus-ID: 2b:00.1
Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel bus-ID: 2d:00.4
Sound Server-1: ALSA v: k5.4.0-100-generic running: yes
Sound Server-2: PulseAudio v: 13.99.1 running: yes
Network:
Device-1: Intel Wireless 8260 driver: iwlwifi v: kernel bus-ID: 04:00.0
IF: wlp4s0 state: up mac: f4:8c:50:64:f0:9b
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Micro-Star MSI driver: r8169 v: kernel port: f000 bus-ID: 2a:00.0
IF: enp42s0 state: down mac: d8:bb:c1:03:95:95
Bluetooth:
Device-1: Intel type: USB driver: btusb v: 0.8 bus-ID: 1-2.1:4
Report: hciconfig ID: hci0 rfk-id: 0 state: up address: F4:8C:50:64:F0:9F
bt-v: 2.1 lmp-v: 4.2
Drives:
Local Storage: total: 931.51 GiB used: 39.2 GiB (4.2%)
ID-1: /dev/sda vendor: Seagate model: ST1000DX002-2DV162 size: 931.51 GiB
Partition:
ID-1: / size: 915.4 GiB used: 39.19 GiB (4.3%) fs: ext4 dev: /dev/sda2
ID-2: /boot/efi size: 511 MiB used: 5.2 MiB (1.0%) fs: vfat
dev: /dev/sda1
Swap:
ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) file: /swapfile
Sensors:
System Temperatures: cpu: 33.0 C mobo: N/A gpu: nvidia temp: 30 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 28%
Info:
Processes: 271 Uptime: 39m Memory: 15.62 GiB used: 1.88 GiB (12.1%)
Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Packages: 2440 Shell: Bash
v: 5.0.17 inxi: 3.3.12
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Someday, maybe I’ll figure out exactly what the hell I’m doing.
-
Termy
- Level 10
- Posts: 3418
- Joined: Mon Sep 04, 2017 8:49 pm
- Location: UK
- Contact:
Re: beep: Error: Could not open any device
Post
by Termy » Sat Feb 26, 2022 2:21 pm
Ubuntu typically disables (blacklists) the kernel module required for this. The blacklisting is done in the ‘/etc/modprobe.d/blacklist.conf’ file, on the line reading:
To enable that module the next time the system boots, change that line to:
You’ll need to edit that file as ‘root’, so I recommend you open a terminal and use something like nano(1) to edit the file, unless you know of the proper GUI way. To once again blacklist that module when you’re done beeping the beep out the beeping computer, just remove that single hash.
Alternatively, you can just temporarily load the module to try it out:
Then unload the module when you’re done with it:
-
timmn1
- Level 4
- Posts: 233
- Joined: Mon Jun 08, 2009 12:34 pm
- Location: Near intersection of I-80 and I-57 in US
Re: beep: Error: Could not open any device
Post
by timmn1 » Sat Feb 26, 2022 3:47 pm
Thanks, now I can make the computer beep on command.
Someday, maybe I’ll figure out exactly what the hell I’m doing.
-
Termy
- Level 10
- Posts: 3418
- Joined: Mon Sep 04, 2017 8:49 pm
- Location: UK
- Contact:
Re: beep: Error: Could not open any device
Post
by Termy » Sat Feb 26, 2022 4:14 pm
Awesome, and you’re welcome. Have fun beeping. If this thread is solved, you may wanna edit the original post to prepend «[SOLVED] » to the title, so that people know you’re all set.
# |
|
Темы: 47 Сообщения: 11417 Участник с: 17 февраля 2013 |
В одном таймере прописан звуковой сигнал beep -f 1000 -l 500, который исправно работал несколько лет, а сегодня заметил, что он не сработал. Но заметил одну странность — открываю pavucontrol и ничего не меняю, набираю в терминале beep — работает, закрываю pavucontrol, набираю в терминале beep — один раз срабатывает, при следующих запусках тишина. Стоит запустить pavucontrol и не закрывая его далее запустить beep — все работает. Загрузился в клон системы, которая без изменений 2-3 месяца — beep работает. Разбираться не стал, вместо beep прописал имеющийся в системе звуковой сигнал, который, кстати, понравился даже больше чем beep
Просьба, у кого установлен beep, проверьте его работу — если работает, значит скорее всего я что то и менял — даже стало интересно. Ошибки не исчезают с опытом — они просто умнеют |
Vadim |
# (отредактировано 1 год, 11 месяцев назад) |
Темы: 292 Сообщения: 1960 Участник с: 20 ноября 2013 |
установил beep,пробую командой beep,и beep -f 1000 -l 500, пишет beep: Error: Could not open any device,ничего не бикает. звук в системе работает. пробовал на mxlinux,сейчас попробую на арч. сейчас в Arch
не бипает. Linux Forever! |
vasek |
# |
Темы: 47 Сообщения: 11417 Участник с: 17 февраля 2013 |
Правильно. У меня вообще никаких сообшений не выдает — просто тишина. Ошибки не исчезают с опытом — они просто умнеют |
Vadim |
# (отредактировано 1 год, 11 месяцев назад) |
Темы: 292 Сообщения: 1960 Участник с: 20 ноября 2013 |
читал сейчас про beep опасный beep провоцирует какую-то гонку статья на красном фоне,жуть.. могу еще на debian попробовать,может там бипает. Linux Forever! |
vasek |
# |
Темы: 47 Сообщения: 11417 Участник с: 17 февраля 2013 |
Была раньше такая уязвимость … beep запускался от user, затем сделали запуск только от root и около 2-х лет назад вернули запускался снова от user. Ошибки не исчезают с опытом — они просто умнеют |
Vadim |
# (отредактировано 1 год, 11 месяцев назад) |
Темы: 292 Сообщения: 1960 Участник с: 20 ноября 2013 |
сейчас в debian не работает,пишет то-же.от рута не бипает но пишет другое.
ну не бипает и не надо… Linux Forever! |
vasek |
# |
Темы: 47 Сообщения: 11417 Участник с: 17 февраля 2013 |
Писал выше — beep сейчас запускается только от user Ошибки не исчезают с опытом — они просто умнеют |
nafanja |
# |
Темы: 94 Сообщения: 9252 Участник с: 02 июня 2012 заблокирован |
в графической консоле не работает, в нормальной работает.
Псевдографический инсталлятор Arch Linux ver. 3.8.2 |
vasek |
# |
Темы: 47 Сообщения: 11417 Участник с: 17 февраля 2013 |
Продолжил эксперименты — удалил группу input, появились ошибки beep
и что интересно, даже запустив pavucontrol, получаю ту же ошибку … хотя раньше, при наличии группы input, beep пищал … Ошибки не исчезают с опытом — они просто умнеют |
Holden |
# |
Темы: 14 Сообщения: 155 Участник с: 29 октября 2020 |
vasek На Лоре обсуждали. Для проверки установил у себя. Не работает. |
One solution suggested in the doc PERMISSIONS.md is to create a system group called ‘beep’ and then use ACLs to allow members of that group write access to the device.
$ addgroup --system beep
Then create a rule for udev, e.g.
/lib/udev/rules.d/90-pcspkr-beep.rules :
# Add write access to the PC speaker for the "beep" group
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="PC Speaker", ENV{DEVNAME}!="", RUN+="/usr/bin/setfacl -m g:beep:w '$env{DEVNAME}'"
Then you should be able to add users to this group and they can write to the speaker:
$ usermod user_name -a -G beep
Of course the above will only work if you have ACLs turned on. If you can’t or won’t do that, they have a different suggestion for the udev rule:
# Give write access to the PC speaker only to the "beep" group
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="PC Speaker", ENV{DEVNAME}!="", GROUP="beep", MODE="0620"
But this will remove the speaker from being written to by the default system group ‘input’—adverse effects are probably negligible since this method is suggested in the documentation.
- This topic has 2 replies, 2 voices, and was last updated Apr 19-9:37 pm by indigo51.
Viewing 3 posts — 1 through 3 (of 3 total)
-
Posts
-
April 18, 2022 at 9:54 pm
#81664
Member
indigo51
Hello everybody!
I just installed antix21 on a lenovo T60; All sounds are working just out of the box.
Then i installed beep (beep 1.4.9) but e.gbeep -l 200 -f 1000
gives this error message:$ beep: Error: Could not open any device
beep --debug
givesbeep: Verbose: evdev driver_detect 0x46c6e0 (nil)
beep: Verbose: b-lib: could not stat(2) /dev/input/by-path/platform-pcspkr-event-spkr: No such file or directory
beep: Verbose: console driver_detect 0x46c6a0 (nil)
beep: Verbose: b-lib: could not open(2) /dev/tty0: Permission denied
beep: Verbose: b-lib: could not stat(2) /dev/vc/0: No such file or directory
beep: Error: Could not open any device$ tput bel
stays silent;
Playing a mp4-video using VLC or MPV works fine.$ sudo tput bel
stays silent as well…
Thanks for your help.
- This topic was modified 9 months, 3 weeks ago by indigo51.
- This topic was modified 9 months, 3 weeks ago by indigo51.
April 19, 2022 at 2:08 am
#81678
Moderator
caprea
Hi indigo51, the pcspkr module is blacklisted per default on antiX in /etc/modprobe.d/pc-speaker.conf
It’s also possible the beep is muted in alsamixer.
April 19, 2022 at 9:37 pm
#81794
Member
indigo51
Hello caprea,
Solved by your proposal.
Commenting # blacklist pcspkr in /etc/modprobe.d/pc-speaker.conf
and running sudo modprobe -a snd-pcsp pcspkr did the trick.beep works, tput bel works as well.
Thanks a lot!
(I’m afraid i posted this question in the wrong forum… feel free to move it to a better place…)
- This reply was modified 9 months, 3 weeks ago by indigo51.
-
Author
Posts
Viewing 3 posts — 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit «Cookie Settings» to provide a controlled consent.
lev-zagatov-sparky
- Новичок форума
- Сообщения: 2
- Записан
В общем, так.
Прочитал я вот эту статейку http://tolik-punkoff.com/2018/01/14/pc-speaker-v-linux-ili-kak-sdelat-beep-iz-konsoli-vstroennym-dinamikom-pk/
Там говорится про утилиту beep.
Я устанавливаю beep
user@sparky:~$ sudo aptitude install beep
Установилось. Теперь пишу:
user@sparky:~$ beep
beep: Error: Could not open any device
user@sparky:~$ modprobe pcspkr
bash: modprobe: команда не найдена
user@sparky:~$ aptitude search pcspkr
user@sparky:~$ aptitude search modprobe
p nvidia-modprobe — utility to load NVIDIA kernel modules and create device nodes
p nvidia-modprobe:i386 — utility to load NVIDIA kernel modules and create device nodes
И как мне установить pcspkr? Я хочу пикнуть тоже!
Пробовал
user@sparky:~$ echo -ne ’07’
Тишина. Жду 5 минут. Тишина…
Внизу спойлер, в нём характеристики моей машинки, вывод inxi -Fxz
Открыть содержимое (спойлер)
System: Kernel: 5.6.0-1-amd64 x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Xfce 4.14.2 Distro: SparkyLinux 6 (Po-Tolo)
base: Debian bullseye/sid
Machine: Type: Laptop System: SAMSUNG product: R510/P510 v: N/A serial: <filter>
Mobo: SAMSUNG model: R510/P510 serial: <filter> BIOS: Phoenix v: 06LI.MP00.20080919.SCY date: 09/19/2008
Battery: ID-1: BAT1 charge: 13.3 Wh condition: 13.3/44.4 Wh (30%) model: SAMSUNG Electronics status: Full
CPU: Topology: Dual Core model: Intel Core2 Duo T5850 bits: 64 type: MCP arch: Core Merom rev: D L2 cache: 2048 KiB
flags: lm nx pae sse sse2 sse3 ssse3 bogomips: 8645
Speed: 1289 MHz min/max: 1000/2166 MHz Core speeds (MHz): 1: 1700 2: 1616
Graphics: Device-1: NVIDIA G98M [GeForce 9200M GS] vendor: Samsung Co driver: nouveau v: kernel bus ID: 01:00.0
Device-2: Z-Star Micro Vega USB 2.0 Camera type: USB driver: uvcvideo bus ID: 4-3:2
Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa resolution: 1280×800~60Hz
OpenGL: renderer: NV98 v: 3.3 Mesa 19.3.3 direct render: Yes
Audio: Device-1: Intel 82801I HD Audio vendor: Samsung Co driver: snd_hda_intel v: kernel bus ID: 00:1b.0
Sound Server: ALSA v: k5.6.0-1-amd64
Network: Device-1: Qualcomm Atheros AR242x / AR542x Wireless Network Adapter vendor: Askey driver: ath5k v: kernel
port: 2000 bus ID: 02:00.0
IF: wlan0 state: up mac: <filter>
Device-2: Marvell 88E8055 PCI-E Gigabit Ethernet vendor: Samsung Co driver: sky2 v: 1.30 port: 5000 bus ID: 06:00.0
IF: eth0 state: down mac: <filter>
Drives: Local Storage: total: 186.31 GiB used: 17.17 GiB (9.2%)
ID-1: /dev/sda vendor: Fujitsu model: MHZ2200BH G2 size: 186.31 GiB
Partition: ID-1: / size: 182.38 GiB used: 17.17 GiB (9.4%) fs: ext4 dev: /dev/sda1
Swap: Alert: No Swap data was found.
Sensors: System Temperatures: cpu: 58.0 C mobo: N/A gpu: nouveau temp: 57 C
Fan Speeds (RPM): N/A
Info: Processes: 189 Uptime: 2h 34m Memory: 1.94 GiB used: 1.43 GiB (73.5%) Init: systemd runlevel: 5 Compilers:
gcc: 9.3.0 Shell: bash v: 5.0.16 inxi: 3.1.00
Time: 11:28:22:493 19.05.2020
[свернуть]
Debian Bug report logs —
#922667
beep: Error: could not open any device
Reported by: jim_p <pitsiorisj@gmail.com>
Date: Tue, 19 Feb 2019 05:51:02 UTC
Severity: normal
Found in versions beep/1.4.3-1, beep/1.4.3-2
Done: Rhonda D’Vine <rhonda@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, pitsiorisj@gmail.com, Rhonda D'Vine <rhonda@debian.org>
:
Bug#922667
; Package beep
.
(Tue, 19 Feb 2019 05:51:04 GMT) (full text, mbox, link).
Acknowledgement sent
to jim_p <pitsiorisj@gmail.com>
:
New Bug report received and forwarded. Copy sent to pitsiorisj@gmail.com, Rhonda D'Vine <rhonda@debian.org>
.
(Tue, 19 Feb 2019 05:51:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: beep Version: 1.4.3-1 Severity: grave Tags: upstream Justification: renders package unusable Dear Maintainer, After today's upgrade to version 1.4.x, beep no longer works and pops the above error. After checking its man page, I found out that it tries to access these devices, in that specific order /dev/input/by-path/platform-pcspkr-event-spkr /dev/tty0 /dev/vc/0 and although I have the 1st one (the pc speaker), beep does not seem to be able to access it. If I am correct. from the new developer's page in github, I found out that there is this udev rule that needs to be present. https://github.com/spkr-beep/beep/blob/master/90-pcspkr-beep.rules If so, please add the above udev rule to your package. -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-3-amd64 (SMP w/2 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages beep depends on: ii libc6 2.28-6 beep recommends no packages. beep suggests no packages. -- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Rhonda D'Vine <rhonda@debian.org>
:
Bug#922667
; Package beep
.
(Tue, 19 Feb 2019 11:12:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Rhonda D'Vine <rhonda@deb.at>
:
Extra info received and forwarded to list. Copy sent to Rhonda D'Vine <rhonda@debian.org>
.
(Tue, 19 Feb 2019 11:12:03 GMT) (full text, mbox, link).
Message #10 received at 922667@bugs.debian.org (full text, mbox, reply):
Control: tag -1 - upstream Control: severity -1 normal Hi. On 2/19/19 6:46 AM, jim_p wrote: > After today's upgrade to version 1.4.x, beep no longer works and pops the above > error. After checking its man page, I found out that it tries to access these > devices, in that specific order > > /dev/input/by-path/platform-pcspkr-event-spkr > /dev/tty0 > /dev/vc/0 > > and although I have the 1st one (the pc speaker), beep does not seem to be able > to access it. > If I am correct. from the new developer's page in github, I found out that > there is this udev rule that needs to be present. > > https://github.com/spkr-beep/beep/blob/master/90-pcspkr-beep.rules > > If so, please add the above udev rule to your package. I would suggest to install the apt-listchanges package and/or read the NEWS file that I added specifically about this. For a start, this is not an upstream bug, it's a packaging decision. Secondly, it doesn't render the package unusable, it can be used by root without any troubles. I'm not totally convinced that I want (or should) add the udev rule. It's on admin discretion to do so. I might consider it though. I will have to update the package due to build error on arm64 anyway. Will locally try it out, but I'll discuss it first with others if that is a reasonable approach, permission wise. Thanks for understanding, Rhonda
Removed tag(s) upstream.
Request was from Rhonda D'Vine <rhonda@deb.at>
to 922667-submit@bugs.debian.org
.
(Tue, 19 Feb 2019 11:12:03 GMT) (full text, mbox, link).
Severity set to ‘normal’ from ‘grave’
Request was from Rhonda D'Vine <rhonda@deb.at>
to 922667-submit@bugs.debian.org
.
(Tue, 19 Feb 2019 11:12:03 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, pitsiorisj@gmail.com, Rhonda D'Vine <rhonda@debian.org>
:
Bug#922667
; Package beep
.
(Wed, 20 Feb 2019 07:39:04 GMT) (full text, mbox, link).
Acknowledgement sent
to jim_p <pitsiorisj@gmail.com>
:
Extra info received and forwarded to list. Copy sent to pitsiorisj@gmail.com, Rhonda D'Vine <rhonda@debian.org>
.
(Wed, 20 Feb 2019 07:39:04 GMT) (full text, mbox, link).
Message #19 received at 922667@bugs.debian.org (full text, mbox, reply):
Package: beep Version: 1.4.3-1 Followup-For: Bug #922667 Dear Maintainer, I tried adding my user to the beep group, but nothing changed. Then I read everything in /usr/share/doc/beep/INSTALL.md and here are my thoughts, Before adding my user to the beep group, I had to create that group. I did that, but still no beep. Why? Because before making the group, I had to make the relevant udev rule. I created it too, I rebooted, bust still no beep. Why? Because I also had to change the device permissions, but I have no idea how to to that. I tried whatever is suggested in the instructions but all I get is this bit # ls -lH /dev/input/by-path/platform-pcspkr-event-spkr crw-rw---- 1 root input 13, 67 Feb 20 09:00 /dev/input/by-path/platform-pcspkr- event-spkr # getfacl /dev/input/by-path/platform-pcspkr-event-spkr getfacl: Removing leading '/' from absolute path names # file: dev/input/by-path/platform-pcspkr-event-spkr # owner: root # group: input user::rw- group::rw- other::--- Maybe I am doing something wrong. But I think most, if not all, of this stuff can be ommited if you provide the udev rule, make the group and change the device permissions upon the install of the package. On top of that, I think all that setup is a tedius job for something that, for me at least, is used for a few milliseconds each time (I use beep to make an audible notification for when transmission-daemon completes a download). The 1.3.x version was literally plug-n-play, because, after installing it, I could use pcspkr with it instantly, with no extra setup at all. -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-3-amd64 (SMP w/2 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages beep depends on: ii libc6 2.28-7 beep recommends no packages. beep suggests no packages. -- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Rhonda D'Vine <rhonda@debian.org>
:
Bug#922667
; Package beep
.
(Wed, 20 Feb 2019 09:39:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Rhonda D'Vine <rhonda@deb.at>
:
Extra info received and forwarded to list. Copy sent to Rhonda D'Vine <rhonda@debian.org>
.
(Wed, 20 Feb 2019 09:39:03 GMT) (full text, mbox, link).
Message #24 received at 922667@bugs.debian.org (full text, mbox, reply):
Hi, do you have the acl package installed? Because the suggested udev rule makes use of ACLs. And after adding the udev rule you probably need to restart because it only triggers on activating the device. So yes, the documentation could be better for the steps needed, and we'll think about improving that. Personally I'm not too keen on adding an additional dependency on the acl package, no matter how useful it is. The main reason for the update was to get the security issues fixed, and given the state of the release making it extra comfortable for end users to get it working for regular users instead of only for root wasn't the priority. I hope you can understand that. Rhonda On 2/20/19 8:36 AM, jim_p wrote: > Package: beep > Version: 1.4.3-1 > Followup-For: Bug #922667 > > Dear Maintainer, > > I tried adding my user to the beep group, but nothing changed. Then I read > everything in /usr/share/doc/beep/INSTALL.md and here are my thoughts, > > Before adding my user to the beep group, I had to create that group. I did > that, but still no beep. Why? > > Because before making the group, I had to make the relevant udev rule. I > created it too, I rebooted, bust still no beep. Why? > > Because I also had to change the device permissions, but I have no idea how to > to that. I tried whatever is suggested in the instructions but all I get is > this bit > > # ls -lH /dev/input/by-path/platform-pcspkr-event-spkr > crw-rw---- 1 root input 13, 67 Feb 20 09:00 /dev/input/by-path/platform-pcspkr- > event-spkr > > # getfacl /dev/input/by-path/platform-pcspkr-event-spkr > getfacl: Removing leading '/' from absolute path names > # file: dev/input/by-path/platform-pcspkr-event-spkr > # owner: root > # group: input > user::rw- > group::rw- > other::--- > > Maybe I am doing something wrong. But I think most, if not all, of this stuff > can be ommited if you provide the udev rule, make the group and change the > device permissions upon the install of the package. > On top of that, I think all that setup is a tedius job for something that, for > me at least, is used for a few milliseconds each time (I use beep to make an > audible notification for when transmission-daemon completes a download). The > 1.3.x version was literally plug-n-play, because, after installing it, I could > use pcspkr with it instantly, with no extra setup at all. > > > > -- System Information: > Debian Release: buster/sid > APT prefers testing > APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') > Architecture: amd64 (x86_64) > > Kernel: Linux 4.19.0-3-amd64 (SMP w/2 CPU cores) > Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) > Shell: /bin/sh linked to /bin/dash > Init: systemd (via /run/systemd/system) > > Versions of packages beep depends on: > ii libc6 2.28-7 > > beep recommends no packages. > > beep suggests no packages. > > -- no debconf information >
Information forwarded
to debian-bugs-dist@lists.debian.org, pitsiorisj@gmail.com, Rhonda D'Vine <rhonda@debian.org>
:
Bug#922667
; Package beep
.
(Wed, 20 Feb 2019 18:57:03 GMT) (full text, mbox, link).
Acknowledgement sent
to jim_p <pitsiorisj@gmail.com>
:
Extra info received and forwarded to list. Copy sent to pitsiorisj@gmail.com, Rhonda D'Vine <rhonda@debian.org>
.
(Wed, 20 Feb 2019 18:57:03 GMT) (full text, mbox, link).
Message #29 received at 922667@bugs.debian.org (full text, mbox, reply):
Package: beep Version: 1.4.3-1 Followup-For: Bug #922667 Dear Maintainer, The instructions did work after a cold boot, done several hours after writing the previous message. It seems a simple reboot was not enough :P I installed acl by hand because it was not already installed, not even as a dependency. Plus, getfacl is not available without the acl package. On top of that, I also had to add debian-transmission (= the user transmission- daemon runs as) to the beep group so that it would "beep when done". Please reconsider about adding acl as a dependency (I assume it has to be a direct dependency, not just a suggested/recommended one), creating the beep group and adding the udev rule as well. I do not think it will harm any existing setups but it will definitely make our lives easier. If all that is done, documentation is almost not needed. A simple "please add your user to the beep group" notification, after the installation, is enough. Thank you :) -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-3-amd64 (SMP w/2 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages beep depends on: ii libc6 2.28-7 beep recommends no packages. beep suggests no packages. -- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Rhonda D'Vine <rhonda@debian.org>
:
Bug#922667
; Package beep
.
(Fri, 22 Feb 2019 00:21:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Hugh Morris <hugh.morris@jetvol.com>
:
Extra info received and forwarded to list. Copy sent to Rhonda D'Vine <rhonda@debian.org>
.
(Fri, 22 Feb 2019 00:21:03 GMT) (full text, mbox, link).
Message #34 received at 922667@bugs.debian.org (full text, mbox, reply):
Hello I don't yet understand all the above, but I, too, was puzzled when my beeping scripts went silent. Hugh Morris
Information forwarded
to debian-bugs-dist@lists.debian.org, Rhonda D'Vine <rhonda@debian.org>
:
Bug#922667
; Package beep
.
(Sun, 24 Feb 2019 00:12:04 GMT) (full text, mbox, link).
Acknowledgement sent
to GSR <gsr.bugs@infernal-iceberg.com>
:
Extra info received and forwarded to list. Copy sent to Rhonda D'Vine <rhonda@debian.org>
.
(Sun, 24 Feb 2019 00:12:04 GMT) (full text, mbox, link).
Message #39 received at 922667@bugs.debian.org (full text, mbox, reply):
Package: beep Followup-For: Bug #922667 Before it worked fine via sound card speakers as normal user, now not even root can get beeps. I understand the user perms setup part being not done yet, but not why root fails too (the only difference is if it prints "Error: Could not open any device" or not). -- System Information: Debian Release: buster/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.17.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages beep depends on: ii libc6 2.28-7 beep recommends no packages. beep suggests no packages. -- no debconf information
Reply sent
to Rhonda D'Vine <rhonda@debian.org>
:
You have taken responsibility.
(Tue, 05 Mar 2019 12:36:08 GMT) (full text, mbox, link).
Notification sent
to jim_p <pitsiorisj@gmail.com>
:
Bug acknowledged by developer.
(Tue, 05 Mar 2019 12:36:08 GMT) (full text, mbox, link).
Message #44 received at 922667-close@bugs.debian.org (full text, mbox, reply):
Source: beep Source-Version: 1.4.3-2 We believe that the bug you reported is fixed in the latest version of beep, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 922667@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Rhonda D'Vine <rhonda@debian.org> (supplier of updated beep package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Format: 1.8 Date: Thu, 21 Feb 2019 11:26:35 +0100 Source: beep Binary: beep beep-dbgsym beep-udeb Architecture: source amd64 Version: 1.4.3-2 Distribution: unstable Urgency: high Maintainer: Rhonda D'Vine <rhonda@debian.org> Changed-By: Rhonda D'Vine <rhonda@debian.org> Description: beep - advanced PC-speaker beeper beep-udeb - advanced PC-speaker beeper - minimal package (udeb) Closes: 767087 922667 Changes: beep (1.4.3-2) unstable; urgency=high . * New patch to use -g instead of -gstabs, which makes it compile with dh_dwz again, and fixes the FTBFS on arm64. * Shipping a udev rule that enables local users to use the beep tool. Updating the NEWS entry about it. (closes: #767087, #922667) Checksums-Sha1: db010f9a088f5f18977613296278a18fb12e9764 1852 beep_1.4.3-2.dsc 2d7b35e23df81e54bff122ed61aebecc53b7b044 8176 beep_1.4.3-2.debian.tar.xz 00ad523e0a272cd1403115339b3d57e97e663615 18324 beep-dbgsym_1.4.3-2_amd64.deb 70ab9e731be106765ee8d237cde7ace203a158cd 8048 beep-udeb_1.4.3-2_amd64.udeb 12b5b0eea795c4ca92aa25b1fdd321ac5c51642c 5657 beep_1.4.3-2_amd64.buildinfo 552998fe31735f9c3635e3c2636fad5ac9c74f7b 26812 beep_1.4.3-2_amd64.deb Checksums-Sha256: 7abf5ace48cba7e8e9495bd8a244b2ca7c485c9a32d3fee0e0a1fa75f7326b95 1852 beep_1.4.3-2.dsc d5f7ea0e4d2aee1dab6fa348c96589124c796075d0a59cfab99fed3548511668 8176 beep_1.4.3-2.debian.tar.xz 4ebd6b44a1ba88e3a20abc2b0ab7aa2d3affee93acbc8680272b0f197e36554b 18324 beep-dbgsym_1.4.3-2_amd64.deb a2177326ba682805cbd2d532bc5609ca55da630b0edd432a83b8b618b0154220 8048 beep-udeb_1.4.3-2_amd64.udeb 7e546c3d185f610c81efeeccf2df6a6b5ed01a4ac1e125d077c2da6d62ea2c5b 5657 beep_1.4.3-2_amd64.buildinfo 54a5f76fed6b43db49744ddaef2649fa1fbfb21f831494707bef6101030a2ae0 26812 beep_1.4.3-2_amd64.deb Files: 1d94157a97aa525554aa708bd87054b6 1852 sound optional beep_1.4.3-2.dsc 58401317de3ce48262c8c35862b2e1f6 8176 sound optional beep_1.4.3-2.debian.tar.xz a85d2316b75c8e0615ae1db4084ea5d7 18324 debug optional beep-dbgsym_1.4.3-2_amd64.deb d43512cc470980080f86a9e0d611c21e 8048 debian-installer optional beep-udeb_1.4.3-2_amd64.udeb d2a5259c8446e0bcc2d7be9f6deecf82 5657 sound optional beep_1.4.3-2_amd64.buildinfo 1b6b4173a6ccc71d7865110719427575 26812 sound optional beep_1.4.3-2_amd64.deb -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEELHLzKO0XByBPs0mU3ugEPuF+uzAFAlx+aKkACgkQ3ugEPuF+ uzAd4g/8Cd0/TjkXnHD4Ntc/YuPfidCbL6HCYrz9KaSn7hiU5EnLKt8jFBokik0c HIbEGLPKYDrMJkRAn3pKAyInC2YMbMi7hXdiejnk3cKqSaPZwrDm7AKeTMSHt84n SniT5nE7x+AI9PG+vwdjzZxALI5EiYTUqomKDvndHR6YVJGkLmOu2GrjiVkwD6qJ f+nzQWtnPGSIHZ/58Aj3G94lAv1Iwm+/qKPVz3Yr2xzI2UFwF+IjWOAKDxeiywiy M6sXeHe1QfaqNafkABsWPd3RU31/uVGyfsQIJVZmZZpVt6amnTjYkf+sUaPOpAhM zULVcKTjtOhG7AEUQmLIKKLMXNIGVA7yCu0Xc5fz0eHJLDb3YlsIvNkBJoAV+Ii0 Hll658ApQXDvGjJnS9PEOAdZl/KyJnrR5Zp/lLShKCqNN2ovJR2X1aUDNbFbBUcA Ov5JcuZYFBZyYTimNBKAJ9BrJuW7LuXrYBBYuUCez4sWqt4HSJL2ER9FL2PcLztV J0Q15fZiFhtoW+jRqX0fikfafcqCZZzTOVxQcK6Ww3HBhLlcofZoI9IFK2uFDv6o MJ2au/TnDgmUYWMM5a9hDRNhUhPfbfe+7XHWMqNqO6cs9+CmkteNWS7ZY95YrZQZ HVRGYr51UNMxHw+9CUavJHePxLJJw0JT5w/Y0NVpr6KUxxp7r0E= =tB8L -----END PGP SIGNATURE-----
Information forwarded
to debian-bugs-dist@lists.debian.org, pitsiorisj@gmail.com, Rhonda D'Vine <rhonda@debian.org>
:
Bug#922667
; Package beep
.
(Tue, 12 Mar 2019 16:15:03 GMT) (full text, mbox, link).
Acknowledgement sent
to jim_p <pitsiorisj@gmail.com>
:
Extra info received and forwarded to list. Copy sent to pitsiorisj@gmail.com, Rhonda D'Vine <rhonda@debian.org>
.
(Tue, 12 Mar 2019 16:15:03 GMT) (full text, mbox, link).
Message #49 received at 922667@bugs.debian.org (full text, mbox, reply):
Package: beep Version: 1.4.3-2 Followup-For: Bug #922667 Dear Maintainer, First of all, as soon as the package was updated to 1.4.3-2, I removed the upstream udev rule and let it use the provided one. I see there is a small difference between them, but I can not explain what that change actually does. The problem is that that difference, imho, makes beep partialy broken. It does work... most of the time, so let me mention my use cases in which it does not work. a) As I have said above, I mainly use beep as an audible notification for transmission-daemon. The user debian-tranmission is on the beep group as seen below $ id debian-transmission uid=110(debian-transmission) gid=110(debian-transmission) groups=110(debian- transmission),999(beep) but no beep is heard when it is supposed to. b) Executing beep as a regular user, who is in the beep group obviously, works... if the user is logged in locally. Executing it as a the same user, connected via ssh, still pops up the "could not open any device" error and getfacl reports the same as above for the ownership stuff # getfacl /dev/input/by-path/platform-pcspkr-event-spkr getfacl: Removing leading '/' from absolute path names # file: dev/input/by-path/platform-pcspkr-event-spkr # owner: root # group: input user::rw- group::rw- other::--- Both these issues are completely solved when using the upstream udev rule, so I think your rule needs some fixing. Thanks for listening :) p.s. mini rant: I also noticed that the updated package still does not make the beep group, so it is one more step for the user to do. Other packages do that all the time (that's why I still have a debian-tor group although I have removed removed torbrowser ~2 years ago), so I don't think it will be hard or pointless to have a beep group as well. Special groups are mandatory for various reasons. And, because I had a small discussion about it with a fellow (and more advanced) debian and beep user, if you consider a "security flaw" to have beep running as a non-root user, why package beep at all? Plus, if I have to do all that stuff by hand in order to make it "simply" work, why do I still have debian and not gentoo (or arch at the very least)? -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-3-amd64 (SMP w/2 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages beep depends on: ii libc6 2.28-8 beep recommends no packages. beep suggests no packages. -- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Rhonda D'Vine <rhonda@debian.org>
:
Bug#922667
; Package beep
.
(Tue, 12 Mar 2019 16:51:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Rhonda D'Vine <rhonda@deb.at>
:
Extra info received and forwarded to list. Copy sent to Rhonda D'Vine <rhonda@debian.org>
.
(Tue, 12 Mar 2019 16:51:02 GMT) (full text, mbox, link).
Message #54 received at 922667@bugs.debian.org (full text, mbox, reply):
Hey there. :) On 3/12/19 5:13 PM, jim_p wrote: > First of all, as soon as the package was updated to 1.4.3-2, I removed the > upstream udev rule and let it use the provided one. I see there is a small > difference between them, but I can not explain what that change actually does. > The problem is that that difference, imho, makes beep partialy broken. The shipped udev rule is to allow local logged in users access to the device. Which is the common case, because you actually would want people in front of the computer to be able to beep it, others usually won't be able to hear it anyways. But yes, your case is something different, and for that the upstream suggested approach might be feasible. I though am not convinced that special casing for every corner cases of the usage of the package is the best move forward. It would add quite some complexity, and added dependency which I doubt that most people actually would benefit from. For those corner cases please create the beep group yourself and use the upstream suggested udev rule. Even if I would consider of adding the complexity needed for that (through facilitating debconf for questioning which kind of setup the admin would prefer) it would require testing and needs time to make sure it doesn't interfer with other things - and like said, would pull in another dependency. And given that we are now in freeze for buster time doesn't really permit that. If people have patches and merge requests that I could look at it might improve the chances for that to happen, but it still would be something for the next release. > p.s. mini rant: > I also noticed that the updated package still does not make the beep group, so > it is one more step for the user to do. The beep group would only be needed when doing the acl dance that upstream suggested. Given that we don't do that there is no need to create the group in the first place. > Other packages do that all the time (that's why I still have a debian-tor group > although I have removed removed torbrowser ~2 years ago), so I don't think it > will be hard or pointless to have a beep group as well. Special groups are > mandatory for various reasons. The difference there is that torbrowser did actually use that group. Which the beep package never did. The older version of the package used the existing audio group, which made a fair amount of sense to facilitate for this. > And, because I had a small discussion about it with a fellow (and more > advanced) debian and beep user, if you consider a "security flaw" to have beep > running as a non-root user, why package beep at all? Plus, if I have to do all > that stuff by hand in order to make it "simply" work, why do I still have > debian and not gentoo (or arch at the very least)? Just because something might expose information in specific usage doesn't mean that it doesn't make sense for dedicated situations. I can't follow the reasoning that it would be beneficial to have it rather not at all than to have it available for a specific environment. I have no idea what you try to achieve with that kind of argumentation? And it *does* simply work. Just not for your special corner case, which is unfortunate, but that requires a bit more work. Depending on acl, creating a dedicated group and shipping a rule that facilitates that isn't that trivial to get right. Otherwise I would assume you had sent me already a patch for it, wouldn't you. :) Thanks for your interest in beep anyways, it's appreciated. Rhonda
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org
.
(Wed, 10 Apr 2019 07:28:30 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Feb 9 07:41:31 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.
Ok, but when I add the user to the tty
group, I get:
$ beep
ioctl: Operation not permitted
ioctl: Operation not permitted
strace:
brk(NULL) = 0xa14000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f516bf35000
access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49/lib/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49/lib/tls/x86_64", 0x7ffffb4c5f20) = -1 ENOENT (No such file or directory)
open("/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49/lib/tls", 0x7ffffb4c5f20) = -1 ENOENT (No such file or directory)
open("/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49/lib/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49/lib/x86_64", 0x7ffffb4c5f20) = -1 ENOENT (No such file or directory)
open("/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "177ELF21133>120062"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=1912328, ...}) = 0
mmap(NULL, 3795136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f516b976000
mprotect(0x7f516bb0c000, 2093056, PROT_NONE) = 0
mmap(0x7f516bd0b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x195000) = 0x7f516bd0b000
mmap(0x7f516bd11000, 14528, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f516bd11000
close(3) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f516bf32000
arch_prctl(ARCH_SET_FS, 0x7f516bf32700) = 0
mprotect(0x7f516bd0b000, 16384, PROT_READ) = 0
mprotect(0x602000, 4096, PROT_READ) = 0
mprotect(0x7f516bf38000, 4096, PROT_READ) = 0
brk(NULL) = 0xa14000
brk(0xa35000) = 0xa35000
rt_sigaction(SIGINT, {sa_handler=0x4010b0, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f516b9a9420}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
open("/dev/tty0", O_WRONLY) = 3
ioctl(3, EVIOCGSND(0), 0x7f516bd11e20) = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(3, KIOCSOUND, 0xa97) = -1 EPERM (Operation not permitted)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 16), ...}) = 0
dup(2) = 4
fcntl(4, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 16), ...}) = 0
write(4, "ioctl: Operation not permittedn", 31ioctl: Operation not permitted
) = 31
close(4) = 0
nanosleep({tv_sec=0, tv_nsec=200000000}, NULL) = 0
ioctl(3, KIOCSOUND, 0) = -1 EPERM (Operation not permitted)
dup(2) = 4
fcntl(4, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 16), ...}) = 0
write(4, "ioctl: Operation not permittedn", 31ioctl: Operation not permitted
) = 31
close(4) = 0
close(3) = 0
write(1, "77", 2) = 2
exit_group(0) = ?
+++ exited with 0 +++
But even when I run beep as root, nothing beeps. Playing audio (with mpv) works, though.
- Index
- » Applications & Desktop Environments
- » what’s the correct setup to make beep work
Pages: 1
#1 2019-04-06 17:00:26
- replabrobin
- Member
- Registered: 2010-05-06
- Posts: 218
what’s the correct setup to make beep work
After an upgrade today to beep-1.4.4-1 I found I couldn’t get beep to work with sudo; I tried to follow the commands at
https://github.com/spkr-beep/beep/blob/ … ISSIONS.md
I got the second udev rule to work with both vtty use and also with a windowed background task I couldn’t manage
to make the background process work with the first udev rule (which uses setfacl).
Is there a correct setup for an arch beep group?
#2 2019-04-06 20:17:13
- seth
- Member
- Registered: 2012-09-03
- Posts: 35,305
Re: what’s the correct setup to make beep work
lsmod | grep pcspkr
#3 2019-04-06 21:13:27
- Ropid
- Member
- Registered: 2015-03-09
- Posts: 1,068
Re: what’s the correct setup to make beep work
@seth, you seem to have misunderstood what the problem here is about. That ‘beep’ program behaves like this in its latest version:
$ sudo beep
[sudo] password for ...:
beep: Error: Running as root under sudo, which is not supported for security reasons.
beep: Error: Set up permissions for the pcspkr evdev device file and run as non-root user instead.
$ su -c beep
Password:
As you can see, it refuses to run when started through sudo. It will run fine when using ‘su’ instead of sudo.
I also just now tried the following, and it seems what it does is look for SUDO_* entries in the environment:
$ sudo -i
# beep
beep: Error: Running as root under sudo, which is not supported for security reasons.
beep: Error: Set up permissions for the pcspkr evdev device file and run as non-root user instead.
# unset SUDO_GID SUDO_COMMAND SUDO_USER SUDO_UID
# beep
#4 2019-04-06 21:40:54
- seth
- Member
- Registered: 2012-09-03
- Posts: 35,305
Re: what’s the correct setup to make beep work
D’ooh m(
(Both, because i skipped the actual post and went for the common solution and because the beep behavior — while discouraging the UID0 execution for regular users is nice, this is nuts)
Ok.
The first rule is for active sessions (systemd controls the ACLs) and will never work for background processes.
Here’s a list of groups to avoid for beep (or any other): https://wiki.archlinux.org/index.php/De … D_Database
This will also work:
sudo env -u SUDO_GID -u SUDO_COMMAND -u SUDO_USER -u SUDO_UID beep
#5 2019-04-07 10:37:23
- replabrobin
- Member
- Registered: 2010-05-06
- Posts: 218
Re: what’s the correct setup to make beep work
Thanks for the pointers. I do have the module loaded so problems are not with that. Since beep is not an allocated group I chose to make that group and add my user to it. Using the second rule allows my background process to run beep. Would I be better off just adding my user to the input group?
#6 2019-04-07 13:15:38
- seth
- Member
- Registered: 2012-09-03
- Posts: 35,305
Re: what’s the correct setup to make beep work
It’s discouraged, https://wiki.archlinux.org/index.php/Us … emd_groups
Since the speaker device is technically not «input» I also don’t know whether that makes sense (notably since you’ve a lot of GIDs left
#7 2019-04-18 13:27:39
- schard
- Member
- From: Hannover
- Registered: 2016-05-06
- Posts: 1,609
- Website
Re: what’s the correct setup to make beep work
I am encountering the same issue.
Before some recent update, I could use «sudo beep» from an account to use the system speaker.
Now I get the error message mentioned above.
I tried the following according to the wiki to no avail:
$ cat /usr/lib/udev/rules.d/70-pcspkr-beep.rules
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="PC Speaker", ENV{DEVNAME}!="", GROUP="beep", MODE="0620"
$ udevadm control --reload
$ sudo -su termgr
$ beep
beep: Error: Could not open any device
$ groups
termgr sshusers beep
Update: False alarm. It works after a reboot somehow.
Last edited by schard (2019-04-18 13:34:17)
#8 2021-02-17 13:51:26
- radiobla
- Member
- Registered: 2020-02-19
- Posts: 65
Re: what’s the correct setup to make beep work
I was able to solve the issue by adding the rules suggested by @schard.
To avoid rebooting, I just reloaded both udev and the pcspkr module
After adding UDEV rules to /usr/lib/udev/rules.d:
# rmmod pcspkr
# modprobe pcspkr
# udevadm control --reload
I’m not sure if using «modprobe» instead of «insmod» is going to work as well. In my common sense, I’d say it would work the same way in this case.
Thank you.