Grippy98 / Asus-E200HA-Linux-Post-Install-Script

A Linux Post install script for The Asus E200HA, X206HA and other Intel Cherry Trail Devices
GNU General Public License v3.0
70 stars 13 forks source link

Sound not working on e200ha #16

Open kajetan-mazur opened 7 years ago

kajetan-mazur commented 7 years ago

Hi

I have just installed new ubuntu 17.04 then i have run script e200ha_with_sound.sa, but it didnt work. I see Your kernel but my button of sound is on mute in the right upper corner if i go to settings and give sound to louder it shows that is ok but the icon is still on mute, here are some jpg: image] image image

kajetan-mazur commented 7 years ago

More photos image

Grippy98 commented 7 years ago

I've tried reproducing your issue. Interestingly enough rebooting broke then fixed it again... you might want to try that.

Also for some reason it looks like it works better when I have LXDE (Lubuntu-desktop package) as my current desktop environment... I wish I could be of more use but I'm not sure what the exact issue is. Most of the time it works perfectly fine.

kajetan-mazur commented 7 years ago

@Grippentech so i will try lubuntu today with Your e200hawithsound and will write if that helped :)

Grippy98 commented 7 years ago

Cool! Hope it works!

kajetan-mazur commented 7 years ago

@Grippentech on lubuntu there is sound,but i cant make louder. I go into volume button and it moves but id does not make sound lower/higher :(

kajetan-mazur commented 7 years ago

After fixing few problems everything works fine but lubuntu should takie 3gb and with all it takes now 10gb of disk space. Is it because the script? Can i clean something?or check what is installed and what can i remove?

gravemalte commented 7 years ago

@kajetan-mazur Nope you can't clear anything. The kernel has an massive size. He will reduce the size in the future. See also #11

kajetan-mazur commented 7 years ago

@Daylien thank U very much for reponse. What languages would i have to know to make such magic as You guys have done?where to start?

gravemalte commented 7 years ago

@kajetan-mazur As far as I know pretty much C and Shell.

Grippy98 commented 7 years ago

Yup sorry to be unresponsive guys. I'm on vacation in Europe at the moment and can't test anything. I could try to do a light kernel build at some point and maybe try to test but won't be able to test until mid August... sorry to say. If someone else wants to test then that could work too. And yes this is basically all a shell script.

If you want I can provide instructions on how to compile it.

Grippy98 commented 7 years ago

The reason it's so big is that the version of the kernel built rn is a very "recommended" version which has modules enabled for a lot of possible devices. This could be reduced significantly by running a minimum version of the kernel which only supports the modules required by the Laptop, but that would decrease the options of external peripherals.

This has been on my plate for a while and I must admit I haven't put as much of an effort as I should have. The couple attempts I did do resulted in the device not booting but that's my fault.

Additionally I believe I had some debug portions of the kernel enabled which also take up a big portion.

gravemalte commented 7 years ago

@grippentech Take you're time. And I think here are more than one person that would test you're awesome work. Btw have fun in Europe ! :D

Grippy98 commented 7 years ago

Thanks! I'll try my best to get some free time to do a build (and a write up on how to do it) as soon as I can, getting an internet connection stable and faster than 2mb/s to clone the linux kernel tree is going to be the biggest issue haha, I'll keep you guys posted, thanks for the help!

kajetan-mazur commented 7 years ago

Hey, where in Europe is so weak connection? im in Poland and have 80mb/s :)

On Jul 5, 2017 11:18 PM, "Andrei Aldea" notifications@github.com wrote:

Thanks! I'll try my best to get some free time to do a build (and a write up on how to do it) as soon as I can, getting an internet connection stable and faster than 2mb/s to clone the linux kernel tree is going to be the biggest issue haha, I'll keep you guys posted, thanks for the help!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Grippentech/Asus-E200HA-Linux-Post-Install-Script/issues/16#issuecomment-313229926, or mute the thread https://github.com/notifications/unsubscribe-auth/AViD7buaU_60dRKYMEL4H_YGrztWOCRvks5sK_26gaJpZM4OHx_J .

Grippy98 commented 7 years ago

Switzerland st the moment and hotel wifi... I'll be in Austria and later Romania in 10 days or so I can enjoy some 300mb/s ;)

Grippy98 commented 7 years ago

