Skip to main content
Topic: Dinit services, alsa and thunderbolt (Read 419 times) previous topic - next topic
0 Members and 3 Guests 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