Getting soundcard surround working properly

Yes, Zorin OS 16 Core uses GDM (But I do not):stuck_out_tongue:

And sorry. I was typing in a Huge Hurry and my post above sounds shorter than it was intended.

If that is the case, perhaps it might help @Daedelus to disable/replace it to remove Pulseaudio to make his surround work properly with Alsa.

Thanks for the update guys, in the meantime I was doing some more research, due to the speaker-test working correctly when using -D to specify the settings/card.

I ran across this:
https://bbs.archlinux.org/viewtopic.php?id=246758

which is purely ALSA if i'm not mistaken.

I'll have to keep digging for a bit, but that will be tomorrow. Starting to see double already haha.

1 Like

Remember I am using KDE. To begin with I was using SDDM but then reverted on 2nd install with GDM which is the option when I installed kde-full (plasma). On checking I am using gdm3:

1 Like

Do you know whether we are also using GDM3?
How can I check the version?

Hi, use that command in the screenshot, viz:

grep '/usr/s\?bin' /etc/systemd/system/display-manager.service

Apologies - I took a bad screenshot! :blush:

I've updated the screen image to the correct one of the konsole.

1 Like

Confirmed using @swarfendor437 's line:

grep '/usr/s\?bin' /etc/systemd/system/display-manager.service
ExecStart=/usr/sbin/gdm3

I also found out "VLC media player" has an option to choose what sound to output, with a dropdown for multiple options:

Setting this to output on 5.1 unfortunately didn't help.

It seems to ignore whatever the settings I use, that would have been a blast though.

Anyway,

Ran through this page one more time,

  • it also reports "not working at all" under linux
  • There might be firmware to be installed on the card, using windows 7
  • working on windows 7

For me it's

  • Working it is sort of working in linux:
  • in stereo (using all speakers, incl bass, but softer) or;
  • in 4.0 mode (Front Center+L+R and Rear L+R, no bass)
  • Working fine in Windows 7 (dual boot)

I understand 4.0 shouldn't include center, however using both
speaker-test with 6 channels or using this link:
AAC Multichannel Playback Test
I definitely get Front Left, Center, Right, Rear Right, Rear Left, and on bass, while set to 4.0 .

Again, one step closer but not just there yet.

1 Like

Regarding to the blacklisting of one of the two cards, while both are using snd_hda_intel and referring to this part of the linked page to rename a kernel/driver used:

08-25-2014, 09:05 PM - In my case it was the nvidia HDMI and the Creative Audigy. Both use the snd_intel_hda. You have to make sure the one driver you use is loaded the latter, that means for my case adding into /etc/initramfs-tools/modules the name of the nvidia driver, simply nvidia (+nvidia_uvm but that does nothing with the sound) because I want the Creative to blast. This is now included into initramfs and loaded just before the kernel jumps to hdd reading. Please do not forget the command update-initramfs -u after changing /etc/initramfs-tools/modules. If you have n sound cards, just add the n-1 ones you don not want to use as primary output to that file. The only possible way I can see problems with that when you have two cards of the same type installed. Otherwise you should be fine.

I seem to miss something, or I don't quite understand how it works.

$ cat /etc/initramfs-tools/modules
# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax:  module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod

# Custom Entries
nvidia

Running sudo update-initramfs -u afterwards and rebooting didn't do anything.

So using lspci -v I got these important ones:

01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1) (prog-if 00 [VGA controller]) - This one needs to be on, since I don't have any onboard gpu.

01:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)

03:00.0 Audio device: Creative Labs Sound Core3D [Sound Blaster Recon3D / Z-Series] (rev 01)

So trying to disable it using would have to be:

dir /sys/bus/pci/devices/
0000:01:00.1

Meaning for me the code line would be:

cat /sys/bus/pci/devices/0000:01:00.1/enable
1

echo 0 > /sys/bus/pci/devices/0000:01:00.1/enable

So trying that now, saving this post first, since the other page warned for a bluescreen.

So that didn't work:

sudo echo 0 > /sys/bus/pci/devices/0000:01:00.1/enable
bash: /sys/bus/pci/devices/0000:01:00.1/enable: Permission denied

So I tried:

echo 0 | sudo tee /sys/bus/pci/devices/0000:01:00.1/enable

tee: '/sys/bus/pci/devices/0000:01:00.1/enable': Device or resource busy

So since that doesn't work, I'm trying:

echo nvidia | sudo tee /sys/bus/pci/devices/0000:01:00.1/driver_override
nvidia

to prevent a driver from binding.

Edit:
Update: However, on a reboot this seems to reset to (null).

The following does unbind the driver correctly:

echo '0000:01:00.1' | sudo tee /sys/bus/pci/devices/0000:01:00.1/driver/unbind

