About
Razer is using Realtek based sound chips (with extensions for their "THX" stuff). They update the publicly available driver/CODEC software for linux was 2018...
It can be fixed by running some custom script shared by some hardworking and intelligent folks over at Kernel.org Bugzilla worked their magic and released a script that restores sound.
First analyze the card number and device number for the analog sound from the following command
ehsaan@ehsaan:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC298 Analog [ALC298 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
As you see, card number for the analog sound is 1 and device is 0 in mine case. So sound file name for speakers will be hwC1D0
Download, Update file name and Execute
Set script to run on system start automatically
- first give permission to execute
sudo chmod +x RB14_2023_enable_internal_speakers_ver2.sh
sudo nano /etc/systemd/system/sound_driver_update.service
- content of service file, Update file path as per yours in ExecStart
[Unit]
Description=patch for sound driver
After=network.target
[Service]
ExecStart=/home/username/sound_driver_update.sh
Restart=always
[Install]
WantedBy=multi-user.target
- reload daemon and enable service
sudo systemctl daemon-reload
sudo systemctl enable sound_driver_update.service