Ok guys I took a break from vacationing and did a minified version of the kernel, 122MB before install.

If you want to clone on a fresh system, run this version of the script (new dev branch): https://github.com/Grippentech/Asus-E200HA-Linux-Post-Install-Script/tree/minimalDev

Otherwise, just install (sudo dpkg -i *.deb) this: https://github.com/Grippentech/Asus-E200HA-Linux-Post-Install-Script/releases/download/4.12RC1_min/kernel.zip

Again, this is completely untested but it should work. If you want to test then I'd really appreciate it. Let me know how it goes!

gravemalte commented 7 years ago

@Grippentech Thanks for the quick update !

So installed on a brand new Linux Mint 18.2 Cinnamoon.


Hope i could help you !

Grippy98 commented 7 years ago

Awesome! Thanks for the quick test as well. Îll try to get sound and the rest in order as soon as possible. Can you post a dmesg output when you get the chance to see what kernel messages are being thrown out?

Thanks!

On Jul 6, 2017 11:02 PM, "Daylien" notifications@github.com wrote:

@Grippentech https://github.com/grippentech Thanks for the quick update !

So installed on a brand new Linux Mint 18.2 Cinnamoon.

-

Keyboard

Bluetooth (Doesn't tried a connection only the driver)

The F command keys

Much better Storage now 5,8 GB free with an brand new installation !

Sound driver doesn't detect

Mouse driver doesn't work

Card reader (Atm I have no SD card)

Hope i could help you !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Grippentech/Asus-E200HA-Linux-Post-Install-Script/issues/16#issuecomment-313518473, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0pIkQwh0VwGBIVD4sYhXL4f9oDCVxtks5sLUtngaJpZM4OHx_J .

Grippy98 commented 7 years ago

Also just to clarify, by Mouse do you mean touchpad or external USB mouse?

On Jul 6, 2017 11:02 PM, "Daylien" notifications@github.com wrote:

@Grippentech https://github.com/grippentech Thanks for the quick update !

So installed on a brand new Linux Mint 18.2 Cinnamoon.

-

Keyboard

Bluetooth (Doesn't tried a connection only the driver)

The F command keys

Much better Storage now 5,8 GB free with an brand new installation !

Sound driver doesn't detect

Mouse driver doesn't work

Card reader (Atm I have no SD card)

Hope i could help you !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Grippentech/Asus-E200HA-Linux-Post-Install-Script/issues/16#issuecomment-313518473, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0pIkQwh0VwGBIVD4sYhXL4f9oDCVxtks5sLUtngaJpZM4OHx_J .

gravemalte commented 7 years ago

@Grippentech Right i mean the Touchpad.

I also noticed that the USB ports doesn't work.

Dm.txt

kajetan-mazur commented 7 years ago

Guys im watching You dont worry :)

garchymede commented 7 years ago

This is interesting, i've been trying to get the sound and backlight working on archlinux and i'm still stuck. I've upgraded the kernel to the latest staging one, but that broke everything : i have 35 volume outputs with that on alsamixer, and a kernel panic if trying to read an audio file because of all those output even muted...

I may try a debian based distro (even if i'm not really used to that) and report here my eventual discoveries ;)

Furthermore, I noticed another important issue that hasn't been reported yet (according to my researches) : if you try to crypt the installation (with luks etc.), and then reboot, the internal keyboard doesn't work when it asks for the luks password (the keyboard works in grub, and after the password if an usb keyboard is used to unencrypt the root partition). Of course I tested to load all the different modules, loaded the hooks before mkinitcpio etc. Sounds to me that there's a issue with the keyboard since the backlight keys are not recognized while testing with xev.

garchymede commented 7 years ago

I didn't try any debian based distro yet, but here are some news that may be interesting for your project : I reinstalled entirely archlinux with the 4.12 staging kernel instead of 4.11.9-1, and xfce (instead of my usual i3 session) on the top of that. The improvement is huge since now everyhting is working nicely : keyboard, backlight, wifi, trackpad (mouse, scroll, touch), usb ports, (didn't try the sd slot yet), suspend, power management (up to 14 hours on low backlight withtout wifi!). The sound issue is a bit tricky : the new kernel adds an improvement to the sound card since it is now recognized by alsa and it shows as 'bytcht-nocodec', but the drivers for the exact x2072x sound card aren't implemented, so it's not working... I will try to find if those driver and the config files are laying somewhere on the web so as to put them in the /ush/share/alsa/ucm folder, if that works, the only issue remaining for me would be the keyboard at the luks prompt password for decryption :) Have you tried the latest xfce on your distros ? If so, do you have the same results ?

