Bug 204159 - Sound does not work on MSI laptop by default
Summary: Sound does not work on MSI laptop by default
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-13 10:03 UTC by shadowofdarkness
Modified: 2020-05-07 08:26 UTC (History)
5 users (show)

See Also:
Kernel Version: 5.0.0-20-generic
Tree: Mainline
Regression: No


Attachments
My alsa info (58.53 KB, text/plain)
2019-07-13 10:03 UTC, shadowofdarkness
Details
Fix patch (1.35 KB, patch)
2019-09-03 13:14 UTC, Takashi Iwai
Details | Diff
MSI GP65 alsa-info.sh result (66.18 KB, text/plain)
2020-02-18 07:12 UTC, Mariyan Borisov
Details

Description shadowofdarkness 2019-07-13 10:03:56 UTC
Created attachment 283663 [details]
My alsa info

I bought a MSI GL73 9SE laptop using ALC1220 audio and had no audio output by default which after a couple hours I found a workaround on the Internet that leads me to believe that it is just a mixer path mistake that is mixing up the speaker and headphone output. 

If I understand right it should just need a model parameter made for this model and to be detected right. I was hoping it could be fixed so that in the future it just works.

Here is the "speaker no sound" workaround I found to make it work for now that is basically just swapping the contents of the headphone and speakers output paths. This also shows that it affects another model from MSI
https://blog.kafaiworks.com/posts/arch-linux-audio-setup-on-msi-gp63/

PS I wrote this with newlines for readability but the preview just shows a wall of text and I don't know why. So sorry if it actually shows up like that.
Comment 1 Takashi Iwai 2019-08-12 12:17:09 UTC
Please try to figure out the correct pin configuration via hdajackretask.  Then we can either find a corresponding quirk (if any matching one is already present) or create a new quirk entry.
Comment 2 shadowofdarkness 2019-08-21 03:06:48 UTC
I'm trying to learn how to use hdajackretask but I can't get a fully working setup the same as using the workaround I linked.

If I override the Internal Speaker to be the Headphone I get sound but both are active at the same time when I actually plug the headphones in. Changing the headphones to anything else makes me lose audio.

I just don't know enough to figure out how to get the right settings using hdajackretask.
Comment 3 shadowofdarkness 2019-09-01 03:04:17 UTC
I have been unable to figure this out enough to have a completely working setup using hdajackretask. Even though the workaround I posted at first does work perfect.

I have found though that overriding the headphones to "not connected" does make the speakers work.
Is it possible the headphone detection is inverted? I tried playing with some stuff in the parser hints section that seemed like it would invert that detection but nothing I did seemed to have any effect.

I just can't figure this out on my own.
Comment 4 shadowofdarkness 2019-09-01 08:05:27 UTC
After giving up on hdajackretask I started searching the Linux kernel source code and found some undocumented model options not in HD-Audio-Models.txt.gz and started testing any that mentioned being for the ALC1220 codec one at a time.

I found that model=clevo-p950 works perfect.

Please just make the the default for my systems vendor and model ID.
Comment 5 Takashi Iwai 2019-09-03 13:13:55 UTC
OK, below is the fix patch.  Please give it a try.
Comment 6 Takashi Iwai 2019-09-03 13:14:20 UTC
Created attachment 284775 [details]
Fix patch
Comment 7 shadowofdarkness 2019-09-07 02:33:53 UTC
Thanks that worked.
Comment 8 Angshuman Halder 2019-10-28 12:25:05 UTC
Can you tell me how to run the patch file. I am new to linux. I have the same sound card and my kernel version is 5.3.0-19-generic. I have MSI GP63 leopard 8RE notebook.
Comment 9 Takashi Iwai 2020-02-12 08:12:17 UTC
I seem to have forgotten this until now.  Now the fix was submitted and merged.
It'll be included in 5.6-rc2 and backported to stable kernels later.
Comment 10 Mariyan Borisov 2020-02-18 07:12:17 UTC
Created attachment 287457 [details]
MSI GP65 alsa-info.sh result

