Subject: bug#799: No system sounds in xterm

From: Friedhelm Mehnert <[email-masked]>
Date: Fri, 13 Oct 2023 12:50:07 +0200

Package: xserver-xorg
Version: 21.1.7-3devuan2

With the latest version of xserver-xorg in Daedalus I have noticed, that
there are no system sounds while in an xterm. Ore "bell" does not work
anymore. If I configure xterm to use "visual bell" it works.

I have found the patch in commit c2a429512 is responsible for this.
I can get the old behaviour back by reverting to the "devuan1" version.

I also do not have the problems with vrt switching as described in bug
#793.

I attach both X-logs.

Regards Friedhelm

---

From: Friedhelm Mehnert <[email-masked]>
Date: Fri, 13 Oct 2023 14:39:06 +0200

Here is some additional information. I should have provided from the
start.

1. I'm on pure alsa, no pulseaudio or pipewire.

2. I'm not using any desktop environment, but fvwm2 window manager.

3. Beep works in textmode ttys.

4. Sound works from all applications including Browser.

5. I have liblogind0 and libelogind-compat installed.

This is a lenovo T410 laptop running current Daedalus. It' using buildin
Intel graphics and the i915 xserver. I have also tried to use the
vesa-server, which has other more severe problems on this machine, but
the problem remains the same.

I can not reprocuce the crashes with vrt switching. Both versions do
that fine here.

I attach the output of "dpkg -l" in the hope it may help.

Regards Friedhelm

---

From: Ralph Ronnquist <[email-masked]>
Date: Sun, 15 Oct 2023 15:04:20 +1100

Hi Friedhelm,

thanks for the debugging. Would it be possible for you to run
"xset q | grep bell" in terminal, for both cases?

That should report somthing like:
----
  bell percent:  50    bell pitch:  400    bell duration:  100
----

where the first number is "volume" as percentage, the second the
frequency, and the third beep duration in milliseconds.

You may set those with "xset b <volume> <frequency> <duration>"
or a simple "xset b on" or "xset b off"

Perhaps the difference is in that setting, which then might be due to
a default setting difference for xorg (as a side function of the
patch).

regards,

Ralph.

---

From: Friedhelm Mehnert <[email-masked]>
Date: Sun, 15 Oct 2023 10:08:19 +0200

Hello Ralph,

Thanks for looking into it.

Both give the same:

> fm@m2:~$ xset q | grep bell

Also, if I cnfigure xterm to use "visual bell", it works. The "bell"
seems to arive at the xterm, just does not sound. The "alsa side" is ok.
It works from the text-mode vts. All other sounds work also.

Regards
Friedhelm

---

From: Ralph Ronnquist <[email-masked]>
Date: Mon, 16 Oct 2023 09:21:50 +1100

Right. Quite interesting effect as the code differences between the
two versions don't seem at all related to keyboard handling. That
patch "merely" introduces using seatd for input stream access (as
alterantive to logind), and that's on the surface unrelated to the X11
message interchange between clients and server.

Yet it appears obvious that the Xorg server patch is inolved given
that you have the different effects just by changing server version.

I'm setting up a repeating test case for this issue so I can explore
it in more detail. For that: how do you trigger the bell effect (which
I understand works as visual bell but not as audio bell)?

   Do you trigger bell by typing ^G (i.e., control-G) in a shell in
   xterm? Or, say, pushing tab in a shell in xterm (at an input point
   with completion ambiguity)? Or running "echo '^G'" in a shell in
   xterm? Or some other way?

Though it's probably not very important which interactive gesture you
are using. I'm not exactly en par with the code chain from interaction
gesture to audio rendering, but I would guess there eventually is an
X11 call from xterm to Xorg to handle an XBell event. And, I would
think the visual bell is handled differently already by xterm and that
it's not an XBell message but rather some other message sequence.
(Clearly I need to freshen up on the X11 messages a bit :))

regards,

Ralph.

---

From: Friedhelm Mehnert <[email-masked]>
Date: Mon, 16 Oct 2023 09:57:48 +0200

Hi Ralph,

you got it all right.

I even cloned the repo, commented that patch out in
debian/patches/series and used cowbuilder to rebuild the packages. It's
clearly that patch.

I have no idea about the code chain, which leads to the audio,
so no chance for me to find the problem.

I can trigger the bell in various ways. Pressing ^G , pressing left
or right arrow while at the prompt, even cat a file with has ^G in it.
No beep.

Doing something like "xterm -vb &" from the xterm gives another xterm
which uses "visual bell". So the xterm "sees" the bell, but it does not
get to the audio.

B.T.W. if you have more questions, I hang out on #devuan and #devuan-dev
most of the time.

Best Regards
Friedhelm

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Tue, 17 Oct 2023 17:14:02 +0000

This is an automatic notification regarding your bug report
which was filed against the xserver-xorg package:

#799: No system sounds in xterm

It has been closed by [email-masked].

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact [email-masked] by
replying to this email.

-- 
799: https://bugs.devuan.org/cgi/bugreport.cgi?bug=799
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: #799: fixed in src:xorg-server version 2:21.1.8-1devuan3
From: [email-masked]
To: [email-masked]
Date: Tue, 17 Oct 2023 17:12:06 +0000

Version: 2:21.1.8-1devuan3

Source package xorg-server (2:21.1.8-1devuan3) added to Devuan suite unstable.

This closes bug report 799.

Thanks

DAK managing the Devuan archive

Format: 1.8
Date: Tue, 17 Oct 2023 11:43:40 +0100
Source: xorg-server
Architecture: source
Version: 2:21.1.8-1devuan3
Distribution: unstable
Urgency: medium
Maintainer: Devuan Developers <[email-masked]>
Changed-By: Mark Hindley <[email-masked]>
Closes: 799
Changes:
 xorg-server (2:21.1.8-1devuan3) unstable; urgency=medium
 .
   * d/p/0001-Support-libseat.patch: update to open console correctly.
     (Closes: #799)
Checksums-Sha1:
 cfbf3e5c523599829dc4c988e77895774c08a1db 3683 xorg-server_21.1.8-1devuan3.dsc
 a533a818b4329d67883997ee940dd5ce4b92c36c 134888 xorg-server_21.1.8-1devuan3.debian.tar.xz
 d59bb72a0f3a565c7975d28fb9de18860c955baa 5570 xorg-server_21.1.8-1devuan3_source.buildinfo
Checksums-Sha256:
 e80a08d7f060a105ecbfe13abc0816d4433f66243599c57d938d4e5efd0a90cd 3683 xorg-server_21.1.8-1devuan3.dsc
 b218369e6c409bf727a9b45679370b1889fb509c384acbb811cf3f62b02f95f8 134888 xorg-server_21.1.8-1devuan3.debian.tar.xz
 0834167c4fa69f4d6266d4b5099a5454cb71e1097b8cde45e76729e0da5aa089 5570 xorg-server_21.1.8-1devuan3_source.buildinfo
Files:
 00093e6158130b0d1479a9c72e4a4b17 3683 x11 optional xorg-server_21.1.8-1devuan3.dsc
 a71cfaa7f56f68c0e8c07087ca284304 134888 x11 optional xorg-server_21.1.8-1devuan3.debian.tar.xz
 f3011c90f16934ce618e811c2c46f233 5570 x11 optional xorg-server_21.1.8-1devuan3_source.buildinfo

Subject: No system sounds in xterm
From: Friedhelm Mehnert <[email-masked]>
To: [email-masked]
Date: Fri, 13 Oct 2023 12:50:07 +0200

Package: xserver-xorg
Version: 21.1.7-3devuan2

I attach both X-logs.

Regards Friedhelm