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

garchymede commented 7 years ago

yep, there may be a depency about alsa, for me it works fine without pulseaudio, but you need to check all the different channels one by one in alsamixer and then store it (alsactl store). Maybe it has to do with alsa-tools or pulseaudio-alsa that triggers something... I remember having installed pulseaudio and pavucontrol without reason before noticing that and uninstalled them. There could be something related to that.

About the sd card, I had an issue with a 32g one (error 84, but it means it recognised that mmc1 was there). With another card (sandisk) it works great. I checked the forums and reddit, and the reader of the laptop doesn't seem to accept all the sd cards (weird...), but it shouldn't be kernel/driver nor even linux related (errors on windows too! https://www.reddit.com/r/ASUS/comments/4fpwhn/asus_e200hax205ta_microsd_card/

Hope so, don't want to recompile again ...

gravemalte commented 7 years ago

@garchymede Awesome work ! I will test it in the coming days.

Grippy98 commented 7 years ago

@garchymede thanks! Awesome work indeed. Sorry to be unresponsive for the couple of days, still away on vacation with spotty internet. I'll try to take a look at your configs and test it on Debian. It's great to have it on arch but for better or for worse that's where the biggest install base is, which is why I focused on Ubuntu.

Figuring out why Pulseaudio behavior is so seemingly spontaneous would be interesting but I'm not sure where to begin on that front, especially since I won't have the e200 In my hands for another month now.

Grippy98 commented 7 years ago

And as far as DM is concerned i3 is fine for my testing but I'd like to at least make sure it works with LXDE and Unity or Gnome in the future.

garchymede commented 7 years ago

@Grippentech I recompiled the kernel with the latest stable release (4.12.1) and didn't notice any issue anymore with alsa without pulseaudio (but seems that if you install pulseaudio, there's a need to configure it, maybe unloading the hdmi modules could solve this issue).

The only trouble I had with the sound was about headphones detection not muting the speakers, but I tweaked the acpi/handle.sh file (see the repository) and it works fine :)

But, again regarding the sound, there's a hardware 'issue' : that card doesn't seem to accept hardware mixing. That's why I think some thought that sound was broken in the web browser. In fact, it's not the case, it's mainly related to the need to configure dmix with alsa so that the channels could play multiple audio sources. I'm still trying to get that working without oss...

While maknig some debugs on that issue, I noticed that pulseaudio doesn't detect the configuration of the sound modules. At least, this is what happened on my system when I was trying to get pulseaudio, the got rid of it for the sake of i3 lightness! If I'm correct, there may be some options missing in the .c and .h files before compiling, or maybe it's just pulseaudio that needs some tweaks...

