Skip to main content
Topic: Dinit services, alsa and thunderbolt (Read 738 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Dinit services, alsa and thunderbolt

I can't do this anymore. I read tons of documentation pages, forum and IA help and I can't find a solution for this. I am literally getting crazy.
So, my main problem is alsa that won't charge and I can't use my thunderbolt interface.
About alsa: dinitctl marks it as {x}. If I try to reload or restart it prints a message as status 99.
Modprobe command says that there is no alsa module inside the kernel's directory. So, I tried to export the path for alsa (but as a noob I searched for it with nemo and there are a huge amount of directories about alsa... I tried to set the one with the module extension...). Nothing happen.
About thunderbolt: boltctl prints my interface as authorized and it is marked as running (green dot next to the interface's name). I tried boltctl enroll, but it was already enrolled.

Then, others modules are not working properly:
- fsck {–}
- early-modules.target {x}
- modules {x}
- early-fs-fstab.target {x}

I'm running a real time kernel, dinit and xfce.
The stock kernel load everything (maybe just alsa won't load, i don't remember) but I actually need the real time one.

Please help!
Thanks in advance


Re: Dinit services, alsa and thunderbolt

Reply #1
You need to provide more details. Where there are errors post them.

I know little about dinit but on openrc you can turn on debug logging and then look in the log to hopefully see why the various services are failing to start.

Which real time kernel are you running ?
It's maybe that the  real time kernel is missing some modules that that standard kernel has?
It's also possible that you messed up the installation of realtime kernel and the bootloader is not loading the kernel you expect and that kernel is looking for the wrong set of modules? This has happened to users on this forum  before.
The output of these commands could show if the latter is the case.
Code: [Select]
uname -a
ls -al /usr/lib/modules

Re: Dinit services, alsa and thunderbolt

Reply #2
Code: [Select]
hostname:[user]:~$ uname -a
ls -al /usr/lib/modules

Linux artaudio 6.6.23.28.realtime1-7-rt-lts #1 SMP PREEMPT_RT Wed, 07 Aug 2024 05:05:58 +0000 x86_64 GNU/Linux
totale 220
drwxr-xr-x   6 root root    118 22 ago 09.53 .
drwxr-xr-x 185 root root 151552 22 ago 09.53 ..
drwxr-xr-x   2 root root     29 22 ago 09.53 6.10.3-artix1-2
drwxr-xr-x   5 root root   4096 22 ago 09.53 6.10.6-artix1-1
drwxr-xr-x   3 root root   4096 10 ago 11.08 6.6.23.28.realtime1-7-rt-lts
drwxr-xr-x   3 root root   4096 10 ago 11.07 6.7.0.6.realtime1-7-rt

Re: Dinit services, alsa and thunderbolt

Reply #3
You can add log to dinit services:
Code: [Select]
cat /etc/dinit.d/alsa 
type         = scripted
command      = /bin/alsactl restore
stop-command = /bin/alsactl store
restart      = false
depends-on   = local.target
before       = login.target
#Add log
logfile    = /var/log/dinit/alsa.log

Re: Dinit services, alsa and thunderbolt

Reply #4
I added the log, but I guess it won't works because alsa module is not loading, so it doesn't share any infos to the log.

Code: [Select]
hostname:[user]:~$ cat /etc/dinit.d/alsa 
type         = scripted
command      = /bin/alsactl restore
stop-command = /bin/alsactl store
restart      = false
depends-on   = local.target
before       = login.target

#Log aggiunto su suggerimento forum Artix
logfile      = /var/log/dinit/alsa.log


Indeed, after a reboot, the alsa.log that I created is empty. I also noticed that each file in /var/log has got a .gz file. I created one for the alsa.log too.
Is there another a way to check system problems? Or, maybe, could be a solution recompiling a kernel with alsa installed as part of the kernel instead as module?

Re: Dinit services, alsa and thunderbolt

Reply #5
Alsa service fails for me too:
Code: [Select]
dinitctl start alsa
Service 'alsa' failed to start.
Reason: service process terminated before ready: exited - status 99
But I have log in /var/log/dinit/alsa.log did you realod the service?

No alsa module:
Code: [Select]
modprobe alsa
modprobe: FATAL: Module alsa not found in directory /lib/modules/6.10.3-artix1-2
Is it supposed to exist?

Re: Dinit services, alsa and thunderbolt

Reply #6
Quote
did you realod the service?

I did. I tried all combinations I found... Enable, start, init...
Nothing works.
Maybe I have to install some deps, or (and I hope is not this...) nvidia drivers breaks something (but I tried to uninstall them. Indeed, for some others services in the list above raises error about nvidia-uvm (?). Maybe I have to set something about multimedia bus?

Re: Dinit services, alsa and thunderbolt

Reply #7
Dinit only needs the folder (/var/log/dinit/) to exist, it does not need you to make the log etc.

The service fails for me too, I have the log in var/log/dinit/alsa.log after reloading the service.
So maybe you have it too and that could help you find the problem.

Re: Dinit services, alsa and thunderbolt

Reply #8
Afaik there's no module named alsa. ALSA is a set of built-in Linux kernel modules. Corresponding modules are named snd-something and load automaticaly. DInit's and other init's start scripts/services for alsa are just restore ALSA volume levels. So before trying to repair init service start I'd try to tune ALSA itself. https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture

Re: Dinit services, alsa and thunderbolt

Reply #9
I'm still on  it!
So, tryin' to understand how to solve it, maybe - and I want to repeat - maybe, I guess, I think, I suppose that could be involved vga_switcheroo.
The command
Code: [Select]
dmesg | grep vga_switcheroo
raises this:
Code: [Select]
[    9.853596] snd_hda_intel 0000:21:00.1: Handle vga_switcheroo audio client
Indeed, days ago
Code: [Select]
lspci
printed this:
Code: [Select]
[xx:xx.x]Non-VGA unclassified device: Device 1d4b:a181 (rev 01)
.
So, AI "told me" this:
"The message you provided, snd_hda_intel 0000:21:00.1: Handle vga_switcheroo audio client, indicates that the kernel module snd_hda_intel is handling an audio client associated with vga_switcheroo. This is a system used in some laptop configurations with hybrid graphics (for example, an integrated GPU and a dedicated GPU) to manage the use of audio and video resources.

Here are some insights into what it means and how it might affect the recognition of your audio interface:

    VGA Switcheroo: This is a mechanism that allows switching between different GPUs in a system. When an audio device is associated with a GPU, it may be necessary to manage audio settings specifically for that GPU.

    Unrecognized audio interface: If your Thunderbolt audio interface is not being recognized, it could be that the system is trying to manage audio through the GPU instead of through the dedicated audio interface. This can happen if the audio interface is configured to be used as an audio client of the GPU.

    Check audio settings: You can try disabling the dedicated GPU (if present) to see if the audio interface is recognized correctly. This can be done through the BIOS/UEFI or using tools like vga_switcheroo.

    Check drivers: Make sure you have the correct drivers for your audio interface and that there are no conflicts between the audio drivers of the GPU and those of your Thunderbolt interface.

    ALSA configuration: You may need to modify the ALSA configuration to force the use of your Thunderbolt audio interface. Check the ALSA configuration files (/etc/asound.conf or ~/.asoundrc) for any settings that might affect the recognition of the interface.
"

ALSA configuration seems to be futile and I can't realize well how to use vga_switcheroo.

Is it possible that snd_hda_intel is occupied by the nvidia audio and this could "interfere" with thunderbolt?
Poor nooby question, I know...

Re: Dinit services, alsa and thunderbolt

Reply #10
Today I found the HDAJackRetask tool. So, I'm wondering if the configuration of this could  involve thunderbolt. I figured out that both NVidia cards and thunderbolt use intel technology and this could override the thunderbolt functionality.
Then, I also found a file called "INTEL_WMI_THUNDERBOLT"", but when opened is empty. Is there a specific way to set it for audio/ALSA?
Considerations about it?

Re: Dinit services, alsa and thunderbolt

Reply #11
I have no experience with thunderbolt but i somehow feel that you're doing something wrong. First, which exactly is your problem, is it no audio? Which is your hardware? Are you sure that it works on linux? Did you try another linux-base OSes? Which is your dmesg output when you connect you thunderbolt interface? Did you try with pulseaudio or pipewire?