This guide walks you through every step—from installing required tools, downloading the script, configuring systemd, and testing your speakers—to ensure your internal speakers are correctly initialized at boot.
Issue: The Samsung Galaxy Book Pro/Pro 360 series with Realtek ALC298 codec has silent internal speakers on Linux. The codec is detected, and headphones/Bluetooth audio work, but the built-in speakers get no sound output. This is a known issue: the audio driver isn’t initializing the onboard speaker amplifier by default.
DISCLAIMER 1
Please note that this is a workaround that worked for me after months of research and trial and error, and with guidance from countless linux enthusiasts, and I have tried compiling it in one doc. You can find my system specification at the bottom of this blog.
DISCLAIMER 2
The information and instructions provided in this guide are offered "as-is" without any warranty, express or implied. The steps described, including modifications to system configurations and the use of HDA verb scripts, are provided for educational purposes only. Please back up your data and create system restore points or snapshots before making any changes to your system. The author(s) and publisher(s) of this guide are not responsible for any damage, data loss, or other issues that may arise from the use of this information. Use these instructions at your own risk. Always consult your system's documentation or seek professional advice if you are uncertain about any step in the process.
1. Installing Required Tools
Purpose:
We needed the ALSA utilities (which include hda-verb
) to send low-level commands to the Realtek ALC298 codec, thereby initializing the internal amplifier.
Action:
Open a terminal and run:
sudo dnf install alsa-tools
What This Does:
This command installs the alsa-tools
package on Fedora, providing the hda-verb
utility that we’ll use later in our initialization script.
2. Downloading the Speaker Initialization Script
Purpose:
A community-maintained script, named necessary-verbs.sh
, contains the correct sequence of HDA verb commands that mimics the initialization performed by the Windows driver. This activates the internal speaker amplifier.
Action:
Run the following command in your terminal:
wget https://raw.githubusercontent.com/joshuagrisham/galaxy-book2-pro-linux/main/sound/necessary-verbs.sh -O ~/necessary-verbs.sh
What This Does:
This command downloads the script from GitHub and saves it as necessary-verbs.sh
in your home directory.
3. Installing the Script in a System Location
Purpose:
Moving the script to a system-wide directory ensures it remains available across reboots and for all system users.
Actions:
- Move the Script:
sudo mv ~/necessary-verbs.sh /usr/local/sbin/necessary-verbs.sh
- Make It Executable:
sudo chmod +x /usr/local/sbin/necessary-verbs.sh
- Verify:
ls -l /usr/local/sbin/necessary-verbs.sh
You should see permissions similar to:
-rwxr-xr-x 1 saif-linux saif-linux 21298 Mar 15 23:44 /usr/local/sbin/necessary-verbs.sh
What This Does:
- The script is moved to
/usr/local/sbin/
, a common directory for system executables. - The executable flag (
+x
) is set so that the script can run properly.
4. Creating a systemd Service to Run the Script at Boot
Purpose:
We want the script to run automatically at every boot, initializing the internal speaker amplifier without manual intervention.
Actions:
- Create the Service File:
Open a text editor with:
sudo nano /etc/systemd/system/speaker-init.service
- Paste the Following Content:
[Unit]
Description=Initialize Galaxy Book Speaker Amp at boot
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/necessary-verbs.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
-
Save and Exit:
In nano, press
Ctrl+O
thenEnter
to save, andCtrl+X
to exit.
What This Does:
- Description: Provides an overview of the service’s purpose.
- After=multi-user.target: Ensures the service runs after most system services have started.
- Type=oneshot: Runs the script once during boot.
- ExecStart: Specifies the path to the script.
- RemainAfterExit=yes: Tells systemd to consider the service active even after the script completes.
- WantedBy=multi-user.target: Integrates the service into the standard boot process.
5. Enabling and Starting the systemd Service
Purpose:
To register the service with systemd so that it runs automatically at boot, and to test it immediately.
Actions:
- Reload systemd to Recognize the New Service:
sudo systemctl daemon-reload
- Enable the Service (for future boots):
sudo systemctl enable speaker-init.service
- This creates a symlink to ensure the service starts at every boot.
- Start the Service Immediately:
sudo systemctl start speaker-init.service
- Check Service Status:
sudo systemctl status speaker-init.service
- Note: Since this is a oneshot service, its status will show as “inactive (dead)” after it completes. This is normal if the script executed successfully.
- Review Logs (Optional):
sudo journalctl -u speaker-init.service
- You can inspect these logs for any potential errors or confirmation messages.
6. Testing Your Internal Speakers
Purpose:
Ensure that the initialization script successfully activated the internal speaker amplifier.
Actions:
-
Verify Audio Output Settings:
- Open GNOME Settings or run
pavucontrol
to confirm that “Internal Speakers” is selected as the default output device.
- Open GNOME Settings or run
Run an Audio Test:
Execute:
speaker-test -t wav -c 2
- You should hear alternating test sounds on the left and right speakers.
- Alternatively, play a media file using your preferred media player.
7. (Optional) Configuring for Suspend/Resume
Purpose:
Some systems may lose the speaker configuration after suspending. Setting up an additional service can re-run the initialization script upon resume.
Actions:
- Create a New Service File:
sudo nano /etc/systemd/system/speaker-init-resume.service
- Paste the Following Content:
[Unit]
Description=Reinitialize Galaxy Book Speaker Amp on resume
After=suspend.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/necessary-verbs.sh
[Install]
WantedBy=suspend.target
Save and Exit:
Save the file and exit the text editor.Reload and Enable the Service:
sudo systemctl daemon-reload
sudo systemctl enable speaker-init-resume.service
- This ensures that the script runs each time the system resumes from suspend.
8. Final Verification and Troubleshooting
Double-check Audio Output:
Ensure that your system’s sound settings are correctly configured to use the internal speakers.Review the Service Logs:
Run:
sudo journalctl -u speaker-init.service
Look for confirmation that the script executed correctly.
- Test After a Reboot: Reboot your computer with:
sudo reboot
After rebooting, run your speaker test again to ensure the service auto-executes.
- Manually Run the Script for Debugging (Optional): If necessary, run:
sudo /usr/local/sbin/necessary-verbs.sh
Check for any error messages or issues. You can also add echo
statements in the script to get more detailed output during debugging.
Conclusion
By following these detailed steps, you have successfully:
- Installed the necessary ALSA tools.
- Downloaded and installed a community-tested HDA verb script.
- Configured a systemd service to automatically run the script at boot.
- Verified that the script initializes your internal speakers.
- Optionally set up a resume service to reinitialize the speakers after suspend.
This workaround effectively replicates the missing initialization sequence for your Realtek ALC298 codec, allowing your internal speakers to function as intended. Enjoy your now fully operational internal audio setup!
Below mentioned are my system specifications
Hardware Information:
- Hardware Model: SAMSUNG ELECTRONICS CO., LTD. 950QED
- Memory: 16.0 GiB
- Processor: 12th Gen Intel® Core™ i7-1260P × 16
- Graphics: Intel® Iris® Xe Graphics (ADL GT2)
- Disk Capacity: (null)
Software Information:
- Firmware Version: P11AKK.750.240404.SH
- OS Name: Fedora Linux 41 (Workstation Edition)
- OS Build: (null)
- OS Type: 64-bit
- GNOME Version: 47
- Windowing System: Wayland
- Kernel Version: Linux 6.13.6-200.fc41.x86_64
Hope this article was helpful! I have heavily use ChatGPT to frame this blog.
Thanks for reading!
Top comments (1)
hey, Nice article!