As taken from:
https://wiki.debian.org/VGAPassthrough

The card exposes the GPU and the HDMI soundcard. The GPU is at 0000:01:00.0 (pad with 0 on the left), vendor 1002, model 6739. The second needs to be unbound from its driver, in this case (using the port id):

    # echo '0000:01:00.1' | sudo tee /sys/bus/pci/devices/0000:01:00.1/driver/unbind

Edit:
Unfortunately I now noticed that the unbind is not persistent on a reboot, neither is switching to 'off' in pavucontrol.

While running through previous posts, I tried to run alsamixer after unbinding the HDMI Soundcard portion. It didn't like that, so to fix:

$ cat /proc/asound/cards
 1 [Creative       ]: HDA-Intel - HDA Creative
                      HDA Creative at 0xfe204000 irq 16

cat /etc/asound.conf
cat: /etc/asound.conf: No such file or directory

sudo nano /etc/asound.conf

cat /etc/asound.conf
defaults.pcm.card 1
defaults.ctl.card 1

alsamixer

And that's working again, with the soundblaster as default.

So thanks to @swarfendor437 I think we're going in the right direction!

I don't unbind the HDMI integrated soundcard anymore, since the alsa default card is set to the soundblaster and that's working fine for alsamixer.

I have made steps to disable pulseaudio:

sudo nano /etc/pulse/client.conf
;autospawn = yes
autospawn = no

Unfortunately that didn't work, so I looked a bit further:

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
systemctl --user disable pulseaudio.socket
systemctl --user disable pulseaudio.service
systemctl --user mask pulseaudio.socket
systemctl --user mask pulseaudio.service

aplay -L
won't show "default = pulseserver" anymore

Something interesting happened:

speaker-test --buffer 100000 -c 6 -t wav (so without stating the device) will address EVERY speaker correctly including the LFE/subwoofer/bass.

However, every other application doesn't know how to handle this and thinks sound is completely disabled. So have to figure that bit out still.

@swarfendor437
I think I'm still missing something. I installed Synaptic and searched for Alsa, marked and installed the following:

alsa-firmware-loaders (version 1.1.7-1ubuntu1) will be installed
alsa-oss (version 1.1.8-1) will be installed
alsa-source (version 1.0.25+dfsg-0ubuntu5) will be installed
alsa-tools (version 1.1.7-1ubuntu1) will be installed
alsamixergui (version 0.9.0rc2-1-10build1) will be installed
alsaplayer-alsa (version 0.99.81-2build2) will be installed
alsaplayer-common (version 0.99.81-2build2) will be installed
alsaplayer-daemon (version 0.99.81-2build2) will be installed
alsaplayer-gtk (version 0.99.81-2build2) will be installed
alsaplayer-jack (version 0.99.81-2build2) will be installed
alsaplayer-nas (version 0.99.81-2build2) will be installed
alsaplayer-oss (version 0.99.81-2build2) will be installed
alsaplayer-text (version 0.99.81-2build2) will be installed
alsaplayer-xosd (version 0.99.81-2build2) will be installed
apulse (version 0.1.12-2) will be installed
autopoint (version 0.19.8.1-10build1) will be installed
debconf-utils (version 1.5.73) will be installed
debhelper (version 12.10ubuntu1) will be installed
dh-autoreconf (version 19) will be installed
dh-strip-nondeterminism (version 1.7.0-1) will be installed
dwz (version 0.13-5) will be installed
fxload (version 0.0.20081013-1ubuntu2) will be installed
gettext (version 0.19.8.1-10build1) will be installed
intltool-debian (version 0.35.0+20060710.5) will be installed
libarchive-cpio-perl (version 0.10-1) will be installed
libarchive-zip-perl (version 1.67-2) will be installed
libaudio2 (version 1.9.4-6build1) will be installed
libcroco3 (version 0.6.13-1) will be installed
libdebhelper-perl (version 12.10ubuntu1) will be installed
libfile-stripnondeterminism-perl (version 1.7.0-1) will be installed
libmad0 (version 0.15.1b-10ubuntu1) will be installed
libmail-sendmail-perl (version 0.80-1) will be installed
libmikmod3 (version 3.3.11.1-4) will be installed
libsub-override-perl (version 0.09-2) will be installed
libsys-hostname-long-perl (version 1.5-1) will be installed
libxosd2 (version 2.2.14-2.1build1) will be installed
module-assistant (version 0.11.10) will be installed
po-debconf (version 1.0.21) will be installed
qasconfig (version 0.22.0-1build1) will be installed
qashctl (version 0.22.0-1build1) will be installed
qasmixer (version 0.22.0-1build1) will be installed
qastools-common (version 0.22.0-1build1) will be installed

