Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Alsasound: error: failed to import hw [ONGOING]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1159
Location: Online

PostPosted: Sat Dec 24, 2022 7:07 pm    Post subject: Alsasound: error: failed to import hw [ONGOING] Reply with quote

On boot:
Code:
alsa-lib /home/user/dir/portage/tmp/portage/media-libs/alsa-lib-1.2.7.2/work/alsa-lib-1.2.7.2/src/ucm/main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2



media-libs/alsa-lib 1.2.7.2 installed


# rc-update show| grep alsa

Code:
 alsasound |      default



cat /proc/asound/cards

Code:
 0 [Audigy         ]: Audigy - SB Audigy 1 [SB0090]
                      SB Audigy 1 [SB0090] (rev.3, serial:0x511102) at 0xe880, irq 16
 1 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfcff8000 irq 28
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe5f8000 irq 17
 3 [H              ]: USB-Audio - Logitech G933 Gaming Wireless H
                      Logitech Logitech G933 Gaming Wireless H at usb-0000:00:1a.7-5.3, full speed
 4 [Q9000          ]: USB-Audio - QuickCam Pro 9000
                      Logitech, Inc. QuickCam Pro 9000 at usb-0000:00:1d.7-6, high speed



This directory is empty:
/var/run/alsasound/

Similar problem:
https://forum.manjaro.org/t/alsa-restore-service-not-restoring-sound-correctly/84780

alsactl init

Code:
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
alsa-lib /home/user/dir/portage/tmp/portage/portage/media-libs/alsa-lib-1.2.7.2/work/alsa-lib-1.2.7.2/src/ucm/main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "Audigy" "TriTech TR28602" "AC97a:54524123" "0x1102" "0x0051"
Hardware is initialized using a generic method
Found hardware: "HDA-Intel" "Analog Devices AD1989B" "HDA:11d4989b,10438311,00100300" "0x1043" "0x8311"
Hardware is initialized using a generic method
Found hardware: "HDA-Intel" "Nvidia GPU 99 HDMI/DP" "HDA:10de0099,14623792,00100100" "0x1462" "0x3792"
Hardware is initialized using a generic method
Found hardware: "USB-Audio" "USB Mixer" "USB046d:0a5b" "" ""
Hardware is initialized using a generic method
Found hardware: "USB-Audio" "USB Mixer" "USB046d:0990" "" ""
Hardware is initialized using a generic method


inxi -aA

Code:
Audio:
  Device-1: Intel 82801JI HD Audio vendor: ASUSTeK P5Q Deluxe
    driver: snd_hda_intel v: kernel bus-ID: 1-5.3:5 chip-ID: 046d:0a5b
    bus-ID: 00:1b.0 class-ID: 0300 chip-ID: 8086:3a3e class-ID: 0403
  Device-2: NVIDIA TU116 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 2 speed: 5 GT/s bus-ID: 01:00.1 chip-ID: 10de:1aeb
    class-ID: 0403
  Device-3: Creative Labs EMU10k2/CA0100/CA0102/CA10200 [Sound Blaster
    Audigy Series]
    driver: snd_emu10k1 v: kernel bus-ID: 0b:00.0 chip-ID: 1102:0004
    class-ID: 0401
  Device-4: Logitech G933 Wireless Headset Dongle type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Device-5: Logitech QuickCam Pro 9000 type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 2-6:5 chip-ID: 046d:0990
    class-ID: 0102 serial: 6CB3DD11
  Sound Server-1: ALSA v: k5.15.80-gentoo running: yes
  Sound Server-2: JACK v: 0.125.0 running: no
  Sound Server-3: PulseAudio v: 16.1 running: yes



Also:
https://github.com/alsa-project/alsa-lib/issues/159
https://github.com/alsa-project/alsa-utils/issues/101


Any solutions for gentoo?
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244


Last edited by HeXiLeD on Thu Feb 02, 2023 7:17 pm; edited 3 times in total
Back to top
View user's profile Send private message
garrison
Apprentice
Apprentice


Joined: 18 Mar 2003
Posts: 252

PostPosted: Thu Feb 02, 2023 8:51 am    Post subject: Reply with quote