I have the same issue on my MSI GP65 laptop using kernel version 5.5.4. It works properly when I set the model to Clevo P950 (snd-hda-intel.model=clevo-p950).
> $ lspci -nns 00:1f.3
> 00:1f.3 Audio device [0403]: Intel Corporation Cannon Lake PCH cAVS
> [8086:a348] (rev 10)
I've also attached the result of alsa-info.sh for further details.
Comment 11 Takashi Iwai 2020-02-18 08:08:50 UTC
(In reply to Mariyan Borisov from comment #10)
> Created attachment 287457 [details]
> MSI GP65 alsa-info.sh result
> 
> I have the same issue on my MSI GP65 laptop using kernel version 5.5.4. It
> works properly when I set the model to Clevo P950
> (snd-hda-intel.model=clevo-p950).
> > $ lspci -nns 00:1f.3
> > 00:1f.3 Audio device [0403]: Intel Corporation Cannon Lake PCH cAVS
> > [8086:a348] (rev 10)
> I've also attached the result of alsa-info.sh for further details.
OK, that's 1462:1293 (found as the codec subsystem-id).  Will add the quirk entry, too.
Comment 12 bes1002t 2020-03-27 12:22:43 UTC
I have the exact same issue with my MSI GL63 8SE. I'm not very experienced in debug the Linux kernel. Is there a way you guys could help me getting my sound fixed? With headphones everything is working fine,only the notebook speaker are very very low in volume.

When I installed Linux I did not hear anything, just after pushing the volume to 150% I was able to hear some noises, but still very low. So I think it's the same issue as described above.

Thank you in advance!
Comment 13 bes1002t 2020-04-03 12:55:49 UTC
So according to my alsa-info, I think I just need an additional entry with 'ALC1220_FIXUP_CLEVO_P950', as well.

So in my humble opinion the entry would be:
SND_PCI_QUIRK(0x1462, 0x126a, "MSI-GL63 8SE", ALC1220_FIXUP_CLEVO_P950),

Can you confirm that the device id is '0x126a' and 'ALC1220_FIXUP_CLEVO_P950' are correct?

My Alsa-Info:
http://alsa-project.org/db/?f=cb80836f4642e3742d63d129565d0b7471199e55
Comment 14 Martin Vernay 2020-04-30 20:33:36 UTC
I'm getting the same issue on a Leopard GP73-8RE laptop from MSI: by default internal speakers don't work. To make them work I need to reassign the "headphone" entry in `hdajackretask` to internal speakers. When doing so however, headphone and speakers are no longer dissociated by `alsa`, and as a result it's not possible to mute internal speakers when headphones are plugged in.

The 'clevo' solution worked for me. Its implementation is detailed in this very useful post:
https://unix.stackexchange.com/questions/539615/pulseaudio-no-sound-from-speakers

> MSI GL73 apparently uses the same ALC1220 sound codec and also needed the
> same fix in sound routing as Clevo P950. As a wild guess, you might try
> adding a file named `/etc/modprobe.d/sound-fixup.conf` with the following
> content:

> options snd-hda-intel model=clevo-p950

> Then run `update-initramfs -u` as root to make sure the change will be
> effective in early boot also, then reboot and see if it results in an
> improvement. If MSI has wired your model the same as the GL73, this might fix
> it. If not, delete the /etc/modprobe.d/sound-fixup.conf file and run
> `update-initramfs -u` again to fully get rid of the option.

That being said, the microphone jack does nothing. But, with the internal microphone working correctly, this is a secondary issue.
Comment 15 bes1002t 2020-05-07 08:26:19 UTC
@Martin Vernay, I just opened a new issue for my GL63 and @Takashi Iwai fixed it immediately. Fix for my laptop will be in 5.7 kernel if I am right.

So if you don't want to build your own kernel with a patch, you have to keep this workaround for a few weeks.

Note You need to log in before you can comment on or make changes to this bug.