Grippy98 commented 7 years ago

Hey, sorry but I don't have time to do a full reply to all our notes rn but they are very helpful, I'll get back to you tonight. You can find the UCM file inside the releases section of the distro. See if that works.

I also noticed the encryption keyboard issue but I think that's just down to the keyboard needing drivers that's don't load yet.

On Jul 8, 2017 12:19 PM, "garchymede" notifications@github.com wrote:

I didn't try any debian based distro yet, but here are some news that may be interesting for your project : I reinstalled entirely archlinux with the 4.12 staging kernel instead of 4.11.9-1, and xfce (instead of my usual i3 session) on the top of that. The improvement is huge since now everyhting is working nicely : keyboard, backlight, wifi, trackpad (mouse, scroll, touch), suspend, power management (up to 14 hours on low backlight withtout wifi!). The sound issue is a bit tricky : the new kernel adds an improvement to the sound card since it is now recognized by alsa and it shows as 'bytcht-nocodec', but the drivers for the exact x2072x sound card aren't implemented, so it's not working... I will try to find if those driver and the config files are laying somewhere on the web so as to put them in the /ush/share/alsa/ucm folder, if that works, the only issue remaining for me would be the keyboard at the luks prompt password for decryption :) Have you tried the latest xfce on your distros ? If so, do you have the same results ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Grippentech/Asus-E200HA-Linux-Post-Install-Script/issues/16#issuecomment-313847397, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0pImsSKhE-JjlwsuefYNOpATEy46nUks5sL1etgaJpZM4OHx_J .

Grippy98 commented 7 years ago

Ok so I have a bit of time to try and figure this out and I'm looking through the output you sent me @Daylien

So as far as Touchpad goes: There's no mention of any errors nor does it report finding the device at boot time... nor can I find the specific module to load. Can you try installing this: "https://github.com/vlasenko/hid-asus-dkms" ? It's been integrated into the mainline kernel since 4.10 but oh well... might as well try it. I don't see a mention of the particular module in the config file.

Sound Driver It's reporting that it's loading it correctly... or at least so it seems. I'm a bit at a loss for this without some more troubleshooting for now.

@garchymede The driver and UCM files can be found in this repo by Takashi Iwai: git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git