About encrytion, in fact, I noticed that many modules needed to be loaded at boot so that the keyboard would let us enter a password (I tried to delete some modules, but they seems to be linked, that's shy the mkinitcpio.conf I use loads a bit of those...). But if you load all modules as I did, cryptsetup is pleased at boot ;)

I think that the config file I tweaked will work out of the box for debian based system, I didn't try it on ubuntu, mint or debian, but it seems to work with void linux, gentoo and slackware on sd card).

What I did was just to get the same sound sources as we used to, and then replace all the sound folder in the last kernel releases with those, then compiled and installed the modules.

If anyone is interested in trying the config file for compiling, don't forget to check if the filesystems you use are chosen (I may have disabled ext4, ext3, ntfs, etc). Same for the cpu frequency (set to 300) and power management, as the default settings on arch (which seems to work very well with the e200). Here's the link of the config file and a tiny desciption of the method I used for a quick compilation if anyone's interested

garchymede commented 7 years ago

--- EDIT --- If you have troubles with having multiple audio sources at the same time, try adding this to /etc/asound.conf (or create a new file if it doesn't exist) :

pcm.!default { type plug slave.pcm "dmix" }

lunetic commented 7 years ago

Hello, first, thanks for your great work and efforts on making this device working for the Linux community. Second, we have loads of X206HA (this is the same as E200HA) devices here to play with ;-)

We found that most stuff works ok (even suspend/hibernate) with the modified 4.12 kernel, but the Microphone is muted and most SD-cards (SDHC and SDXC) won't be recognized. We have Toshiba, Kingston and some noname cards here, none of them work. Is there some easy fix for the built-in microphone? I guess it's just an ALSA configuration issue?

Grippy98 commented 7 years ago

Hey guys... sorry for the long absence... my trip through Europe has settled for a bit and I've once again gained Internet :)

@garchymede thanks so much for the work you've done on the kernel and ALSA conf side, I'll definitely check it out and get it merged into the minimal version of the script once I'm back in the states (in about 20+ days sadly...)

@lunetic I think I speak for everyone when I say you're more than welcome, that's what the Linux community should be about after all!

I'm really not sure what to say on the Microphone side, I'd think it would be an ALSA issue but maybe @garchymede has a better idea.

wjam46 commented 7 years ago

Hi, i have the same issue as kajetan-mazur. But interestingly I first did the procedure here: https://github.com/Grippentech/Asus-E200HA-Linux-Post-Install-Script/blob/master/e200ha_with_sound.sh with Linux Mint 18 and it resolved the sound issue completely. Unfortunately I found Mint was unstable on this laptop - refused to start on 2 out of 3 boots - so I decided to do a fresh Ubuntu 16.04 install (followed by the same procedure) and to my surprise I now have this issue, except my icon is not on mute, but I still have no sound. Any help much appreciated

Grippy98 commented 7 years ago

Hey guys, I'm back... sorry for the long absence. There's a new test release up now with Kernel 4.13 RC6 up, going to test it today and hopefully I'll have a minified version of it by next friday. I'll try to see if I can reproduce your bug @wjam46 with it and if not maybe that's something to try.

wjam46 commented 7 years ago

Hi, Many thanks for the response. In fact I discovered last night that I made an error. I did everything manually and I typoed "sudo mv chtcx2072x.conf /usr/share/alsa/ucm/chtcx2072x/" That doesn't help Sorry about that! But it works fine and I have no other issues apparent.

Grippy98 commented 7 years ago

Glad you got it fixed!

lunetic commented 7 years ago

Tried kernel13.zip on Lubuntu 16.04.3 today. Unfortunately sound ceased to work.

This error repeats in dmesg forever: [ 644.399675] acpi-lpss: suspend DMA

pavucontrol fails with "Establishing Connection to PulseAudio, please wait..." Still waiting ...

lunetic commented 7 years ago

Re-installed kernel.zip from 0.3-folder and sound was working (again). Internal microphone still not recognized with X206HA (is this the same with E200HA?). No acpi error messages in the logs and pavucontrol worked as expected. Note: this is Lubuntu 16.04.3 with all updates applied, just removed kernel13.zip and fell back to 4.12rc. Everything else (incl. Suspend, Hibernate, Fn-Keys, WLAN etc.) works ok.

Grippy98 commented 7 years ago

Yes, I can confirm kernel13 is broken right now. I'm still working on it but have been very busy with other stuff.

Microphone is broken on previous kernels on the E200HA as well with no visible error messages...

I'll note that it's broken for now so others know not to install it yet. I'll try to get a new release out this weekend.

Grippy98 commented 7 years ago

Thank you for the feedback!

federeghe commented 7 years ago

I had pulseaudio continuously crashing with a SIGKILL from the kernel. I found that it takes too much CPU time during startup. If someone else has this problem, I solved it with a work-around, disabling real-time scheduling in /etc/pulse/daemon.conf:

realtime-scheduling = no

So the kernel does not kill your pulse daemon (but you could get a worse audio performance).

divinevalley commented 6 years ago

Hey all, I feel like a stray cat wandering in here... I a total noob and I installed linux (Zorin) because Windows was taking up too much space with its stupid updates, and it seemed like a good solution (as well as an opportunity to learn hehe). I'm having issues with sound not working (as well as probably other stuff but for now sound is the only thing that I really care about). I went through the commands Grippentech/Asus-E200HA-Linux-Post-Install-Script but it's still not working. Does it only work on Lubuntu? I've seen elsewhere while internet searching that audio simply doesn't work with Asus E200HA. not sure if I'm missing something.

Grippy98 commented 6 years ago

Hey, it's great that you're trying to learn! That's what we're all doing in some capacity or another :)