You can test alsa-lib-1.2.8-r1 which is still not in stable in Gentoo but should fix the issue. Or wait for it to be marked stable soon.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Thu Feb 02, 2023 12:15 pm    Post subject: Reply with quote

Please stop shouting with uppercase letters in the subject line "[UNSOLVED/ONGOING]".
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1159
Location: Online

PostPosted: Thu Feb 02, 2023 5:08 pm    Post subject: Reply with quote

garrison wrote:
You can test alsa-lib-1.2.8-r1 which is still not in stable in Gentoo but should fix the issue. Or wait for it to be marked stable soon.


Code:
>>> Installing (1 of 1) media-libs/alsa-lib-1.2.8-r1::gentoo

>>> Recording media-libs/alsa-lib in "world" favorites file...
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
 # /etc/init.d/alsasound restart
 * WARNING: you are stopping a boot service
 * Storing ALSA Mixer Levels ...                                                                                                                                                                 [ ok ]
 * Restoring Mixer Levels ...
alsa-lib /home/user/portage/tmp/portage/media-libs/alsa-lib-1.2.8-r1/work/alsa-lib-1.2.8/src/ucm/main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2

Current kernel is: 6.1.9-gentoo
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
garrison
Apprentice
Apprentice


Joined: 18 Mar 2003
Posts: 252

PostPosted: Thu Feb 02, 2023 9:28 pm    Post subject: Reply with quote

So, no change with updated alsa-lib it seems.

As noted on the alsa tracker, the message is harmless. You can follow up on alsa tracker if you want.
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1912
Location: 127.0.0.1

PostPosted: Wed May 03, 2023 5:32 pm    Post subject: Reply with quote

Hi,

I also have a Sound Blaster Audigy card :
Code:

$ grep -A 1 '\[Audigy' /proc/asound/cards
 1 [Audigy         ]: Audigy - SB Audigy 1 [SB0092]
                      SB Audigy 1 [SB0092] (rev.3, serial:0x531102) at 0xd000, irq 16


And I also have the exact same error on boot since some months :
Code:

 * Restoring Mixer Levels ...
alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.8-r1/work/alsa-lib-1.2.8/src/ucm/main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2


garrison wrote:

As noted on the alsa tracker, the message is harmless.

Maybe. But harmless errors shouldn't be classified as errors, and should not trigger users on each boot.
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1159
Location: Online

PostPosted: Mon May 08, 2023 4:41 am    Post subject: Reply with quote

Right now the errors have increased for me:

# /etc/init.d/alsasound restart
Code:
 * Storing ALSA Mixer Levels ...                                                                                                                                     
 * Restoring Mixer Levels ...
alsa-lib /home/mike/HD4/portage/tmp/portage/media-libs/alsa-lib-1.2.8-r1/work/alsa-lib-1.2.8/src/ucm/main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
alsactl: set_control:1475: Cannot write control '3:0:0:EMU10K1 PCM Send Routing:0' : Operation not permitted
alsactl: set_control:1475: Cannot write control '3:0:0:EMU10K1 PCM Send Routing:2' : Operation not permitted
alsactl: set_control:1475: Cannot write control '3:0:0:EMU10K1 PCM Send Volume:0' : Operation not permitted
alsactl: set_control:1475: Cannot write control '3:0:0:EMU10K1 PCM Send Volume:1' : Operation not permitted
alsactl: set_control:1475: Cannot write control '3:0:0:EMU10K1 PCM Send Volume:2' : Operation not permitted   


I also started having an ongoing problem which may or may not be related to sound as I am unable to determine what is causing it.
Simply put, from time to time my system freezes and goes on some sort of "hiccups" until it unfreezes but some time later repeats it again.

Usually happens when listening to music but not exclusively. However it is rare when it happens and there is no sound. No idea what is causing it.

I have noticed this error when the system has those hiccups
Code:
Audio device underrun detected.


And
Code:
[ao/pulse] pa_stream_cork() failed: Timeout


As well as:

