Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: ferran on April 18, 2020, 03:07:54 AM

Title: [Solved] I've got the sound settings crushed.
Post by: ferran on April 18, 2020, 03:07:54 AM
Hello everybody

Due to serious problems I reciently had with my computer (which have largely been solved) much of the /usr/local/etc/alsa directory has disappeared.

I noticed it right away when neither pulseaudio nor alsactl init were working. So I looked for the root of the problem in alsa.tcz

I tried to uninstall alsa.tcz from the computer from Apps browser to reinstall it but I am informed that it does not let me do so. Instead I tried to reinstall alsa.tcz and have it rewrite what is left but it does nothing.

So I don't know what to do now.

Title: Re: I've got the sound settings crushed.
Post by: Juanito on April 18, 2020, 03:27:31 AM
It's not recommended, but in extremis you can boot "base" "norestore" and manually delete the alsa extensions from your tce/optional directory.
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 18, 2020, 04:23:43 AM
It's not recommended, but in extremis you can boot "base" "norestore" and manually delete the alsa extensions from your tce/optional directory.

Who I must to do this (I don't know no idea)?
Title: Re: I've got the sound settings crushed.
Post by: Rich on April 18, 2020, 08:43:53 AM
Hi ferran
... I tried to uninstall alsa.tcz from the computer from Apps browser to reinstall it but I am informed that it does not let me do so. Instead I tried to reinstall alsa.tcz and have it rewrite what is left but it does nothing. ...
Before you can  reinstall  an extension, you must finish  uninstalling it:

1. Click  Apps->Maintenance->Dependencies And Deletions.
2. Click the extension you want removed in the  Select  list.
3. Click  Dependencies->Mark for Deletion

Repeat steps 2 and 3 for any other extensions you want to remove.

4. Check the list in the right panel. If it contains something you want to keep, then select it and click the  Delete Item from list  button.
5. Click  Dependencies->Exit Dependency Check
6. Restart your computer.

When your computer comes back up, you have finished uninstalling the extensions.
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 18, 2020, 12:15:09 PM
Rich I did all this already...

In the right box of Deletions appeared this message:

Quote
alsa-dev.tcz
pavucontrol.tcz
pulseaudio.tcz
alsa.tcz cannot be deleted.


When I did restart the PC alsa was there as before

For your info: currently in /usr/local/etc/alsa/ still remains 2 files:

alsa.conf
asound.state

Obvously when i try to do alsactl init in the terminal shows this:

Code: [Select]

tc@box:~$ alsactl init
alsactl: parse:1669: Unable to open file '/usr/local/share/alsa/init/00main': No such file or directory
tc@box:~$

Title: Re: I've got the sound settings crushed.
Post by: Rich on April 18, 2020, 12:54:21 PM
Hi ferran
OK, I see what's happening. Another installed extension depends on  alsa.tcz.  You can't delete an extension if it is still required
by another extension. Run this:
Code: [Select]
grep -l alsa.tcz /etc/sysconfig/tcedir/optional/*.dep | cut -d/ -f6Thats a lowercase  L  after  grep.

That will give you a list of extensions you need to remove. If you remove them,  alsa.tcz  will automatically be removed.
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 19, 2020, 05:56:42 AM
Rich it's done. I already uninstalled and reinstalled alsa.tcz but the command alsactl init   does not run yet.

Code: [Select]

tc@box:~$ alsactl init
alsactl: parse:1669: Unable to open file '/usr/local/share/alsa/init/00main': No such file or directory

tc@box:~$ cd /usr/local/share/alsa/
tc@box:/usr/local/share/alsa$ ls
files


Only with the reinstallation of alsa.tcz it seems that we have not managed to include the subdirectory init/

Title: Re: I've got the sound settings crushed.
Post by: Rich on April 19, 2020, 06:55:44 AM
Hi ferran
Code: [Select]
tc@box:~$ alsactl init
alsactl: parse:1669: Unable to open file '/usr/local/share/alsa/init/00main': No such file or directory ...
You are missing  alsa-config.tcz.
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 19, 2020, 07:38:19 AM
I installed alsa-config.tcz already

Now /usr/local/etc/alsa/ and /usr/local/share/alsa/ contains:

Code: [Select]

tc@box:~$ cd /usr/local/etc/alsa/
tc@box:/usr/local/etc/alsa$ ls
asound.state  cards  pcm

tc@box:/usr/local/etc/alsa$ cd /usr/local/share/alsa/
tc@box:/usr/local/share/alsa$ ls
init  speaker-test

tc@box:/usr/local/share/alsa$ alsactl init
sh: alsactl: not found


We're making progress but there's still something missing.

Title: Re: I've got the sound settings crushed.
Post by: Juanito on April 19, 2020, 07:46:33 AM
You should see something like this when alsa-config is loaded before alsa:
Code: [Select]
$ sudo alsactl init
Found hardware: "HDA-Intel" "Intel Haswell HDMI" "HDA:80862807,80860101,00100000" "0x1028" "0x05ca"
Hardware is initialized using a generic method
Title: Re: I've got the sound settings crushed.
Post by: Rich on April 19, 2020, 07:54:01 AM
Hi ferran
Code: [Select]
...
tc@box:/usr/local/share/alsa$ alsactl init
sh: alsactl: not found
Now it looks like you are missing  alsa.tcz.
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 19, 2020, 08:32:27 AM
juanito, Rich

I downloaded again alsa.ctz, after I rebooted and now alsactl init shows:

Code: [Select]

#### Testing successfully alsactl init ####

tc@box:~$ alsactl init
Found hardware: "HDA-Intel" "Realtek ALC663" "HDA:10ec0663,10431903,00100001 HDA:11c11040,10431636,00100200 HDA:10de0007,10de0101,00100100" "0x1043" "0x1903"
Hardware is initialized using a generic method
tc@box:~$

#### Testing successfully a sound text ####

tc@box:~$ speaker-test [-Ddefault:1] -c2 -t wav -l

speaker-test 1.2.1

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 8192
Period size range from 1024 to 1024
Using max buffer size 8192
Periods = 4
was set period_size = 1024
was set buffer_size = 8192
 0 - Front Left
 1 - Front Right
Time per period = 2,860001

#### Storing alsactl into /opt/bootlocal.sh and /opt/.filetool.lst

tc@box:~$ sudo alsactl store

tc@box:~$ echo alsactl restore >> /opt/bootlocal.sh

tc@box:~$ echo usr/local/etc/alsa/asound.state >> /opt/.filetool.lst


I tried to restart pulseaudio but i can't

Code: [Select]

tc@box:~$ pulseaudio -vv

pulseaudio: error while loading shared libraries: libpulsecore-13.0.so: cannot open shared object file: No such file or directory


Should I download pulseaudio.tcz now?
Title: Re: I've got the sound settings crushed.
Post by: Rich on April 19, 2020, 09:04:12 AM
Hi ferran
Pulseaudio looks like it is installed since it responded to the  pulseaudio -vv  command. One of its dependencies is not installed.
You are missing  libpulseaudio.tcz.
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 19, 2020, 09:31:32 AM
I downloaded libpulseaudio.tcz , i rebooted , but when i wrote into terminal pulseaudio -vv still don't works (the message shown is the same as before)




Title: Re: I've got the sound settings crushed.
Post by: Rich on April 19, 2020, 09:45:22 AM
Hi ferran
What do these commands return:
Code: [Select]
ls -l /etc/sysconfig/tcedir/optional/*pulse*
cat /etc/sysconfig/tcedir/optional/pulseaudio.tcz.dep
Title: Re: I've got the sound settings crushed.
Post by: aus9 on April 19, 2020, 09:49:50 AM
ferran....have you completed all the steps in the pulseaudio info file?

What is the main reason why you need pulseaudio?

2) if interested I can run vlc without pulseaudio....I get errors but I ignore them ;)

do you need pulseaudio for firefox by any chance?
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 19, 2020, 10:10:36 AM
Rich, It shows this

Code: [Select]
tc@box:~$ ls -l /etc/sysconfig/tcedir/optional/*pulse*
-rw-rw-r-- 1 tc staff  565248 de març  29 23:08 /etc/sysconfig/tcedir/optional/libpulseaudio.tcz
-rw-rw-r-- 1 tc staff      78 de març  29 23:08 /etc/sysconfig/tcedir/optional/libpulseaudio.tcz.dep
-rw-rw-r-- 1 tc staff      52 de març  29 23:08 /etc/sysconfig/tcedir/optional/libpulseaudio.tcz.md5.txt
-rw-rw-r-- 1 tc staff 1105920 de març  29 23:08 /etc/sysconfig/tcedir/optional/pulseaudio.tcz
-rw-rw-r-- 1 tc staff      49 de març  29 23:08 /etc/sysconfig/tcedir/optional/pulseaudio.tcz.md5.txt

c@box:~$ cat /etc/sysconfig/tcedir/optional/pulseaudio.tcz.dep
cat: /etc/sysconfig/tcedir/optional/pulseaudio.tcz.dep: No such file or directory
tc@box:~$


aus9

1) Well... really I don't know certanly... since i came to TC i thinked it's necessary to run pavucontrol.tcz (the volume control extension).

2) I uses Vivaldi now.Whitout pavucontrol I couldn't hear nothing from Youtube videos. Maybe vlc works well... but I don't know yet.  :-\
Title: Re: I've got the sound settings crushed.
Post by: Juanito on April 19, 2020, 10:36:50 AM
If you downloaded the pulseaudio extension using the apps gui or tce-load, you should have a file named pulseaudio.tcz.dep

I guess the best thing to do is use the apps gui to delete pulseaudio and then download it again.
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 19, 2020, 03:12:21 PM
Done juanito.

After I did

Code: [Select]
sudo pulseaudio -vv

But pavucontrol not works. It shows an extense message:

Quote
Connection to PulseAudio failed. Automatic retry in 5s

In this case this is likely because PULSE_SERVER in the Environment/X11 Root Window Propierties or default server in client.conf is misconfigured.

This situation can also arise when PulseAudio crashes and left stale details in X11 Root Window. If this is the case then PulseAudio should autospawn again, or if is not configured you should run start-pulseaudio-x11 manually

Now what?  :'(

By the way: I just can listen and watch the youtube videos, but with headphones because the speakers are still heard at a very low volume. We're moving on :D


Title: Re: I've got the sound settings crushed.
Post by: aus9 on April 19, 2020, 06:32:57 PM
gurus are sleeping so there is at least one error.

Quote
sudo pulseaudio -vv

the info file clearly shows a $ preceding that command which means runs as local user

lets check if there are any typos in your files too?

Code: [Select]
cat ~/.X.d/dbus
cat  /opt/bootlocal.sh


good luck
Title: Re: I've got the sound settings crushed.
Post by: aus9 on April 19, 2020, 08:13:28 PM
I wrote poorly

I mean info file does not show sudo....remove sudo please
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 20, 2020, 07:22:16 AM
Hi again to everybody.

@aus9 you did right in a great part, because i needed to read the pulseaudio.tcz's info. So i created the files .X.d/pulseaudio and .X.d/dbus as if is indicated. No problems with bootlocal.sh. Only we need to start pulseaudio -vv like as sudo from the console (Ctrl-F1) and after to do startx.

Resuming of situation: pulseaudio no works because some modules testing failed. I need to aborted the testing (after a while down).

Yesterday I checked all dependencies of pulseaudio.tcz and libpulseaudio.tcz. I installed the flac.tcz, the rest of extensions was installed already

So the pavucontrol not works too (see above the error message that shows it)

Title: Re: I've got the sound settings crushed.
Post by: Juanito on April 20, 2020, 07:57:23 AM
"pulseaudio -vv" is only for testing and should not be run as root.
Title: Re: I've got the sound settings crushed.
Post by: Juanito on April 20, 2020, 08:34:59 AM
If you want to test that you have all the required dependencies and that pulseaudio works, do this from a terminal window in the gui - there is no need to start the dbus or pulseaudio daemons first or create anything in ~/.X.d:
Code: [Select]
$ tce-load -i alsa-config pavucontrol
$ pavucontrol

If you do not get an errors and pavucontrol opens, you should then be able to play a sound file and hear it.
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 20, 2020, 03:19:41 PM
juanito, yes... but don't  :'(

Code: [Select]
tc@box:~$ tce-load -i alsa-config pavucontrol
alsa-config is already installed!
pavucontrol is already installed!
tc@box:~$ pavucontrol
Home directory not accessible: Permission denied
Home directory not accessible: Permission denied
Home directory not accessible: Permission denied
Home directory not accessible: Permission denied
Home directory not accessible: Permission denied
Home directory not accessible: Permission denied
Home directory not accessible: Permission denied
tc@box:~$

Title: Re: I've got the sound settings crushed.
Post by: ferran on April 20, 2020, 09:04:46 PM
I'm beginning to think you're no longer interested in the problem...

Okay. At this point, what would happen if I downloaded vlc3.tcz? Can you regulate the volume as well or not?


Title: Re: I've got the sound settings crushed.
Post by: aus9 on April 20, 2020, 10:07:16 PM
@ferran
Juanito is in a different timezone to me and I suspect different to you. In the meantime thanks for sharing your errors with us.

Quote
So i created the files .X.d/pulseaudio and .X.d/dbus
No wrong! the info file on 32 bit says
Quote
When it is running correctly
                echo "start-pulseaudio-x11" > ~/.X.d/pulseaudio

but I am pretty sure you are not yet at "running correctly"

pulseaudio attempts to use home configs or system configs.

Quote
Home directory not accessible: Permission denied

right we need to address this first please.  For me 
ls -al .config | grep pulse   NOT OP
drwx-w----    2 tc       staff         4096 Apr 19 22:45 pulse/
ls -al /home/ | grep tc   # NOT OP
drwxr-s---   20 tc       staff         4096 Apr 21 01:48 tc

so can you reveal below permissions

Code: [Select]
ls -al .config | grep pulse
ls -al /home

I am sure when Juanito has time he might improve my answers

In addition, purely voluntary are you using a full persistent home dir or does home get backed up to your "mydata" file?
ie  are you using a boot code  home=<something> 
and if you can catch my drift....trying to use a fully persistent home and backing up to mydata.tgz would seem to be a waste of time IMHO

I am on 64 bit which has vlc so I can not test vlc3 but as Juanito updated it ...no reason why it would not work so why not try it?
Speaking of which.....do you have a PC setup with 32 bit TC and the same PC set up with 64 bit
or no 64 bit etc?
Title: Re: I've got the sound settings crushed.
Post by: Juanito on April 21, 2020, 01:55:11 AM
I'm beginning to think you're no longer interested in the problem...
I'm not sure why you would think that given several forum users have posted suggestions.

The file permissions on your home directory seem to be incorrect and it seems likely one or more extensions or their dep files are missing.

I suggest you reboot without any alsa or pulseaudio extensions set "onboot" or "ondemand", without starting the dbus or pulseaudio daemons and without creating anything in ~/.X.d, and then:
Code: [Select]
$ tce-load -i alsa-config pavucontrol
$ pavucontrol
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 21, 2020, 10:49:15 AM
I apologize to everyone. This problem is starting to make me angry...

juanito:

 can easily delete the /.X.d/pulseaudio. No problem.

I can disable the dbus as well without problems.

But usually when I download application from Apps I always do it as "onboot". I can't do it any other way (I learned it from the wiki).

Now, you tell me that alsa and pulseaudio are not configured as "onboot" or "ondemand" and I don't understand what that means:

a) should I delete everything and start again to download alsa and pulseaudio without the "onboot" or "ondemand" option. That for me after all this time checking having all the dependencies of each application, activating and testing the sound, etc. I'm not going to repeat that phase again.

b) Could you configure alsa in some other way that is not "onboot"? If so, I need to know in detail.

Once this question is answered I will continue with the process.
Title: Re: I've got the sound settings crushed.
Post by: Juanito on April 21, 2020, 11:01:48 AM
I am proposing something as a test, not for normal operation - if you do not wish to disrupt your settings, you can boot with the boot codes "base" and "norestore", which will have the effect of preventing any extensions being loaded and will prevent your backup being restored.

If you follow the above, you will boot to a console prompt and will need a simple desktop, which can be done like this:
Code: [Select]
$ tce-load -i Xorg-7.7 flwm aterm wbar
$ startx

Once the gui has started, you can open a terminal window and run the commands already mentioned.
Title: Re: I've got the sound settings crushed.
Post by: Rich on April 21, 2020, 11:06:41 AM
Hi ferran
... I suggest you reboot without any alsa or pulseaudio extensions set "onboot" or "ondemand", ...
1. Click on the  Apps  icon.
2. Click  Apps->Maintenance->OnBoot Maintenance.
3. In the  On Boot Items  panel, click the item you wish to remove from your  onboot.lst  file.
4. Click the  Delete Item from List  button.
5. Repeat steps 3 and 4 as required.
6. Click  Apps->Maintenance->OnDemand Maintenance.
7. Remove all items.
8. Exit the  Apps  program.
9. Reboot your machine.

You can also use the  Apps->Maintenance->OnBoot Maintenance  page to add items back to your  onboot.lst  file.
Title: Re: I've got the sound settings crushed.
Post by: ferran on April 21, 2020, 11:13:32 AM
I am proposing something as a test, not for normal operation - if you do not wish to disrupt your settings, you can boot with the boot codes "base" and "norestore", which will have the effect of preventing any extensions being loaded and will prevent your backup being restored.

If you follow the above, you will boot to a console prompt and will need a simple desktop, which can be done like this:
Code: [Select]
$ tce-load -i Xorg-7.7 flwm aterm wbar
$ startx

Once the gui has started, you can open a terminal window and run the commands already mentioned.

First I need to know where I can find my "boot codes"

Title: Re: I've got the sound settings crushed.
Post by: Juanito on April 21, 2020, 12:47:04 PM
I don't know which boot loader you are using.

Some boot loaders, for example grub, will allow you to edit your boot config temporarily from the boot menu to add/delete boot codes.

For other boot loaders, you will need to consult their documentation online to find what their config file is called and where it is located in order to edit it.

Title: Re: I've got the sound settings crushed.
Post by: ferran on April 21, 2020, 03:53:31 PM
Ey juanito, you don't worry about it. Finally i re-installed Tiny Core 11.0 from scratch.

You want to know a funny thing?. So, now works fine pavucontrol again!  ;D

I think that the system was corrupt since I made the great crash.

If you wants, lets mark this theme as solved.

Title: Re: [Solved] I've got the sound settings crushed.
Post by: Rich on April 21, 2020, 04:27:35 PM
Hi ferran
... If you wants, lets mark this theme as solved.
Done. :)
Title: Re: I've got the sound settings crushed.
Post by: aus9 on April 24, 2020, 05:52:32 AM
Code: [Select]
grep -l alsa.tcz /etc/sysconfig/tcedir/optional/*.dep | cut -d/ -f6Thats a lowercase  L  after  grep.
SNIP

thanks for the command now the OP is now solved I can reveal I made a small script to help me,
hope it helps others. I am not a real coder

Code: [Select]
#!/bin/sh
read -t 10 -p "input TCE without dot tcz please
" INPUT
grep -l $INPUT.tcz /etc/sysconfig/tcedir/optional/*.dep | cut -d/ -f6

made it an executable script in my ~/.local/bin named searchtce

ref
https://bash.cyberciti.biz/guide/Getting_User_Input_Via_Keyboard
-t 10 = timeouts if I can not type it in 10 seconds.

eg
Code: [Select]
searchtce
input TCE without dot tcz please
alsa
alsa-dev.tcz.dep
alsa-plugins.tcz.dep
gimp2.tcz.dep
pulseaudio.tcz.dep