Can you tell me what the output of "uname -r" ?

It might be that your version of linux comes with a newer version of the Kernel than the one I host so it defaults to that. If the output of that command doesn't say something that has "-custom" or something like that, then it's not actually using the one my script installed, in which case you can try to force it to use my version through grub.

For now let me know what that command says and we can help you get it working hopefully :)

The script definetly works on most distros and configs, just may take some finagling, we've simply found annecdotally it works best under Lubuntu because of the way LXDE is configured for some reason.

divinevalley commented 6 years ago

Thanks for the quick response! It says 4.13.0-37-generic

Retch commented 6 years ago

You Started with the generic kernel. You have to choose the modified in grub or purge the generic kernel package.

divinevalley notifications@github.com schrieb am So., 25. März 2018, 16:21:

Thanks for the quick response! It says 4.13.0-37-generic

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

divinevalley commented 6 years ago

I'm sorry, I'm going to need more reading material or other resources to understand that. I know grub is the menu that you get when I press escape as it's booting up, after that I'm completely lost.

Retch commented 6 years ago

Yes, choose the second entry, (the entry under the first start Ubuntu) and the new Kernel.

divinevalley notifications@github.com schrieb am So., 25. März 2018, 16:25:

I'm sorry, I'm going to need more reading material or other resources to understand that. I know grub is the menu that you get when I press escape as it's booting up, after that I'm completely lost.

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

Grippy98 commented 6 years ago

^ What Retch said. Basically you want to use that boot menu to tell Linux to boot with my version of the kernel (the -custom one). Once it starts that way, you can see if sound works or not for you. Assuming everything is good, you can then edit the grub configuration file so it always boots with that kernel.

Let me know if you need any help with that.

divinevalley commented 6 years ago

Ah okay! So i tried it with both options (It says ubuntu, ubuntu, enter setup). I tried with both the ubuntus, it seems like I'm still running the generic... weird. Maybe i need to try running the script again?

I'm going to take a break and go outside for a bit, been indoors all day. not fun haha.

Le 25 mars 2018 16:30, "Andrei Aldea" notifications@github.com a écrit :

^ What Retch said. Basically you want to use that boot menu to tell Linux to boot with my version of the kernel (the -custom one). Once it starts that way, you can see if sound works or not for you. Assuming everything is good, you can then edit the grub configuration file so it always boots with that kernel.

Let me know if you need any help with that.

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

Retch commented 6 years ago

I think you've done not the right steps. The grub should Look Like this: https://goo.gl/images/NkPL8V Go for advanced (2) and choose mot the generic kernel.

divinevalley commented 6 years ago

Alright that took quite a bit of patience from my end hahaha but I got it yay! So now I just adjust the GRUB_DEFAULT to the custom? since the listing was generic, generic recovery, custom, custom recovery, would "2" be the one I want?

2018-03-25 16:30 GMT+02:00 Andrei Aldea notifications@github.com:

^ What Retch said. Basically you want to use that boot menu to tell Linux to boot with my version of the kernel (the -custom one). Once it starts that way, you can see if sound works or not for you. Assuming everything is good, you can then edit the grub configuration file so it always boots with that kernel.

Let me know if you need any help with that.

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

Grippy98 commented 6 years ago

I believe it would be 3 here since you want Custom not generic recovery, but I might be wrong if for some reason it doesn't count recovery as an option. But yes, you'd change GRUB_DEFAULT to that. :)

Retch commented 6 years ago

