Unfortunately this requires adding a custom configuration to the kernel.
When I follow along, also using this article Building a custom kernel - Fedora Project Wiki , I get stuck immediately as I don´t have a folder ¨sound¨ nor a file ¨kernel_source_root/sound/pci/hda/patch_realtek.c" after running the command ¨fedpkg clone -a kernel¨.
Can somebody please help me with this fix. Otherwise I would have to return the laptop.
Does anybody knows if this fix could just be implemented in the official fedora kernel so this laptop model is supported out of the box?
I’m not going to be a lot of help here, but a couple of notes from the last time I tried something like this.
I think the newer documentation is here in Quick Docs.
When you did the fedpkg clone -a kernel that got you the artifacts used for building the package, not the source itself. Most importantly it got you the kernel.spec file.
Get the kernel source from git, checking out the branch matching the version in the specfile. Apply your patch, then generate a patch the RPM build tools can understand (git diff > sound_fix.patch).
From there, add the patch to the specfile with a line like Patch2: sound_fix.patch
You will probably also want to set a buildid while you’re there, change define buildid .local to define buildid .soundfix
Build it: fedpkg local
Install it with dnf, the build result should wind up in the x86_64 subdirectory of your distgit checkout.
I was able to get my sound working. But the maximum volume is pretty low. Does anybody knows a fix for this? How to make the maximum volume higher than what the slider allows?
As the actual kernel source code only gets downloaded running the fedpkg local command, I have added these lines to the update_scripts.sh:
# Path to the patch_realtek.c file
REALTEK_FILE="../sound/pci/hda/patch_realtek.c"
# The line to be added
NEW_LINE='SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA", ALC245_FIXUP_CS35L41_SPI_2),'
# Insert the new line after the last ASUS related SND_PCI_QUIRK entry
sed -i "/SND_PCI_QUIRK(0x1043, 0x1a8f,/a $NEW_LINE" "$REALTEK_FILE"
And this actually adds the correct line in the correct place and the kernel builds.
What didn´t work is: make release
It gives me the error make: *** No rule to make target ‘release’. Stop. and builds a debug kernel. Anybody knows how to overcome this issue?
Sorry I am a bit late to this. The easiest way to add a patch to the kernel if you are build out of dist-git is to cat sound_fix.patch > linux-kernel-test.patch and then you can use fedpkg local. The linux-kernel-test.patch is an empty file that is applied in the spec. It is specifically there for people to test patches without having to modify the spec.
Do you know if this patch has been submitted upstream? I am happy to pull it back into the Fedora stable kernels once it is queued for upstream.
The note on using make release should be removed from the “Building a Kernel from the Fedora dist-git” section, it only applies to building directly from the kernel sources as far as I’m aware.
I have opened an issue, hopefully somebody knows an equivalent you can pass using --with or --without flags to fedpkg local.
I must honestly say that I don´t know anything about this process, but it would be amazing if a fix could be implemented in the stable kernels… but I don´t know how that process works. I am a very happy Fedora user, but not at all involved in the development of it.
This patch works for me (luckily) but the volume is very low, even at 100%. Also with almamixer all volumes are at 100% but still low volume (just workable, but a little annoying still).
With the command pactl set-sink-volume 0 150% I can turn the volume up, but the sound then starts to be noisy. 200% would be perfect for me, but it is too noisy at that level.
I did a bit more digging and it seems the reason all of this exists is because Asus has a broken firmware. Upstream is unlikely to take this patch because it is not a stand alone fix, but requires the firmware workaround as well. Hopefully Asus pushes a fixed firmware soon.