That is where I've been building my kernels from, you can find a up to date version of the config file I'm using here (https://gist.github.com/Grippentech/3be10b39ea487cc8960166911aff0ad0 (the minified version that has sound broken rn... otherwise just build a kernel with -y or the optimal settings, but it will be really big)):

Grippy98 commented 7 years ago

Also note for the kernel on git, you'll have to switch to branch 'topic/asus-e100h-4.12'

garchymede commented 7 years ago

thanks a lot ! that's really helpful! Going to try this firmware this evening !

About the touchpad's concern, I think I can help you. It seems to me (after having tried all kind of modules to load the keyboard at encryption passwords) that the module is named elan_i2c or i2c_hid. At least that how I decrypted the dmesg...

If that can help, the following modules are the ones that I noticed directly related to the e200 on archlinux : ath10k_pci intel_hid hid_asus hidraw0 (don't know anything about this one though) intel_sst_acpi (failing to load : 'no matching kernel') elan_i2c i2c_hid

garchymede commented 7 years ago

found this on the forum : https://bbs.archlinux.org/viewtopic.php?pid=1712612#p1712612

if I'm not mistaken, the reading is interesting since it seems that they got the sound working without any modification due to a special kernel

Grippy98 commented 7 years ago

From what I see they're only talking about audio over HDMI, nothing related to our Connexant codec. Am I missing something?

On Jul 8, 2017 11:51 PM, "garchymede" notifications@github.com wrote:

found this on the forum : https://bbs.archlinux.org/ viewtopic.php?pid=1712612#p1712612

if I'm not mistaken, the reading is interesting since it seems that they got the sound working without any modification due to a special kernel

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Grippentech/Asus-E200HA-Linux-Post-Install-Script/issues/16#issuecomment-313883113, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0pIozzeqMMZ3SKyNhUXUTCnD-aNUf2ks5sL_negaJpZM4OHx_J .

garchymede commented 7 years ago

na, you're right, I thought at first they made it working together with the hdmi one in alsa, but doesn't seem to be the case at all

garchymede commented 7 years ago

https://github.com/garchymede/CX2072X/blob/master/doc/CX2072X%20Linux%20driver%20porting%20guide_kernel_v3.14.pdf

gravemalte commented 7 years ago

@Grippentech Thanks for the link, but it doesn't work. I tried a fresh Linux Mint 18.2 and a Ubuntu 17.04 I installed it, all works fine excepted the sound. After that I installed the minimal version of the kernel but now the Touchpad driver stopped working.

Sound works as expected (On Linux Mint I forgot to select the right output device my fault sorry). So the only issues for me is the touchpad and the USB ports.

garchymede commented 7 years ago

@Daylien have you tried this command :

_sudo modprobe i2celan

not sure if that could resolve your issue though, but it could be the module that is being broken while messing with the i2c sound card.

What tells dmesg | grep elan and _modinfo elani2c ?

The module for the touchpad is at /lib/modules/KERNEL_VERSION/kernel/drivers/input/mouse/elan_i2c/ko/gz on my side

On my side I have the touchpad, usb ports (2 and 3), bakclights working fine on archlinux, but the sound is driving me crazy. Even tried the mainline kernel with a patch and a custom kernel 4.12-2, still no results after all that compiling time ... Since I blacklisted the hdmi module I noticed that alsa is pleased and there's no error reported in dmesg anymore, but no sound at all, speaker-test is also worried until I reboot once, then works and stops working again (without sound of course)

I will try to install mint now (already got the iso) and see if I can solve the trackpad issue. Damn, i need that sound to enjoy working on this otherwise great laptop !

@Daylien which desktop environment did you install ? I noticed huge differences on how the laptop is supported when switching between i3/lxde/xfce.

gravemalte commented 7 years ago

@garchymede

sudo modprobe i2c_elan says: modprobe: FATAL: Module i2c_elan not found in directory /lib/modules/4.12.0-rc1-experimentalminone

And the the grep command return nothing. Same for the modinfo (just says Module elan_i2c not found)

garchymede commented 7 years ago

mmm, that's what I expected. I think you're missing the module for the touchpad. Once installed on my system, I'll see if this can be solved in an easy way :)

gravemalte commented 7 years ago

@garchymede Looking forward. Hope you can get it ! :D

garchymede commented 7 years ago

that's interesting, booted in the mint installer, and the elan module is well loaded, even if the keybpard is missing. I will try a crazy thing which is to just copy that module on a usb before installing and put it back once installed and patched, just to see ...

Grippy98 commented 7 years ago

Keyboard seems to load sometimes and sometimes not in the installer... more often than not I have found. Otherwise simply installing with a USB keyboard will make it work on boot, after installing the patched kernel at worst. RN sound should work for you if you use the big ('stable') version of the kernel the main script installs. That being said I'm trying to get the smaller version up to speed as well but my Internet connection is... erm... sub par lol.

screen shot 2017-07-10 at 10 29 25 am

Anyway, I have a long train ride ahead of me so I'll see what I can dig up.

Also @garchymede from what I've seen XFCE works preety great from a sheer speed perspective but I seem to get a lot of very weird crashes (that don't affect anything noticeable on the system) when using it.

garchymede commented 7 years ago

I agree with all you've said. Noticed the same behavior about the keyboard and xfce. Regarding the crashes, I didn't notice anything on my system, but didn't use it long enough because of all those installations process... Didn't get the touchpad working on mint, and since I'm not really used to debian specifications, I went back to forge on archlinux. I'm currently building a minimal kernel specially for the e200ah, only the needed modules. Seems that the sound is going to work (failed the first attempts since I forgot to install the f2fs module and it didn't load the efivars ...). The last time I tried the compilation, I did huge mistakes explaining the failure : I simply didn't get the right branch on github (sic), haha. Now, I have the boards and codecs files right, so let's hope. If it works as expected, I may do a list of all the modules used (it's a quick compiling kernel, 20minutes on the old cpu I have atm), or even share the .config I generated with xconfig. I'm pretty sure that the keyboard and touchpad issues are related to another module (I don't remember its name, but it's about asus notebooks, and one specific to e200ah.

garchymede commented 7 years ago

@Grippentech About the minimal kernel, I noticed, while reading the config file of the kernel (/boot/xx), that it's missing the mouse inputs, and that, due to that, there's no mouse folder in */drivers/input. I think that it explains why the trackpad is not working. But the sound is working, the card is well recognized :) There may be another issue about the usb ports, but couldn't check more for now (at least my usb keys are not recognized, nor my external mouse and/or keyboard)