Another way ist to remove remove Linux-image (generic) for more freue space.

divinevalley commented 6 years ago

@Retch I love how you make things complicated for me :P would you mind explaining how you do that (or sending me to a resource)?

Retch commented 6 years ago

I'm not a pro user, but i know how this ist complicated. You know the TAB - autocomplete function? You can install (apt install) or remove (apt purge) packages over terminal. So put in 'apt purge linux-image' and then autocomplete to the 4.13 kernel. That's how you delete unused packages/Kernels.

divinevalley commented 6 years ago

Okay got it, will do this later. Thank you so much @Grippentech @Retch for your help!!!!

Retch commented 6 years ago

I'm happy if it works. We have to thank grippentech for his time. At this point i've another problem. I want to use Ubuntu Budgie or KDE and I found that the different desktops use different sound servers (or whatever the name is, i mean Pulseaudio and alsa). Do you have an idea how to solve this problem? I installed the distributions (kubuntu, Budgie) and it doesn't worked, so i installed Budgie and KDE over xubuntu or lubuntu and they used theoretisch own sound servers, so i wasn't able to find a solution. Greetings from Germany

Grippy98 commented 6 years ago

Anytime :)

The whole sound breaking depending on what desktop environment is in use thing has been really annoying... I'm going to try and see if I can push a new version of the kernel as well as hopefully a permanent fix for this (not sure how yet, possibly forcing Pulseaudio configs or something) sometime in the next week. If anyone sees this and has any ideas I'd also be up for ideas.

Takashi Iwai it seems has given up on the branch that included the fix we need for this laptop so I'm going to try to see if the changes were mainlined in the current branch of the main kernel and if not try to just port those. We'll see how that goes. Hopefully by easter or so I'll have something interesting for you guys, I just have some exams and a couple of projects to deal with in the next couple of days so that's gonna eat up some of my time.

Retch commented 6 years ago

Idk whether this could Help, I know you have not much time. But I would help you because I've got time, but I don' know how. I've got a server which could be used to 'compile?' new kernels week by week. If you know how we/I could help you, please let us know.

divinevalley commented 6 years ago

Sorry for bothering, I have been having an issue with the screen flashing between the login screen and a black terminal-like login screen, it happens whenever the computer is trying to go on sleep I'm assuming. I'll probably just get in the habit of powering off but I just wanted to see if this was a known issue already. Greetings from France. :)

Le lun. 26 mars 2018 08:05, Retch notifications@github.com a écrit :

Idk whether this could Help, I know you have not much time. But I would help you because I've got time, but I don' know how. I've got a server which could be used to 'compile?' new kernels week by week. If you know how we/I could help you, please let us know.

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

Retch commented 6 years ago

