LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-14-2014, 11:44 PM   #1
TenEighty
Member
 
Registered: Oct 2004
Location: Vancouver, B.C., Canada
Distribution: Kubuntu
Posts: 59

Rep: Reputation: 15
How do I patch and install an Alsa kernel module


OS: Kubuntu 14.04
Kernel: 3.13.0-29-generic
Mainboard: MSI H97M-G43

I have become very discouraged in my effort to apply a patch to the snd-hda-intel module that is supposed to fix sound corruption on H97 and Z97 chipset onboard audio. I very seldom resort to requesting help from forums, but this has become incredibly complex, at least from my perspective, and I have not found a good step by step howto to walk me through it. I am at a loss, and unfortunately right now it's it seems it's the only way to fix it.

It was days before I stumbled on the right combination of search terms to turn up the patch:
https://git.kernel.org/cgit/linux/ke...4e83e8eda62437
I have read a bit about the patch format and patching a file with "patch" but instead I found a downloadable patched source file hda-intel.c

I downloaded the alsa-source package, and compared the source code therein to the already patched hda-intel.c, and I can tell that the base file is not the same as the one in the alsa-source package. But I cannot tell what version of alsa the patch is for. Could it be the latest stable version? The development version? What do I apply this patch to, and how important is that? I gave it a shot anyway.

I replaced hda-intel.c in the alsa source tree with the patched one, and succeeded in building the drivers with the alsa-compile script following the alsa website instructions, but they did not actually install, so I tracked down the newly built module snd-hda-intel.ko, copied it to the modules directory myself and restarted. Then I had no sound at all and no sound cards listed in settings, so there were pretty catastrophic conflicts. I restored a backup I made of the old module, and I am back where I started.

Last edited by TenEighty; 06-14-2014 at 11:50 PM.
 
Old 06-15-2014, 12:27 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,169

Rep: Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126
A quick look indicates that patch was included in the 3.15 released mainline kernel. Get that and you have nothing to do.
Normally kernel patches are simply run against the (full) kernel tree - but you'd probably need to get the [k]Ubuntu-patched one. Been many years since I built a Ubuntu specific kernel - before Unity was imposed on the unsuspecting users, so I can't help there.
 
Old 06-15-2014, 12:51 PM   #3
TenEighty
Member
 
Registered: Oct 2004
Location: Vancouver, B.C., Canada
Distribution: Kubuntu
Posts: 59

Original Poster
Rep: Reputation: 15
Oh, that sounds promising, and much easier, thanks!

I might as well try to learn a few things: How do you determine that a patch is included in a kernel release?

Quote:
Originally Posted by syg00 View Post
Normally kernel patches are simply run against the (full) kernel tree
Does that mean the alsa-source package is not even required for patching? I noticed when I run alsa-compile it downloads a "snapshot" from alsa-project.org. Because the patch only adds 3 lines, it was easy to copy and paste it myself into the hda_intel.c file included in the alsa-source package, but this produced the same no sound results as the downloaded hda_intel.c file. So I wonder if it is actually using the source package I have or if it is fetching more up to date sources.

Now that I think of it, perhaps I misunderstand something. If the problem lies in the alsa module snd-hda-intel, and if alsa modules are seperate from the kernel, in that I could run different combinations of kernels versions and alsa versions, and if the patch alters code in the alsa module, how does upgrading to kernel 3.15 eliminate the problem? I would have sooner thought I would have to upgrade to the latest version of alsa?

Quote:
Originally Posted by syg00 View Post
you'd probably need to get the [k]Ubuntu-patched one.
To get a "kubuntu patched" kernel, I guess, add a repository for proposed or testing kernels, perhaps they are working with 3.15. But if not, I could download the latest kernel from kernel.org, although it has been many years since I have built a kernel. I am wondering what other problems that might introduce because it wouldn't have the kubuntu tweaks.
 
Old 06-15-2014, 01:47 PM   #4
TenEighty
Member
 
Registered: Oct 2004
Location: Vancouver, B.C., Canada
Distribution: Kubuntu
Posts: 59

Original Poster
Rep: Reputation: 15
Hmmm. I downloaded a .deb kernel package for the latest kernel tagged "trusty" from kernel.ubuntu.com (kernel PPA no longer used?), and uname -r confirms I am now running kernel version 3.15.0-031500rc2-generic, but I still have sound issues
 
Old 06-16-2014, 06:45 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,169

Rep: Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126Reputation: 4126
So the patch may not fix what you had hoped.

I just looked at kernel.org for the accumlated patch that was applied for 3.15 and your few lines were included (I didn't actuallly look at the patched source tree itself). You would expect any fixes to be developed within the responsible team then sent to Linus, so either should work once finalised.
 
Old 06-16-2014, 08:26 AM   #6
TenEighty
Member
 
Registered: Oct 2004
Location: Vancouver, B.C., Canada
Distribution: Kubuntu
Posts: 59

Original Poster
Rep: Reputation: 15
Darn. Thanks so much for your help checking into this, syg00.

I suppose I'll report that the patch, as incorporated in the 3.15 kernel, did not fix the problem on my hardware. I did a lot of homework before buying, it was supposed to be supported, but maybe I should have bought the older H87 chipset mainboard instead.
 
Old 06-30-2014, 11:22 PM   #7
TenEighty
Member
 
Registered: Oct 2004
Location: Vancouver, B.C., Canada
Distribution: Kubuntu
Posts: 59

Original Poster
Rep: Reputation: 15
It turns out the patch does cover the PCI ID of my audio device. Apparently the 3.15.0-031500rc2-generic kernel does not contain the patch code. I downloaded the 3.15.0-031500-generic kernel .deb package for the upcoming ubuntu release from kernel.ubuntu.com, took me a while to get it to boot because grub seems to prefer x.xx.rc2 as the default kernel to boot than x.xx. Perhaps the ability to make the correct distinction should be added to grub...

Conclusion is that onboard sound on the MSI H97M-G43 is supported as of the 3.15 kernel.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: SUSE develops module to patch running kernel LXer Syndicated Linux News 0 02-04-2014 11:02 AM
How to patch and build rpm of a kernel module (btusb.ko) ghoshdibyajyoti Linux - Newbie 1 01-09-2012 09:20 AM
[SOLVED] Install older kernel module into newer kernel - no symbol version for module bayoulinux Linux - Kernel 4 10-26-2011 04:32 AM
newest ALSA kernel module cccc Debian 4 11-01-2008 10:28 AM
RT Preempt patch breaks alsa on 2.6.24.3 kernel E-Man Linux - Software 2 03-12-2008 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration