The officially official Devuan Forum!

You are not logged in.

#1 2023-10-31 10:12:02

Charon795
Member
Registered: 2023-08-25
Posts: 55  

no sound on gnuinos

Hi all! Installed "Gnuinos" today - a distribution approved by the Free Software Foundation
And I ran into a problem: I have no sound.
In xfce, amixer-gtk is installed instead of pulseaudio. I tried playing with it in different ways, but nothing changes
I tried entering the following in the terminal to see the list of available devices:

 aplay -l
** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC3223 Analog [ALC3223 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I am using laptop inspition7537
It has the following audio controllers:
Haswell-ULT HD Audio Controller and 8 Series HD Audio Controller
If I understood correctly, the problem is the lack of some drivers, but I don’t even know where to get them (I couldn’t find anything on the Intel website)

Offline

#2 2023-10-31 10:58:03

yemuyin
Member
Registered: 2023-09-14
Posts: 16  

Offline

#3 2023-10-31 11:07:48

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,253  

Re: no sound on gnuinos

The "problem" is that the machine has 2 cards and the ALSA default setup uses card 0 for playback.
The remedy is to change that to use card 1.
One way to do that (when there is a single user involved) is to make a file ~/.asoundrc that contains such reassignments, e.g.:

pcm.!default card 1
ctl.!default card 1

Note that the file allows comments as lines starting with '#'.

Read more about it at https://www.alsa-project.org/wiki/Asoundrc

EDIT: "pcm" refers to the audio channels (playback and recording) whereas "ctl" refers to "control knobs". ALSA is hugely configurable with an overly flexible configuration language and I believe anyone trying to delve into it very quickly enters into a state of deep confusion. Unfortunately.

Offline

#4 2023-10-31 13:28:55

Charon795
Member
Registered: 2023-08-25
Posts: 55  

Re: no sound on gnuinos

I created a file in /home/*** and pasted the following command into it then renamed the file to .asoundrc.

 pcm.!default card 1
ctl.!default card 1 

Then I restarted the computer, but there was still no sound, so now amixer-gtk does not work.

I tried to write a command from the site
https://www.alsa-project.org/wiki/Asoundrc.

 pcm. !default {
    type hw
    card "Haswell-ULT HD Audio Controller" 
}

ctl. !default {
    type hw
    card "8 Series HD Audio Controller" 
}

no result either.

Last edited by Charon795 (2023-10-31 13:33:10)

Offline

#5 2023-10-31 13:34:01

Charon795
Member
Registered: 2023-08-25
Posts: 55  

Re: no sound on gnuinos

ps: the issue has not been resolved, how to remove the mark

Offline

#6 2023-10-31 15:11:20

golinux
Administrator
Registered: 2016-11-25
Posts: 3,318  

Re: no sound on gnuinos

@Charin795 . . . done. You could probably have edited the post yourself . . .

Offline

#7 2023-10-31 20:33:42

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,253  

Re: no sound on gnuinos

I was wrong and too sloppy to actually test my suggestion.
It should really say

defaults.pcm.card 1
defaults.ctl.card 1

There is the tool qasconfig that presents the raw current ALSA configuration. I find it somewhat useful on occation (even if I don't fully understand it), but it in particular tells the configuration effect  of changes to ~/.asoundrc.

EDIT: corrected to say qasconfig as it should have been.

Offline

#8 2023-10-31 20:55:22

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 230  
Website

Re: no sound on gnuinos

When amixer-gtk is launched without arguments, i.e. without specifying the audio device, it'll try to auto-detect the one capable for playback streaming via snd_pcm_open (...) that creates a handle and opens a connection to the audio interface. The selected card is printed in the command output together with the mixer controls. However, you can also specify the card in the command line if you wish. For example:

$ amixer-gtk --card 0 --systray
Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'Speaker',0
Simple mixer control 'Speaker+LO',0
Simple mixer control 'PCM',0
Simple mixer control 'Front Mic',0
Simple mixer control 'Front Mic Boost',0
Simple mixer control 'Line Out',0
Simple mixer control 'Beep',0
Simple mixer control 'Capture',0
Simple mixer control 'Auto-Mute Mode',0
Simple mixer control 'Loopback Mixing',0
Simple mixer control 'Rear Mic',0
Simple mixer control 'Rear Mic Boost',0
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Speaker',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'Speaker+LO',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB]
  Front Right: Playback 87 [100%] [0.00dB]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Front Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Line Out',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'Beep',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 0 [0%] [-16.50dB] [off]
  Front Right: Capture 0 [0%] [-16.50dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Speaker Only' 'Line Out+Speaker'
  Item0: 'Line Out+Speaker'
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Rear Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]

Device: hw:0
'Master',0
'Headphone',0
'Speaker',0
'Speaker+LO',0
'PCM',0
'Front Mic',0
'Front Mic Boost',0
'Line Out',0
'Beep',0
'Capture',0
'Auto-Mute Mode',0
'Loopback Mixing',0
'Rear Mic',0
'Rear Mic Boost',0
(...)

If you work systematically, things will come by itself (Lev D. Landau)

Offline

#9 2023-11-01 07:04:18

aluma
Member
Registered: 2022-10-26
Posts: 646  

Re: no sound on gnuinos

Maybe I'm wrong, but in my opinion it's not a matter of settings.

The desktop with Audigy2 under Chimaera worked with alsa out of the box, but after updating to Daedalus it stopped.

And this is a netbook with Daedalus

root@AA:/etc# cat /proc/asound/cards
 0 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xf0244000 irq 27
 1 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xf0240000 irq 16

uly_e@AA:~$ cat /etc/asound.conf
defaults.pcm.card 1
defaults.ctl.card 1

@AA:~$ aplay -D hw:1,0 Noise.wav
Playing WAVE 'Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1358: Channels count non available
 
uly_e@AA:~$ cat ./.alsactl.conf
#
# ALSA library configuration file for alsactl tool
# (/usr/share/alsa tree is not necessary for alsactl)
#

ctl.hw {
        @args [ CARD ]
        @args.CARD {
                type string
                default "1"
        }
        type hw
        card $CARD
}

uly_e@AA:~$ cat ./.asoundrc
pcm.!default {
  type hw
  card 1
             }

ctl.!default {
   type hw
  card 1
             }

Offline

#10 2023-11-01 08:08:26

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,253  

Re: no sound on gnuinos

You'd probably be better off playing on "plughw" rather than "hw" as it includes audio format translations.

But, when the card selection is done, the next is to look at the amixer settings.

Offline

#11 2023-11-01 09:09:41

aluma
Member
Registered: 2022-10-26
Posts: 646  

Re: no sound on gnuinos

ralph.ronnquist wrote:

You'd probably be better off playing on "plughw" rather than "hw" as it includes audio format translations...

Thank you very much, you are right!
I take my words back.
"plughw" works, after this command the sound from alsa started working.

Regards.

Offline

#12 2023-11-01 10:15:01

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 230  
Website

Re: no sound on gnuinos

aluma wrote:
ralph.ronnquist wrote:

You'd probably be better off playing on "plughw" rather than "hw" as it includes audio format translations...

Thank you very much, you are right!
I take my words back.
"plughw" works, after this command the sound from alsa started working.

Regards.

Does amixer-gtk work with plughw, or are you using qasmixer instead? The ALSA amixer command doesn't work in my computer with this device:

$ amixer -D plughw
ALSA lib control.c:1528:(snd_ctl_open_noupdate) Invalid CTL plughw
amixer: Mixer attach plughw error: No such file or directory

If you work systematically, things will come by itself (Lev D. Landau)

Offline

#13 2023-11-01 11:10:37

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,253  

Re: no sound on gnuinos

I guess you mistakenly copied his ".asoundrc" and replaced "hw" with "plughw"... that's not what to do.
Rather you should use my (last) suggested ".asoundrc" to make sure the right card is selected for audio output. Then use "aplay -D plughw ..." for playing, because that PCM has audio format translations to map any input format into the format "hw" needs. ("plughw" channels audio to/from "hw" as its slave PCM)

EDIT: I'm not good at guessing and confused myself about "amixer" vs "aplay". There is no "plughw" CTL, and one would rather use amixer with the "hw" CTL. I.e., playback to "plughw" with mixer controls for "hw"

Offline

#14 2023-11-01 12:56:47

aluma
Member
Registered: 2022-10-26
Posts: 646  

Re: no sound on gnuinos

aitor wrote:

Does amixer-gtk work with plughw, or are you using qasmixer instead? The ALSA amixer command doesn't work in my computer with this device:

$ amixer -D plughw
ALSA lib control.c:1528:(snd_ctl_open_noupdate) Invalid CTL plughw
amixer: Mixer attach plughw error: No such file or directory

I use TDE DE, so there is kmix. We have our own arts sound server.
Just ran the command

aplay -D plughw:1,0 Noise.wav 

And everything worked.
Before that, I added the /etc/asound.conf file and edited the files in my home directory. Their content is in the post above.

Edit. Essentially kmix-GUI amixer if arts works through alsa.

Edit. Using the same method, I returned sound without pulseaudio on my desktop with Audigy2.

Last edited by aluma (2023-11-01 13:33:10)

Offline

#15 2023-11-02 00:13:26

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,253  

Re: no sound on gnuinos

Just for the wider audience: it' not a good idea to redefine the "hw" PCM. (If it works for you then you should keep it)

The most common way to set the default card is by an ~/.asoundrc or ~/.config/alsa/asoundrc with content

defaults.pcm.card 1
defaults.ctl.card 1

Of course, that applies for that user only. A system-wide setting would be to add the same in /etc/asound.conf (or any of the other places that ALSA configuration loader looks in).

Offline

#16 2023-11-03 15:53:02

greenjeans
Member
Registered: 2017-04-07
Posts: 542  
Website

Re: no sound on gnuinos

This is what worked for me when I ran my pure ALSA system, .asoundrc:

pcm.!default {
        type hw
        card 1
 }

ctl.!default {
        type hw
        card 1
 }

Last edited by greenjeans (2023-11-03 16:28:58)


https://sourceforge.net/projects/vuu-do/
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.

Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#17 2023-11-03 16:43:38

aluma
Member
Registered: 2022-10-26
Posts: 646  

Re: no sound on gnuinos

I'm not an alsa guru, just my understanding of the situation.
In the file /usr/share/alsa/alsa.conf there are lines

  defaults.ctl.card 0
defaults.pcm.card 0
defaults.pcm.device 0

  Therefore, if there is only one sound card, then the /etc/asound.conf file is not needed to select it.
The sound on my desktop with one card works without this file.

The netbook has two audio devices - HDMI and the actual sound card. Hdmi is defined as the first device, so to output sound to a speaker or headphones you need this same selection file /etc/asound.conf.

Here we can add that due to the flexibility of alsa settings in different wiki there are different tips, including placing the contents of the selection file (/etc/asound.conf) in the home directory under the name /.asoundrc.
This will work if all other settings in  /usr/share/alsa/alsa.conf   are are suitable for the specific case.

Last edited by aluma (2023-11-03 17:24:13)

Offline

Board footer