[SOLVED] Sound stopped working after running driver install script

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
piovezan
Level 1
Level 1
Posts: 20
Joined: Sun Apr 29, 2018 11:11 am

[SOLVED] Sound stopped working after running driver install script

Post by piovezan »

Hello, I tried installing Linux sound drivers for my Asus P5KPL-CM motherboard and the sound stopped working.

This is the script I tried running (unfortunately I don't have an output log, all I know is that it ended with an error):

Code: Select all

#!/bin/sh

######## VERSION 1.5 ########

KERNEL_VER=`uname -r`

echo ".....Decompress Driver source ALSA Driver 1.0.14....."
tar xvpfj alsa-driver-1.0.14.tar.bz2 > /dev/null 2>&1
sync

echo "Remove old sound driver"
if [ -d /lib/modules/$KERNEL_VER/kernel/sound ]; then
   rm -rf /lib/modules/$KERNEL_VER/kernel/sound/pci
   rm -rf /lib/modules/$KERNEL_VER/kernel/sound/acore
   rm -rf /lib/modules/$KERNEL_VER/kernel/sound/driver
fi

echo "Compile Driver........"
cd alsa-driver-1.0.14
./configure --with-cards=hda-intel
make
make install
./snddevices 
cd ..
if lsmod |grep -q "snd_hda_intel" ; then
    modprobe -r snd_hda_intel
fi
modprobe snd_hda_intel
I think it failed at the last step:

Code: Select all

~ $ modprobe snd_hda_intel
modprobe: ERROR: ../libkmod/libkmod-module.c:192 kmod_module_parse_depline() ctx=0x55835cba5010 path=/lib/modules/4.15.0-33-generic/kernel/sound/pci/hda/snd-hda-codec.ko error=No such file or directory
modprobe: ERROR: ../libkmod/libkmod-module.c:192 kmod_module_parse_depline() ctx=0x55835cba5010 path=/lib/modules/4.15.0-33-generic/kernel/sound/pci/hda/snd-hda-codec.ko error=No such file or directory
modprobe: ERROR: could not insert 'snd_hda_intel': Unknown symbol in module, or unknown parameter (see dmesg)
It seems my soundcard is not being recognized. This is the aplay -l && arecord -l output:

Code: Select all

~ $ aplay -l && arecord -l
aplay: device_list:268: no soundcards found...
arecord: device_list:268: no soundcards found...
Further info:

Code: Select all

~ $ lspci -v | grep -A7 -i "audio"
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01)
	Subsystem: ASUSTeK Computer Inc. P5KPL-CM Motherboard
	Flags: bus master, fast devsel, latency 0, IRQ 11
	Memory at fe978000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel modules: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 01) (prog-if 00 [Normal decode])
What should I do?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
richyrich

Re: Sound stopped working after running driver install script

Post by richyrich »

...Decompress Driver source ALSA Driver 1.0.14....
I'm on Mint 17 at present, and I have Alsa 1.0.25 . . . why do you want to try to downgrade your Alsa base ? I see it is an old motherboard with the Ich7 chipset, but Why downgrade ?

Alsa comes pre-installed in Mint.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Sound stopped working after running driver install script

Post by MrEen »

Hi piovezan.

I assume you were already getting "aplay: device_list:268: no soundcards found..." so you tried to find a solution and got unlucky with the choice you made.

The version you were attempting to install was upgraded 11 years ago (with many more upgrades since.)

The only real damage that script did was this line: rm -rf /lib/modules/$KERNEL_VER/kernel/sound/pci The other 2 lines where it removes stuff have already had the folders renamed since then.

The problem now is I'm not sure what exactly creates the stuff in /lib/modules/$KERNEL_VER/kernel/sound/pci, so here is my suggested steps to get back to where you started.

WARNING:Don't just blindly follow my instructions. If apt remove --purge alsa-base pulseaudio says it's going to uninstall 50 other files DO NOT CONTINUE but report back here. In the step with apt autoremove, this could indeed happen, so skip that if you feel uncomfortable.