Code:
pulseaudio[4260]: [alsa-sink-USB Audio] ratelimit.c: 231 events suppressed
pulseaudio[4260]: [alsa-sink-USB Audio] asyncq.c: q overrun, queuing locally
last message buffered 10 times
pulseaudio[4260]: [alsa-sink-emu10k1] asyncq.c: q overrun, queuing locally
pulseaudio[4260]: [alsa-sink-USB Audio] asyncq.c: q overrun, queuing locally
pulseaudio[4260]: [alsa-source-USB Audio] asyncq.c: q overrun, queuing locally
pulseaudio[4260]: [alsa-sink-USB Audio] ratelimit.c: 3257 events suppressed
pulseaudio[4260]: [alsa-sink-USB Audio] asyncq.c: q overrun, queuing locally
last message buffered 13 times
pulseaudio[4260]: [alsa-sink-USB Audio] ratelimit.c: 2665 events suppressed
pulseaudio[4260]: [alsa-sink-USB Audio] protocol-native.c: Failed to push data into queue
last message buffered 10 times
pulseaudio[4260]: [alsa-sink-USB Audio] ratelimit.c: 363 events suppressed
pulseaudio[4260]: [alsa-sink-USB Audio] asyncq.c: q overrun, queuing locally
ast message buffered 10 times
pulseaudio[4260]: [alsa-sink-USB Audio] ratelimit.c: 9 events suppressed
pulseaudio[4260]: [alsa-sink-USB Audio] asyncq.c: q overrun, queuing locally
last message buffered 13 times
pulseaudio[4260]: [alsa-source-USB Audio] asyncq.c: q overrun, queuing locally
pulseaudio[4260]: [alsa-sink-USB Audio] asyncq.c: q overrun, queuing locally
pulseaudio[4260]: [alsa-sink-emu10k1] asyncq.c: q overrun, queuing locally
CROND[15652]: (root) CMD (/usr/lib/sa/sa1 1 1)

_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1912
Location: 127.0.0.1

PostPosted: Mon May 08, 2023 8:51 am    Post subject: Reply with quote

What is your kernel version ? Did you try to downgrade your kernel to a safer (longterm) one ?
Back to top
View user's profile Send private message
krumpf
Apprentice
Apprentice


Joined: 15 Jul 2018
Posts: 175

PostPosted: Mon May 08, 2023 9:57 am    Post subject: Reply with quote

That thread made me realize I never added alsasound service to openrc, and yet sound is working.
Starting it prints the error :
Code:
 # rc-service alsasound start
 * Restoring Mixer Levels ...
alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.8-r1/work/alsa-lib-1.2.8/src/ucm/main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2   


Even after killing the service,
Code:
# rc-service alsasound stop
 * Storing ALSA Mixer Levels ...

sound still works.

Using a XonarD2X, analog outputs
kernel config
Code:
# grep "SND.*=[ym]" /boot/config-6.3.1-gentoo
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=m
CONFIG_SND_SEQ_DEVICE=y
CONFIG_SND_RAWMIDI=m
CONFIG_SND_JACK=y
CONFIG_SND_JACK_INPUT_DEV=y
CONFIG_SND_PCM_TIMER=y
CONFIG_SND_HRTIMER=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_PROC_FS=y
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_CTL_FAST_LOOKUP=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_SEQ_MIDI_EVENT=m
CONFIG_SND_SEQ_MIDI=m
CONFIG_SND_MPU401_UART=m
CONFIG_SND_PCI=y
CONFIG_SND_OXYGEN_LIB=m
CONFIG_SND_VIRTUOSO=m


So I know it seems silly, but I get sound working without starting alsasound service. Still, not sure that would be the case when using HDMI or USB headphones as outputs.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54454
Location: 56N 3W

PostPosted: Mon May 08, 2023 10:28 am    Post subject: Reply with quote

krumpf,

The alsasound service saves the mixer settings on shutdown and restores them when its started.
Sound works without it but after a reboot, the settings will be lost, so everything will be muted.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
krumpf
Apprentice
Apprentice


Joined: 15 Jul 2018
Posts: 175

PostPosted: Mon May 08, 2023 11:18 am    Post subject: Reply with quote

Quote:
Sound works without it but after a reboot, the settings will be lost, so everything will be muted.


Yes, but I used the manual way (alsactl store) to save my settings in /var/lib/alsa/asound.state
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum