Laptop only using subwoofer rather then surround sound [duplicate]

I just got the same machine yesterday. Here is what I did to get sound working.

sudo apt-get install alsa-tools alsa-tools-gui

Then using the HDAJackRetask select Realtex ALC255 codec and choose "Show unconnected pins" option. I put an override on the following items: 0x14 - change to Internal Speaker (LFE) 0x17 - change to Internal Speaker 0x1b - change to Internal Speaker (Back)

I played around for a long time with various advanced overrides but could never get it quite perfect, however using these options you at least get good sound on left and right speakers. I don't think it is playing through the front speakers, there are 2 speakers on the bottom front and I believe it is using both of these now. I'm happy with it for now, I mainly use headphones anyway. I should add, I did this on Ubuntu 16.04 and later on Xubuntu 17.04. I was able to get sound working well on both.

On Ubuntu 16.04 I also had to add an override for headphones on 0x21 changing the channel to 2 in advanced options. In Xubuntu I didn't have to do that. This could have been due to playing around with all of the other pins first until I figured out which ones were actually tied to speakers.

I'm hoping an updated firmware or kernel will provide a better fix in the near future.

---Update--- I just installed Xubuntu 19. Not sure if this was an issue 2 years ago, but I cannot get it to apply so I the only way to test is to make the changes above and click Install boot override then reboot and test.

---Update--- Same with Xubuntu 20.04. Same pins above fixed the sound and it has to be applied as a boot override.