Contribute
Register

[Guide] Lenovo Ideapad S340 Laptop on Catalina

Feartech

Moderator
Joined
Aug 3, 2013
Messages
21,249
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
Fix confirmed. I installed CodecCommander.kext to EFI/CLOVER/kexts/Other and put hda-verb to /usr/bin and run these commands and sound distortion problem gets fixed.
Code:
hda-verb 0x19 SET_PIN_WIDGET_CONTROL 0x25
hda-verb 0x21 SET_UNSOLICITED_ENABLE 0x83
Guess I should make a batch file to auto-launch at startup and after wake, cause sound gets distorted after sleep-wake cycle again and I should re-run these commands to fix sound.
no need to do that,

you can rebuild your hda-verb to include those commands, and then install that new hda-verb to /usr/local/bin

you can see the file here:

and scroll down until you see the commands to change

so...

if you go here:
and click the green download zip, download and extract somewhere

edit the main.m file, replace the current section:

Code:
NSString *output1 = [[binPrefix stringByAppendingString:@"hda-verb 0x1a SET_PIN_WIDGET_CONTROL 0x24"] runAsCommand];
    NSString *output2 = [[binPrefix stringByAppendingString:@"hda-verb 0x15 SET_UNSOLICITED_ENABLE 0x83"] runAsCommand];

with your info:
Code:
NSString *output1 = [[binPrefix stringByAppendingString:@"hda-verb 0x19 SET_PIN_WIDGET_CONTROL 0x25"] runAsCommand];
    NSString *output2 = [[binPrefix stringByAppendingString:@"hda-verb 0x21 SET_UNSOLICITED_ENABLE 0x83"] runAsCommand];

then save

then you can build your own by popping in:
Code:
xcodebuild -target ALCPlugFix

then you will have your own unique hda-verb

make sure you have xcode installed :)
 
Joined
Jun 11, 2015
Messages
104
Motherboard
LENOVO IdeaPad S340-14IWL
CPU
i5 8265U
Graphics
UHD 620
Mobile Phone
  1. Android
no need to do that,

you can rebuild your hda-verb to include those commands, and then install that new hda-verb to /usr/local/bin

you can see the file here:

and scroll down until you see the commands to change

so...

if you go here:
and click the green download zip, download and extract somewhere

edit the main.m file, replace the current section:

Code:
NSString *output1 = [[binPrefix stringByAppendingString:@"hda-verb 0x1a SET_PIN_WIDGET_CONTROL 0x24"] runAsCommand];
    NSString *output2 = [[binPrefix stringByAppendingString:@"hda-verb 0x15 SET_UNSOLICITED_ENABLE 0x83"] runAsCommand];

with your info:
Code:
NSString *output1 = [[binPrefix stringByAppendingString:@"hda-verb 0x19 SET_PIN_WIDGET_CONTROL 0x25"] runAsCommand];
    NSString *output2 = [[binPrefix stringByAppendingString:@"hda-verb 0x21 SET_UNSOLICITED_ENABLE 0x83"] runAsCommand];

then save

then you can build your own by popping in:
Code:
xcodebuild -target ALCPlugFix

then you will have your own unique hda-verb

make sure you have xcode installed :)
Thank you so much for this detailed explanation.
I've done everything, build completed. A new "build" folder appeared but there's no hda-verb file inside it. I have that file in "alc-fix" folder and it was there before compiling. Did this process changed it? Should I use this hda-verb file or am I doing something wrong?
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
21,249
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
Thank you so much for this detailed explanation.
I've done everything, build completed. A new "build" folder appeared but there's no hda-verb file inside it. I have that file in "alc-fix" folder and it was there before compiling. Did this process changed it? Should I use this hda-verb file or am I doing something wrong?
ahh, sorry, it will be a custom alcplugfix that gets generated :) copy that one over
 
Joined
Feb 13, 2020
Messages
16
Motherboard
Lenovo S340
CPU
i5 8265
Graphics
HD620
Mobile Phone
  1. Android
no need to do that,

