cb-linux / breath

Linux for Chromebooks
https://cb-linux.github.io/breath/
MIT License
302 stars 55 forks source link

apl-sof-setup-audio doesn't run on debian 11 #308

Closed c25 closed 2 years ago

c25 commented 2 years ago

EDIT: I don't know where I should run this script. It seems like it should be on the chromebook, but it mentions USB drives etc.

Running the command (running breath on my chromebook) results in:

Error: 'restricted' invalid

Removing / commening line 8 allows it to run.

I don't know if this is required on other distros (ubuntu?)

c25 commented 2 years ago

It also fails on line 80

cd: /home/username/linux-build: No such file or directory

this seems to work

if [ ! -d ~/linux-build ]
then
  mkdir ~/linux-build
fi
cd ~/linux-build
c25 commented 2 years ago

Script completed and said to reboot. Not it won't boot.

Is this something to do with depthcharge that I saw mentioned in the script? There is no infor/warning on the installation page about this step! https://cb-linux.github.io/breath/docs.html#/?id=audio

ps: I really appreciate your patience with me struggling through this as someone completely new to chromebooks and this ecosystem. I'm hoping I can contribute back to the documentation - once I have something working correctly - to make it easier for anyone else like me!

c25 commented 2 years ago

OK

I did a complete new build, using latest commits. this time apl-sof-setup-audio did run, and everything rebooted ok!

I think it's ok to close this issue now...

however I will observe that I don't have audio working. I think this is because I'm trying to use gnome, and #122 suggests that I should remove pulseaudio - but when attempting that apt tells me it will also remove gnome.

Attempting apt remove pipewire* ALSO says it will remove gnome.

I've just built with KDE - but that doesn't show a login screen so I can't confirm (yet) if it's specific to the combination of gnome+debian

MilkyDeveloper commented 2 years ago

PipeWire is already masked, so there’s no need to remove it. Give me the link/file created by sudo alsa-info if you don’t mind.

c25 commented 2 years ago

alsa-info.txt

MilkyDeveloper commented 2 years ago

Looks like this is our culprit:

PipeWire:
      Installed - Yes (/usr/bin/pipewire)
      Running - Yes

I've seen this happen a few times, installing a desktop "unmasks" Pipewire. To fix this, just run

systemctl mask --user pipewire.{socket,service}
c25 commented 2 years ago

Maybe this is a new issue now, but that has only half helped!

Pipewire is no longer running, but I still have no audio output options in Gnome. Running speaker-test fails. Running sudo speaker-test works

I've tried adding my user to the audio group, but that doesn't seem to make any difference.

MilkyDeveloper commented 2 years ago

sudo speaker-test shouldn't do anything different than normal speaker-test.

Redownload https://github.com/cb-linux/breath/blob/main/bin/sof-setup-audio and run it again. This should fix it :D. If it doesn't, give me the link/file created by sudo alsa-info and also systemctl status --user pulseaudio.service.

If this project works well for you, feel free to donate or give it a star.

c25 commented 2 years ago

I thought this device used the apl-sof-setup-audio? I see your changes, but don't want to end up twisting my configuration into an even bigger mess running the wrong script :grin:

MilkyDeveloper commented 2 years ago

Once done with its work of changing the kernel commandline and downloading firmware, apl-sof-setup-audio invokes sof-setup-audio, so there shouldn't be any problems.

Also, your audio configuration isn't a mess, it's all documented. We almost have it working :D.

c25 commented 2 years ago

Right, multiple rebuilds later and I've reached "good enough".

Audio works, but not always, well, eventually.

When first booting up, no audio shows up in gnome, and there is no sound. Running speaker-test sometimes works at this point, but not always. Some time later (I haven't identified the exact delay or cause) audio will start working. Sometimes I need to change between the two identically named audio devices.

Thanks for taking the time to work this through with me!