1. Back up anything you consider important. While you shouldn't have any problems with this, it is something you should be doing regularly anyway.

2. Boot to an earlier kernel. If the grub menu doesn't show normally when you boot, press either Shift or Esc during the boot process to make it show. Then select the Advanced Options and choose something older than 4.15.0-33-generic.

3. Remove the main sound files with apt remove --purge alsa-base pulseaudio in the terminal.

4. Uninstall the newest kernel by going to the Update Manager and clicking on View > Linux kernels. Click on 4.15.0-33 then click Remove.

5. Remove any crud with apt autoremove in the terminal. This is optional.

6. Reinstall the sound files with apt install alsa-base pulseaudio in the terminal.

7. Refresh the cache with apt update in the terminal.

8. Open the Update Manager and 4.15.0-33 should be available to install again. Install it then reboot.

Hopefully that gets you back to where you were before starting this adventure. It also might mysteriously fix your sound issue.

If you still need help with sound after that just post back the results of inxi -Fxz and aplay -l and we'll take it from there.

EDIT: Note to experts reading this. While I'm sure there's an easier way to reinstall the kernel (apt install --reinstall uname -r maybe?) I took the approach I thought safest especially since there's been a recent change in the kernel packages. Please feel free to offer advice on that.
piovezan
Level 1
Level 1
Posts: 20
Joined: Sun Apr 29, 2018 11:11 am

Re: Sound stopped working after running driver install script

Post by piovezan »

richyrich wrote: Wed Sep 12, 2018 8:02 pm
...Decompress Driver source ALSA Driver 1.0.14....
I'm on Mint 17 at present, and I have Alsa 1.0.25 . . . why do you want to try to downgrade your Alsa base ? I see it is an old motherboard with the Ich7 chipset, but Why downgrade ?

Alsa comes pre-installed in Mint.
I wasn't aware I was downgrading it. I have dual boot and had to install the drivers on Windows 7 in order to make the line in input to be forwarded to line out correctly (Windows wasn't allowing that). So I figured I needed something similar on Linux in order to achieve the same behavior.
piovezan
Level 1
Level 1
Posts: 20
Joined: Sun Apr 29, 2018 11:11 am

Re: Sound stopped working after running driver install script

Post by piovezan »

MrEen wrote: Wed Sep 12, 2018 9:58 pm Hi piovezan.

I assume you were already getting "aplay: device_list:268: no soundcards found..." so you tried to find a solution and got unlucky with the choice you made.

The version you were attempting to install was upgraded 11 years ago (with many more upgrades since.)

The only real damage that script did was this line: rm -rf /lib/modules/$KERNEL_VER/kernel/sound/pci The other 2 lines where it removes stuff have already had the folders renamed since then.

The problem now is I'm not sure what exactly creates the stuff in /lib/modules/$KERNEL_VER/kernel/sound/pci, so here is my suggested steps to get back to where you started.

WARNING:Don't just blindly follow my instructions. If apt remove --purge alsa-base pulseaudio says it's going to uninstall 50 other files DO NOT CONTINUE but report back here. In the step with apt autoremove, this could indeed happen, so skip that if you feel uncomfortable.

1. Back up anything you consider important. While you shouldn't have any problems with this, it is something you should be doing regularly anyway.

2. Boot to an earlier kernel. If the grub menu doesn't show normally when you boot, press either Shift or Esc during the boot process to make it show. Then select the Advanced Options and choose something older than 4.15.0-33-generic.

3. Remove the main sound files with apt remove --purge alsa-base pulseaudio in the terminal.

4. Uninstall the newest kernel by going to the Update Manager and clicking on View > Linux kernels. Click on 4.15.0-33 then click Remove.

5. Remove any crud with apt autoremove in the terminal. This is optional.

6. Reinstall the sound files with apt install alsa-base pulseaudio in the terminal.