garchymede commented 7 years ago

Great news everyone ! I finally have the results we are looking for !

What is working :

What is not working : full suspend on lid close, but I don't think that this is a kernel issue, it's due to cherry trail processors.

At the moment the full system (archlinux + i3wm) is running damn good for 14 hours battery life. 200M ram at boot, very low cpu load all the time, nothing suspicious in dmesg (except and error with gpt, still trying to find it out). I built the kernel directly from here : [https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=topic/asus-e100h-4.12] and disabled all the uneeded modules. About encryption, the trick was to load ALL the needed modules by modifying the mkinitcpio.conf file (I just added all the hid modules installed on the system), and then modifying the hooks. I may write some things about all the steps and upload the configs on my github once I'll have time to do so :)

andrembpontes commented 7 years ago

Hi @garchymede!! I'm glad to hear you.. I'm trying to install Arch on e200ha for decades without success :'(

Could you please send me your .config file to compile the Kernel???

Another question... It's possible to enable speakers?? Or only headphones are working? It's this a kernel config or an alsa config??? Thank you soo much

garchymede commented 7 years ago

@andrembpontes Hey :) You're very welcome ! Sure ! I'll be glad to help you getting arch on the e200ha! About the kernel, I didn't do anything related to speakers, I just configured it with alsamixer (but I added a keybind in 3, basically mod+mute to enable/disable speakers) :) I did specify an atom processor and stuff like that, but, well, you'll see in the configs. So, yes, it works great !

About the config file, I gonna pull it on my github (extra explanations will come later so that you can get it quicker) ! There may be some adjustments that I'll do later about it, but I can guarantee that it works with archlinux for sure. Which de or wm do you plan to install ? I went for a basic config as I'm used to (i3) but there shouldn't be any problem with any de (except if you install pulseaudio, there a strange behavior of the daemon due to the special codec of the card (a lot of channels and loops).

ps: tell me if you plan to do a full encrypt install or not, since I would need to tell you which modules to enables and the hooks so that you can decrypt at boot :p

andrembpontes commented 7 years ago

@garchymede thanks for your time. I use i3 as wm and I'm not complained about encryption... Just a plain install. I'm excited to leave Ubuntu and embrace a real OS again :p thank you again

garchymede commented 7 years ago

haha :p I put the files on my github, still formating the readme and planning on uploading the mkinicpio.conf so as not to be mistaken about luks encryption once rebooting If you want, I will put my i3 config files later, since I tweaked it for using the the function keys!

andrembpontes commented 7 years ago

I'll test it right now and let you know after how it work ;)

garchymede commented 7 years ago

be careful about the format of your partitions, I don't remember if I enabled ext3 or even ext4 since I don't use those (btrfs is not enabled for sure)

andrembpontes commented 7 years ago

Up and running!! Yeah!! You rock ;) Thanks

some corrections to your README: 1. wget https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?h=topic/asus-e100h-4.12 wget https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/snapshot/sound-topic/asus-e100h-4.12.tar.gz

2. initramfs-linux.img => initramfs-linux.img initramfs-linux.img => initramfs-vivobook.img

Thank you again

garchymede commented 7 years ago

nice ! pleased to see that it works :)

andrembpontes commented 7 years ago

Hello again I reinstalled arch from scratch and sound only works if pulseaudio is installed

I'm not using pulseaudio at all, there is no daemon running but somehow installing it solved my problem... maybe some obscure dependency :s I don't know but everything is working fine now ;)

Also I've checked a 64GB SD Card from SanDisk and didn't work... I have also tried a 2GB from SanDisk and this one has been correctly recognized so I'll say that SD Card Reader is working partially