#[SOLVED] Samsung Book Flex2 [sound issue]

40 messages · Page 1 of 1 (latest)

rare oasis
#

Hello there !
I need some help with Arch. I'm rather new to the whole Linux-sphere. I managed to install Arch this morning after struggling for quite some time.
However, I find myself in need of help.
I have a Samsung Book Flex2, and I cannot seem to get sound to work; I have tried pipewire, pulseaudio ; they dont seem to do anything different.
I dont get any sound through the speakers (or maybe its so low I cant hear it)
I do get some low sound through the headphones (with volume +100% - anything under won't output anything) and its very crackling.
Found this link: https://wiki.archlinux.org/title/Laptop/Samsung saying that my laptop wont have speaker sound (which I'm fine with, I guess), but at least, I'd like to have headphones.

Please let me know what details to provide.

rare oasis
#

This is now solved by following: https://forum.manjaro.org/t/howto-set-up-the-audio-card-in-samsung-galaxy-book/37090. Here are the corrected steps. Kernel 5.8 and higher required.

  1. sudo pacman -S sof-firmware --needed
  2. sudo pacman -S alsa-tools --needed
  3. echo "options snd slots=snd_soc_skl_hda_dsp" | sudo tee -a /etc/modprobe.d/sof.conf
  4. echo "blacklist snd-hda-intel" | sudo tee -a /etc/modprobe.d/blacklist.conf
  5. sudo mv /etc/modprobe.d/alsa-base.conf /etc/modprobe.d/alsa-base.conf.backup (this might error, dont worry if it does, move on)
  6. mkdir -p /home/***YOURUSERNAME***/Documents/MyScripts & sudo nano /home/***YOURUSERNAME***/Documents/MyScripts/audiofix.sh
    Make sure to replace YOURUSERNAME with your actual username (ie: home/salvaedeus/Documents/MyScripts/
    7: Paste these two bins in this order in that script: https://pastebin.com/raw/45ksYAXX (1st) and https://pastebin.com/raw/zsXp2vz6 (2nd) save the .sh file and exit nano (ctrl+s ; ctrl+x)
  7. Give the file exec perms by chmod a+rwx /home/$USER/Documents/MyScripts/audiofix.sh
  8. Now we will create 2 services: 1st to run audiofix.sh on startup. The 2nd is needed because if the audio goes idle for ~10 seconds, the fix will stop working, thus another another service is needed to keep it working despite idleness. Thus:
    sudo nano /etc/systemd/system/ionsound.service
    where we paste
Description=Custom Sound

[Service]
Type=idle
ExecStart=/bin/bash /home/salvaedeus/Documents/MyScripts/audiofix.sh

[Install]
WantedBy=multi-user.target```
#
  1. This is the service fixing the audio; Now for the one that fixes the idleness:
    sudo nano /etc/systemd/system/ionsoundsleep.service
    where we paste:
Description=Custom Sound Sleep Fix

[Service]
Type=idle
ExecStart=/bin/bash /home/salvaedeus/Documents/MyScripts/audiofix.sh

[Install]
WantedBy=suspend.target```
11. Give both services permission:
``` sudo chmod a+r /etc/systemd/system/ionsound.service
sudo chmod a+r /etc/systemd/system/ionsoundsleep.service```
12. Reload daemon by: 
```sudo systemctl daemon-reload
sudo systemctl enable ionsound.service
sudo systemctl enable ionsoundsleep.service
sudo systemctl start ionsound.service
sudo systemctl start ionsoundsleep.service```
13. Sound should be working at this point. If you use PulseAudio (which personally for my system I find it not working), you can try the additional step of:
``sudo nano /etc/pulse/default.pa`` ; find load-module module-suspend-on-idle and comment it out by adding ``###`` in front of it 
``sudo sed -i 's/load-module module-suspend-on-idle/### load-module module-suspend-on-idle/' /etc/pulse/default.pa`` this should also work, should do the same thing (commenting suspend on idle out). If this file is absent, it probably means you dont use PulseAudio and you dont actually need to do this step.

Sound should be working at this point, if not, try ``alsamixer`` > F6, select the soundboard (probably at this point its ``snd_soc_skl_hda_dsp``) and make sure things that shouldnt be muted arent muted. Pavucontrol seems to mess this setup.

Hope this helps anyone. As I said, this is mostly for Samsung laptops.
#

[SOLVED] Samsung Book Flex2 [sound issue]

rare oasis
#

applying the 2nd bin by itself seem to fix the issue both when ran in bash as script and as service;

#

but the ionsoundsleep.service doesnt seem to work

#

I'm trying to make that apply whenever the sound goes idle.

split dragon
#

not sure how to fix this issue, however what you're doing with the script here is very dangerous

#

you've got the script in your home dir which everyone can read and write, executed with root permissions by systemd

rare oasis
#

uhm, how do i fix that ?
should i move the script to root or smth?

split dragon
#

basically any program on your system could get root by messing with that script (because they have permission to edit it)

rare oasis
#

that script is the only way that my sound will work, without it it shows that there is output (bars going up and down) but i have nothing

split dragon
#

yeah i would move the script to somewhere like /usr/local/bin/ and then sudo chown root:root <script> and sudo chmod 0755 <script>

rare oasis
#

ok, i'll fix the paths and everything then;

#

any idea why this:

Description=Custom Sound Sleep Fix

[Service]
Type=idle
ExecStart=/bin/bash /home/salvaedeus/Documents/MyScripts/audiofix.sh

[Install]
WantedBy=suspend.target``` 
wouldnt work?
#

is it not suspend.target? or type=idle

#

besides the pathing ofc

split dragon
#

WantedBy=suspend.target makes it run immediately before the system sleeps

#
           •   Behavior of idle is very similar to simple; however, actual execution of the service program is
               delayed until all active jobs are dispatched. This may be used to avoid interleaving of output of
               shell services with the status output on the console. Note that this type is useful only to improve
               console output, it is not useful as a general unit ordering tool, and the effect of this service type
               is subject to a 5s timeout, after which the service program is invoked anyway.
#

this might mean that it executes after coming back from sleep, not sure

rare oasis
#

thats what it supposed to do; if i have audio playing but cant hear anything and run the script itself (or this as a service:

Description=Custom Sound

[Service]
Type=idle
ExecStart=/bin/bash /home/salvaedeus/Documents/MyScripts/audiofix.sh

[Install]
WantedBy=multi-user.target```
) the audio works. However, if I pause for more than 10 seconds or so, whenever I start audio again it I have to run the script/service again for it to work.
The first ~~script~~ service that I sent you should fix that no?
split dragon
#

i have no idea

rare oasis
rare oasis
#

ty

#

Thanks @split dragon ++ there you go

edgy craneBOT
#

armv8 received a thank you cookie!

split dragon
#

idle seems to be an unusual type, you probably want oneshot if that script exits right after it's ran

#

if it keeps running then simple

rare oasis
split dragon
#

also, if you're directly editing the service file, be sure to sudo systemctl daemon-reload after editing it for your changes to apply

rare oasis
#

yeah, i do that, usually dont need to, but i do it anyway

rare oasis
#

i have man-db/pages/texinfo but idk how to use them lol

split dragon
#

man systemd.special

rare oasis
split dragon
#

others might not have specific documentation

rare oasis
split dragon
#

that should be in the systemd.service or systemd.unit manpage