7. Refresh the cache with apt update in the terminal.

8. Open the Update Manager and 4.15.0-33 should be available to install again. Install it then reboot.

Hopefully that gets you back to where you were before starting this adventure. It also might mysteriously fix your sound issue.

If you still need help with sound after that just post back the results of inxi -Fxz and aplay -l and we'll take it from there.

EDIT: Note to experts reading this. While I'm sure there's an easier way to reinstall the kernel (apt install --reinstall uname -r maybe?) I took the approach I thought safest especially since there's been a recent change in the kernel packages. Please feel free to offer advice on that.
Thanks for your reply. I did everything up to step 8 with no big surprises; but when hitting 'Refresh' at the Update Manager the kernel won't show up. Kernel 4.15.0-34.37~16.04.1 appears instead (it was already appearing if I recall correctly). I'm not sure if it's okay to install it, so I ask for advice.

Sound is working in the previous 4.15.0-32 kernel, but I'm aware the intention is to fix 4.15.0-33.
richyrich

Re: Sound stopped working after running driver install script

Post by richyrich »

Firstly, I'd like to apologise for typing harsh words to you. I ask your forgiveness. :(

Secondly, yes, Linux is surely not like what both you and I have learned to do in Windows. It took me a while. These Mint forums helped me a lot, and I learned to come here to search and ask, before I tried anything on my own. :wink:

Thirdly, thank you MrEen for knowing what to do to help.
piovezan
Level 1
Level 1
Posts: 20
Joined: Sun Apr 29, 2018 11:11 am

Re: Sound stopped working after running driver install script

Post by piovezan »

Don't worry, it didn't sound harsh to me. :) and hope I didn't sound too defensive!

I'll be sure to ask the forum contributors for help more often. It's just an attitude I need to work on more.

Thanks for your help and feedback :)

I blame this installation script though, that doesn't do the job correctly: first it breaks the system and then tries to build the driver, not sure if it is going to be built correctly. Isn't it so?
piovezan
Level 1
Level 1
Posts: 20
Joined: Sun Apr 29, 2018 11:11 am

Re: Sound stopped working after running driver install script

Post by piovezan »

Correction! I restarted the PC and booted into kernel 4.15.0.32-generic again and the login sound seems to be gone. Playing music works fine though.

Didn't do further testing on the login sound other than logging out and back again. I'm afraid I can't boot before updating to the proper kernel. I'm keeping the PC on while waiting for an answer.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Sound stopped working after running driver install script

Post by MrEen »

Hi again piovezan. I just got home from work.

You can go ahead and upgrade the kernel if you wish to the newer one. It won't show the one you had now because of a newer one being available. Or you can just stick with the kernel you have for a while. Your choice.

For the login sound, apt install libcanberra-pulse might fix it. It may have gone with pulseaudio and didn't come back with it. If that doesn't work, PulseAudio Volume Control (pavucontrol) has a volume slider for system sounds on the playback tab. apt install pavucontrol if you don't have it.

Good luck, and let us know how it goes.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Sound stopped working after running driver install script

Post by MrEen »

richyrich wrote: Thu Sep 13, 2018 8:29 am Thirdly, thank you MrEen for knowing what to do to help.
Shhhh. Don't tell anyone, but I just took a guess. :wink:
piovezan
Level 1
Level 1
Posts: 20
Joined: Sun Apr 29, 2018 11:11 am

Re: Sound stopped working after running driver install script

Post by piovezan »

MrEen wrote: Thu Sep 13, 2018 3:45 pm Good luck, and let us know how it goes.
All went well! System volume was set to 0, and PulseAudio Volume Control did the trick.

Thank you all very much for your help!
Last edited by piovezan on Fri Sep 14, 2018 10:37 am, edited 1 time in total.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: [SOLVED] Sound stopped working after running driver install script

Post by MrEen »

You're very welcome. :)
Locked

Return to “Sound”