you can rebuild your hda-verb to include those commands, and then install that new hda-verb to /usr/local/bin

you can see the file here:

and scroll down until you see the commands to change

so...

if you go here:
and click the green download zip, download and extract somewhere

edit the main.m file, replace the current section:

Code:
NSString *output1 = [[binPrefix stringByAppendingString:@"hda-verb 0x1a SET_PIN_WIDGET_CONTROL 0x24"] runAsCommand];
    NSString *output2 = [[binPrefix stringByAppendingString:@"hda-verb 0x15 SET_UNSOLICITED_ENABLE 0x83"] runAsCommand];

with your info:
Code:
NSString *output1 = [[binPrefix stringByAppendingString:@"hda-verb 0x19 SET_PIN_WIDGET_CONTROL 0x25"] runAsCommand];
    NSString *output2 = [[binPrefix stringByAppendingString:@"hda-verb 0x21 SET_UNSOLICITED_ENABLE 0x83"] runAsCommand];

then save

then you can build your own by popping in:
Code:
xcodebuild -target ALCPlugFix

then you will have your own unique hda-verb

make sure you have xcode installed :)
Is this working for all models? I have sound issues on my 14" model too
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
21,249
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
Is this working for all models? I have sound issues on my 14" model too
yes, but you will need to work out your pin configs though

for example, i only needed:
Code:
hda-verb 0x19 SET_PIN_WIDGET_CONTROL 0x25

which works fine on my laptop
 
Joined
Jun 11, 2015
Messages
104
Motherboard
LENOVO IdeaPad S340-14IWL
CPU
i5 8265U
Graphics
UHD 620
Mobile Phone
  1. Android
ahh, sorry, it will be a custom alcplugfix that gets generated :) copy that one over
Well, sorry but I'm pretty noob about these things. I didn't understand what you mean.
There's a new ALCPlugFix file inside new "build/Release" folder. Should I use this file? Should I rename it to hda-verb and put it in /usr/bin?
Also only "hda-verb 0x19 SET_PIN_WIDGET_CONTROL 0x25" works for me too. I tried this manually and only this gets it fixed.
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
21,249
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
Well, sorry but I'm pretty noob about these things. I didn't understand what you mean.
There's a new ALCPlugFix file inside new "build/Release" folder. Should I use this file? Should I rename it to hda-verb and put it in /usr/bin?
Also only "hda-verb 0x19 SET_PIN_WIDGET_CONTROL 0x25" works for me too. I tried this manually and only this gets it fixed.
ahh, that's good then, if the code i used works for you then use my files attached, just run the install.sh and you should be good :)
 

Attachments

  • working.zip
    13.2 KB · Views: 45
Joined
Jun 11, 2015
Messages
104
Motherboard
LENOVO IdeaPad S340-14IWL
CPU
i5 8265U
Graphics
UHD 620
Mobile Phone
  1. Android
ahh, that's good then, if the code i used works for you then use my files attached, just run the install.sh and you should be good :)
Great! Problem fixed permanently. Now sleep-wakeup cycles don't break sound.
Thank you so much!
Off the topic but I have MiddleClick app, I'm using it to emulate three finger tap as mouse middle click. It runs on login via System Preferences > Users and Groups > Login Items but I have to run it manually after wake-up. Any idea to solve this issue?
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
21,249
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
Great! Problem fixed permanently. Now sleep-wakeup cycles don't break sound.
Thank you so much!
Off the topic but I have MiddleClick app, I'm using it to emulate three finger tap as mouse middle click. It runs on login via System Preferences > Users and Groups > Login Items but I have to run it manually after wake-up. Any idea to solve this issue?
not sure, someone else had the issue so maybe a bug in the application?

Annotation 2020-04-06 131149.jpg
 
Joined
Feb 13, 2020
Messages
16
Motherboard
Lenovo S340
CPU
i5 8265
Graphics
HD620
Mobile Phone
  1. Android
ahh, that's good then, if the code i used works for you then use my files attached, just run the install.sh and you should be good :)

I can confirm this is working for my 14" i5 8265 model just fine
 
Top