• MGA7, XFCE4, annoying effects regarding keyboard shortcuts

    From Markus Robert Kessler@2:250/1 to All on Tue Nov 3 19:15:06 2020
    Hi everybody!

    Perhaps someone else have similar side effects? --
    I am running MGA7x64 with Xfce4, and in this box there are two
    "soundcards" available:

    **** List of PLAYBACK Hardware Devices ****
    card 0: Intel [HDA Intel], device 0: ALC262 Analog [ALC262 Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

    Card 0, builtin intel soundchip is automatically set as default in Pavucontrol, hence I can change the main volume via mouse wheel when the
    mouse pointer is above the speaker icon in the taskbar.

    The second device is a headset which comes along with a volume switch integrated into the usb cable. I saw that there are no shortcuts needed
    to set the volume by pressing up or down on the switch.

    But: This applies always to the default sound output.

    Meaning: When the default output is still card 0 / internal, then the
    sound switch of card 1 / usb headset, is controlling sound volume of card
    0 / internal out (!)

    Creating two shortcuts for AudioRaiseVolume / AudioLowerVolume doesn't
    help, since it only tries to overwrite some internal / "hidden" shortcut
    and this fails.

    Reason behind: I want to be able to easily change the volume of the
    headset during phone calls with the headset-builtin switch.

    Any trick to get around this? -- Thanks!

    Best regards,

    Markus

    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Tue Nov 3 20:49:48 2020
    On 4/11/20 6:15 am, Markus Robert Kessler wrote:


    Card 0, builtin intel soundchip is automatically set as default in Pavucontrol, hence I can change the main volume via mouse wheel when the mouse pointer is above the speaker icon in the taskbar.



    It does make an annoying 'popping" sound though. Probably a hardware thing


    --
    faeychild
    Running plasmashell 5.15.4 on 5.7.19-desktop-3.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Tue Nov 3 21:13:33 2020
    On Tue, 3 Nov 2020 19:15:06 -0000 (UTC), Markus Robert Kessler wrote:
    Hi everybody!

    Perhaps someone else have similar side effects? --
    I am running MGA7x64 with Xfce4, and in this box there are two
    "soundcards" available:

    **** List of PLAYBACK Hardware Devices ****
    card 0: Intel [HDA Intel], device 0: ALC262 Analog [ALC262 Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

    Card 0, builtin intel soundchip is automatically set as default in Pavucontrol, hence I can change the main volume via mouse wheel when the mouse pointer is above the speaker icon in the taskbar.

    The second device is a headset which comes along with a volume switch integrated into the usb cable. I saw that there are no shortcuts needed
    to set the volume by pressing up or down on the switch.

    But: This applies always to the default sound output.

    Meaning: When the default output is still card 0 / internal, then the
    sound switch of card 1 / usb headset, is controlling sound volume of card
    0 / internal out (!)

    Creating two shortcuts for AudioRaiseVolume / AudioLowerVolume doesn't
    help, since it only tries to overwrite some internal / "hidden" shortcut
    and this fails.

    Reason behind: I want to be able to easily change the volume of the
    headset during phone calls with the headset-builtin switch.

    Any trick to get around this? -- Thanks!

    It has been a few years since I had your problem and pulseaudio has
    made changes so I wish you luck.

    I also have the problem of cranking up volume when watching a video
    via Firefox and upon FF exit, the next sound played on the system would
    be way, way, too loud. Solution was to run alsactl to restore a saved
    setting.

    Back when I was using ekiga for phone calls, I had to do the same thing.
    At the time, I used aumix to set desired device levels and used alsactl
    to save the settings.

    Currently aumix-text is aumix replacement on mga7 but both fail to run. https://bugs.mageia.org/show_bug.cgi?id=14283

    All I can suggest is try using alsactl to save desired settings that
    you set via pulseaudio in the mixer setting via that speaker icon
    in the task bar.

    What you do is set desired normal/default volume level, take a alsactl
    save, and pulseaudio save, jack in headset use icon mixer
    to set headset level, and alsactl save and pulseaudio save values.

    For pulseaudio controls, you need a bunch of pulseaudio information.

    Do a quick speed read of man pulse-cli-syntax to get a daunting idea
    of the task.

    Man pages (man -k pulse-cli) talks about a whole bunch of stuff and
    require a bunch of working knowledge to get your head wrapped around
    what needs to be done.

    Spent a few weeks on that and almost gave up. Found a neat shortcut.
    Used some pulsaudio tools to dump current values and did not have to
    do near as much work and research of pulse-cli-syntax

    Tools of interest are pacmd and pactl.
    It becomes a simple matter of running those twice, once for speaker
    and once for headset. Diff of the saved files gets you device names
    and values. It then becomes a simple matter of programming to create
    a script before/after headset use.

    to dump current settings
    pacmd info > $HOME/pulse_card.info
    pacmd dump > $HOME/pulse_card.dump
    pactl list | grep 'Active Port:' > $HOME/pulse_card.ports

    jack in your head set, use taskbar volume icon->Audio mixer to make any
    desired adjustments and get a second dump of headset settings.

    I can not be of much more help. I used
    https://wiki.archlinux.org/index.php/PulseAudio
    to automagically just set default values in the user pulseaudio client
    setup files which boiled down to something like


    echo "
    set-source-volume alsa_output.pci-${_active}.${_type}-stereo.monitor $_volume
    set-source-mute alsa_output.pci-${_active}.${_type}-stereo.monitor no
    suspend-source alsa_output.pci-${_active}.${_type}-stereo.monitor no
    " >> $_fn

    That is not going to work for you since you are going to be making
    changes dynamically instead of during login.

    Before doing a bunch of deep diving of man pages I suggest putting
    set pulseaudio from a script
    in the first box at
    https://www.google.com/advanced_search

    to see some examples, then look at your dump diff's for your settings
    and values.


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Wed Nov 4 01:47:29 2020
    On 4/11/20 8:13 am, Bit Twister wrote:


    Back when I was using ekiga for phone calls, I had to do the same thing.
    At the time, I used aumix to set desired device levels and used alsactl
    to save the settings.


    < snipped, Thanks Bits >

    I am only running speakers, but when sound problems hit with Linux they
    seem to hit hard. and with each release...


    regards


    --
    faeychild
    Running plasmashell 5.15.4 on 5.7.19-desktop-3.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Markus Robert Kessler@2:250/1 to All on Wed Nov 4 08:41:53 2020
    On Wed, 04 Nov 2020 12:47:29 +1100 faeychild wrote:

    On 4/11/20 8:13 am, Bit Twister wrote:


    Back when I was using ekiga for phone calls, I had to do the same
    thing.
    At the time, I used aumix to set desired device levels and used alsactl
    to save the settings.


    < snipped, Thanks Bits >

    I am only running speakers, but when sound problems hit with Linux they
    seem to hit hard. and with each release...


    regards

    Hi all,
    and, also from my side: many thanks, Bit Twister!

    Yes, a lot to read and a good starting point for configuring the sound architecture.

    Well, when logging in as root, setting the volume and leaving the
    session, then the volume values are saved as system-wide defaults and are restored on next login as any user. This works.

    But, besides this, I need to be able to modify the volume during phone
    calls easily and at any time to better react to ambient noises etc. This
    is very important when calling to cell phones.
    Unfortunately, just set and restore is not enough.

    So, usually I use to deploy shortcuts containing commands like these:

    amixer -c Headset set Headphone 10%-
    amixer -c Headset set Headphone 10%+

    But, obviously these shortcuts conflict with "hidden" shortcuts triggered
    by the built-in volume switch of the headset.

    I have no clue where these shortcuts are defined and how to delete or re- define them. B.t.w., this is not only related to xfce4, as I had to see.

    Best regards,

    Markus


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Nov 4 11:24:15 2020
    On Wed, 4 Nov 2020 08:41:53 -0000 (UTC), Markus Robert Kessler wrote:


    Well, when logging in as root, setting the volume and leaving the
    session, then the volume values are saved as system-wide defaults and are restored on next login as any user. This works.

    But, besides this, I need to be able to modify the volume during phone
    calls easily and at any time to better react to ambient noises etc. This
    is very important when calling to cell phones.
    Unfortunately, just set and restore is not enough.

    So, usually I use to deploy shortcuts containing commands like these:

    amixer -c Headset set Headphone 10%-
    amixer -c Headset set Headphone 10%+

    But, obviously these shortcuts conflict with "hidden" shortcuts triggered
    by the built-in volume switch of the headset.

    I hear what you are saying, but do not understand. Using amixer is controlling the system hardware volume. There is nothing in the headset speakers that
    can go back and adjust that sound level, to my knowledge.

    What I suggest is using pulseaudio cli commands to tell pulse to mute
    the speaker channel and enable/control the headset output channel to
    get what you are after. Hopefully setting which pulse channel is to be in control would make your keyboard Volume +/- buttons work.

    If keyboard does not have Media Controls, then I suggest that you can set/define hot keys to run desired commands or script.

    Which reminds me. In the past pulseaudio would attach the channel/device
    to my buttons based on the fact that I had the headset jacked into the
    front panel at login. If not the external speakers are/were selected.


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)