Comment 90 for bug 1851518

Revision history for this message
jhubuntu20 (jhubuntu20) wrote :

@PowerKiKi
@terrymagnusdrever
@gannon1

Just to document this for anyone else that might benefit, attached is the final script I created. I reduced the previous list further from 788 to 358 verbs. There may be a few extra ones left, but probably not many based on my testing, as removing more tends to lose one speaker or not generate enough volume or other weird unexpected side effects. Its definitely a long sequence of blocks of data that is critical as opposed to one or two single statements. Anyway this smaller list appears to achieve the original goal. If anyone ever wants to reduce further, the data is broken into many blocks that look something like this (where the row right after the one that ends with 0x23 appears to be most important - so in this case its one of the 0x20 blocks):

sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x26
sudo hda-verb /dev/snd/hwC0D0 0x20 0xc00 0x0
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x23
sudo hda-verb /dev/snd/hwC0D0 0x20 0x400 0x20
sudo hda-verb /dev/snd/hwC0D0 0x20 0x400 0x0
sudo hda-verb /dev/snd/hwC0D0 0x20 0x400 0xc0
sudo hda-verb /dev/snd/hwC0D0 0x20 0x4b0 0x11

Once you learn to work with the data as blocks it gets a lot easier to sort.

Anyway, as far as what to do with this script....

I was not able to make a kernel patch that worked (maybe Mike can) and I was not able to get early patching to work (which could be me because I have never had any success with early patching). Originally I was just running the script manually at boot, but I found that just creating a simple systemd daemon does the trick (steps below). Now when I boot I have full sound and it seems to last for a while. What was most unexpected was that I also added back the single HDA verb for the headphones (which I specifically tried and found did not work before as a stand alone daemon) and now my headphones work along with the speakers WITHOUT using the custom kernel patch that Mike created. Bizarre, but whatever works.

Since my last script worked for PowerKiKi I feel confident this will work for most Ion owners, but there is nothing in the script that is truly specific to the Ion laptop. The Samsung Flex was released on the same day and appears to have the same audio hardware, so likely this works for flex users too. It may also work for pro or always users, I am just not as sure on the hardware on those.

Steps to create daemon

1) Place the verb script in whatever location you prefer (it needs to stay in one spot)

2) Make the permissions on the script file 777 and +x

3) Create a new daemon file named .... /etc/systemd/system/ionsound.service

4) Place this text in your new daemon file

    [Unit]
    After=network.service

    [Service]
    ExecStart={full path to where you placed the file}/TO912.sh

    [Install]
    WantedBy=default.target

5) Update the daemon file permissions to 664

    sudo chmod 664 /etc/systemd/system/ionsound.service

6) Activate the daemon

    sudo systemctl daemon-reload
    sudo systemctl enable ionsound.service

7) Reboot and you should have sound