For myself I have to say I hadn't this issue yet. But I don't put the laptop to sleep because of the 'wifi not waking up' error. I have the laptop running next to me, if you could explain the issue more I could try it out. BTW: What Distro are you using with which Kernel (I think now you're running the custom one).

divinevalley commented 6 years ago

oh I also have the wifi not waking up error, glad to hear I'm not the only one haha! yep I am running the 4.12.0-rc1-custom3 on Zorin.

Basically after 10 minutes or so of inactivity, it turns off the screen momentarily and then goes to a black screen that says:

Zorin OS 12.3 myname-E200HA tty1 myname-E200HA login:

then immediately goes to the zorin locked/sign in screen and stays for 5 or 10 min. Then it starts flashing in between the previous black login screen and the Zorin login screen.

Le lun. 26 mars 2018 18:48, Retch notifications@github.com a écrit :

For myself I have to say I hadn't this issue yet. But I don't put the laptop to sleep because of the 'wifi not waking up' error. I have the laptop running next to me, if you could explain the issue more I could try it out. BTW: What Distro are you using with which Kernel (I think now you're running the custom one).

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

Grippy98 commented 6 years ago

@Retch thanks for the offer, I'll try to get a 4.13 version out and get you to test it if you want.

It looks like they basically gave up support for the CX at 4.13, with the last commit being a revert (because the last version broke more than it fixed).

I tried doing a diff between the 4.13 branch and the current stable 4.16 branch of the kernel and well needless to say I feel like a merge is not feasible... there's a 800mb txt file of changes...

That being said hopefully 4.13 will prove as a mild improvement, and I'll try to get it to be smaller once it works and hopefully we can squeeze in some fixes, but I don't know how much progress from the current buggy state we'll get... sadly.

Commit I'm Referencing: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?h=topic/asus-e100h-4.13&id=152c029c88e5b9f590b185eb397483f19a8c0a49

Also see the referenced Bugzilla Thread: https://bugzilla.kernel.org/show_bug.cgi?id=193891#c102

Retch commented 6 years ago

Yep testing is not a problem :) At the moment i'm running a custom 4.13-16 kernel by another developer (FireFlashie). Sound works well like in your 4.12 kernel, but the brightness hotkeys don't work (in your ker. they do). 800mb txt is much, I'm happy that you mess up with all that things. I also tried installing the newest 4.16 kernel through 'ukuu' but sound isn't implemented. Is there a chance to get the drivers in the official kernel?

@divinevalley I don't got an email caused by your last comment, I'll read it later and answer.

heikomat commented 6 years ago

If anyone is interested, i was able to build a 4.16.0-rc5 kernel with audio working on the e200ha (cx2072x).

I'm currently running a last test (to see if what i uploaded to github actually works when freshly cloned).

I did this by cloning the current master from this repo and merging the old fixes for 4.12 and 4.13, manually fixing merge conflicts and updating the fixes along the way.

I'd like to further develop this, with the end result effectively being updated versions of the scripts in this repo, but i only have the e200ha for this weekend, and it already took me the whole weekend to get sound to work :/

Retch commented 6 years ago

@heikomat This are good news. I've the e200 laying here all the time, I find the kernel I'll try it. /offtopic are you from Germany?

heikomat commented 6 years ago

@Retch

/offtopic yes i am

heikomat commented 6 years ago

update to the prev. post

I can't currently test that newly build kernel. Could someone here do that and tell me if sound is working? // @Retch

fegidi commented 6 years ago

Thank-you very much, Heiko, it all works perfectly on my E200Ha. I'm very grateful.

F.


Francesco Egidi Франческо Эджиди fegidi@gmail.com fegidi@bluewin.ch www.egidi.altervista.org

2018-04-02 17:21 GMT+02:00 Heiko Mathes notifications@github.com:

update to the prev. post

I can't currently test that newly build kernel. Could someone here do that and tell me if sound is working? // @Retch https://github.com/Retch

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

ErikHacklin commented 6 years ago

First I would like to thank everyone who has contributed to fixing the sound on the Asus E200HA :) I currently have Ubuntu Budgie 17.10 running and tried to install the custom kernel that Heikomat linked above. After following the instructions provided, I still don't have working audio. Sound settings doesn't find any audio devices and the icon is grayed out on the panel icon. I'm not a linux guru by any means so I might have missed something :S What I did:

If someone could help me finally get sound working, it would be very much appreciated :)

heikomat commented 6 years ago

@Yjnar can you give us the output of

sudo cat /var/log/syslog | grep 'intel\|cx2072x\|pulse\|alsa\|cht\|error'
ErikHacklin commented 6 years ago

Absolutely, there seems to be something funky going on with pulseaudio... output.txt

heikomat commented 6 years ago

@Yjnar what version if pulseaudio are you running? pulseaudio --version

Also what is the output of these commands:

cat /proc/asound/cards
cat /proc/asound/devices

I had a similar problem with pulseaudio on debian once, reinstalling the current testing version (11.1) and reapplying the daemon.conf setting fixed it for me

ErikHacklin commented 6 years ago

Current version of pulseaudio is 10.0. outputs.txt Will try purging and reinstalling pulseaudio next