However, I am unsure how to set/start ALSA as the required sound output from here. The card to use is visible as default in alsamixer, however applications don't seem to understand they have to use alsa (tried rebooting).

Did you see my post to completely cut off pulse audio from starting? You will need root privileges to edit /etc - create a new folder, 'pulse off' and then copy 'pulseaudio' into it - that is what worked for me - autospawn = no just leads to no sound. I should point out before I did anything with pulseaudio, the wrong sound was coming from wrong speakers - this also happened to me in Devuan 3.1.1 but not in Devuan 3.0.0 and Devuan uses 4.x kernel!

Thank you for your response. Autospawn=no didn't work for me either

I did see, but I also found out about using the 'mask' to disable:

Disabling the service doesn't work. You have to also mask it:

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
systemctl --user disable pulseaudio.socket
systemctl --user disable pulseaudio.service
systemctl --user mask pulseaudio.socket
systemctl --user mask pulseaudio.service

With more info here:

`mask` is a stronger version of `disable`. Using `disable` all symlinks of the specified unit file are removed.
If using `mask` the units will be linked to `/dev/null. `The advantage of `mask` is to prevent any kind of activation, even manual.

However, I will try moving the folders as well.

The wrong sound from speakers shouldn't be an issue, since speaker-test is working fine without pulse started and using default card settings.

Turning off Pulse:

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service

systemctl --user disable pulseaudio.socket
Removed /home/media/.config/systemd/user/sockets.target.wants/pulseaudio.socket.

systemctl --user disable pulseaudio.service
Removed /home/media/.config/systemd/user/default.target.wants/pulseaudio.service.

systemctl --user mask pulseaudio.socket
Created symlink /home/media/.config/systemd/user/pulseaudio.socket → /dev/null.

systemctl --user mask pulseaudio.service
Created symlink /home/media/.config/systemd/user/pulseaudio.service → /dev/null.

mkdir "/etc/pulse off"
sudo mv /etc/pulse/ "/etc/pulse off/"

dir /etc/ | grep pulse
apport			       hosts.deny	    pulse\ off

Update
Rebooted, checked pavucontrol for pulse:

As with masked, before actions it would display default, pulse:

$ aplay -L
default
    Playback/recording through the PulseAudio sound server

now it shows as first entry, and pulse is gone:

$ aplay -L
surround21
    2.1 Surround output to Front and Subwoofer speakers

So with pulse disabled, I double-checked alsamixer,

Sound does get played through 'default' playback when using speaker-test:

$ speaker-test --buffer 100000 -c 6 -t wav

speaker-test 1.2.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Requested buffer time 100000 us
Periods = 4
was set period_size = 1024
was set buffer_size = 5120
 0 - Front Left
 4 - Front Center
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
 5 - LFE
Time per period = 8,533683

However, any other application doesn't have sound, spotify, vlc, firefox.

Spotify just fails, and says the file is not available even though internet access is no problem. Guess it just doesn't have better error-messages.

VLC luckily does:
alsa error: cannot open ALSA device "default": No such file or directory
main error: module not functional
main error: failed to create audio output

So three of main applications used, don't have sound. Though firefox would have been understandable, since they dropped ALSA support, I read up and found out that's what "apulse" was for and that's installed:

apulse is already the newest version (0.1.12-2).

@swarfendor437 using "Alsaplayer" specifically to play a test mp3 does work, but haven't found out how to test specific speakers in the surround setup.

Test file: Sample .mp3 download | File Examples Download

I tried running VLC with apulse vlc and play an audio file.

However it gives me:

ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
[000055d2e4966560] alsa audio output error: cannot open ALSA device "default": No such file or directory
[000055d2e4966560] main audio output error: module not functional
[00007f5924c14700] main decoder error: failed to create audio output

Even though the file exists without any issue:

$ dir /usr/share/alsa/ alsa.conf alsa.conf.d cards init pcm pulse-alsa.conf speaker-test topology ucm ucm2 utils.sh

Tried Firefox this way as well, with apulse firefox, and got this in the terminal:

can't get initial hw parameters for playback device "default"

Which is a message I have seen before and I'm not sure how to fix this.

Also, I can't believe I would have to run every app with terminal and "apulse" in front of it.

Because I use KDE the surround sound channels don't show. Even with apulse installed you won't get sound out of Firefox - use FlashPeak Slimjet Web browser - it's a Debian package (https://www.slimjet.com/). For Video and Audio Kaffeine has no issues. Other audio app that works is Audacious.

1 Like

I have found an issue with sound, if I manually adjust the dound to HDMI it works fine - next time I boot no sound until I make that same adjustment.
image
Next boot another selection any tips?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.