yashsingh1/xdaforums huggingface dataset:
[Atrix 4G Android Development] iTaisHi:
thanks K ,

Is that relevant also for KK444 BigPart CM11 ?

Sent from my Atrix 4G KK444, Z's CM11v4 , P's 20150205 kernel.
[Atrix 4G Android Development] krystianp:
If it's not in audio group (and i suspect it isn't), it's relevant.

Edit:

Is there anyone using Atrix on cm9 or 10.2 that would want to test cpu hotplug feature (maybe working this time) and better camera focusing?
[Atrix 4G Android Development] marcovrv:
I might try but currently i'm on KK BigPart. Is there a way back?
[Atrix 4G Android Development] vicfuze:
I am on atrics since its the latest fully functional rom but battery life is the showstopper for regular use but can test.
[Atrix 4G Android Development] todobarato:
Hello krystianp,

I can restore my last backup and test it.

Tell me where to download.

Best regards.
[Atrix 4G Android Development] krystianp:
I can prepare kk kernel but i need someone to get kernel's config and boot.img from that kk build.

I the mean time here are kernels for cm9, atrics and cm10.1 and new extdispservice.apk that i rewrote. extdispservice will work only on my kernels (@polesapart kernel has limited buffer for second fb). Also it doesn't make your lapdock to display properly yet. We need another service and library to switch resolutions and orientation (but i'm working on it) . Also I've included uv'ed kernels, since I'm using those personaly (for anyone who can use it).

kernels and extdispservice

Edit:

Be careful if you use hporch32 kernel. It's not compiled in. Also another issue is that with anything not default in panel settings causes screen glitches after some time. So I'll make another attempt at fixing it differently.
[Atrix 4G Android Development] PolesApart:
I think that I reverted that on latest kernel in beta folder. If not, it's in sources (probably already on github) and will reappear in next versions.

I'm currently short on spare time and one of my Atrix's touchscreen died, so I'm a bit away for the time being, but very glad to see development.

Also, I did get a functional cpu hotplug on latest beta (been using it daily), did you take a look at it?

Thanks for all your work man!

P.S..: I would love to know what you did to focuser, did you set it to infinite focus, changed default focus mode, changed it's config parameters, or none of the above?
[Atrix 4G Android Development] todobarato:
HelloKristianp,

I tested the kernel-2015_03_19_08_07_cm9.zip

The CPU hot plug works Ok, but it go into deepsleep and only war possible to wake with battery remove.

The camera focus was working correctly too.
[Atrix 4G Android Development] vicfuze:
Tested: kernel-2015_03_19_08_07_atrics.zip

Camera is zippy and focus seems to work!

Wifi is not working though, does not turn on at all. No problem with screen wakes so far.
[Atrix 4G Android Development] BPinard:
It's wonderful to see work is still being done on the Atrix 4G. If I can be of help testing kernels or roms, let me know. I don't check this forum very often (it is no longer my primary device) but I am still eager to help test stuff out.
[Atrix 4G Android Development] krystianp:
Is your beta in kitkat branch? I didn't look at you hotplug but I wouldn't mind checking it. As for focuser, i did some modifications to config parameters. I have limited max position (so it doesn't hit it's casing) and set lowest position from 140 to 1 (maybe even 0 could work). I'll update github repository today.
[Atrix 4G Android Development] krystianp:
Interesting... Was it (this sleep of death) single case or you can recreate conditions to make it hang. If so then did you have wifi or modem turned on?
[Atrix 4G Android Development] krystianp:
That is strange that wifi doesn't work. It might be due to some config changes that i did to wifi config. I merged all the [MENTION=4964106]PolesApart[/MENTION] kernel changes he used in stable kitkat kernel. It's not the wisest move (since we use different drivers on cm9/atrics and kk) but it was working fine on cm9. I'll recheck commits and try to fix it.

I'll try to get my hands on Lollipop rom since Z is currently dealing with his personal stuff. But I'm not making any promises it will be successful :D My rom building knowledge is fairly limited. Also I'd like to fix our LCD issues, so I'm asking if there are still people with problematic tegras?
[Atrix 4G Android Development] J()KER:
K, what about mic issue?
[Atrix 4G Android Development] krystianp:
What about it? My memory is good but short:D please remind me what is wrong with mic.
[Atrix 4G Android Development] iTaisHi:
What do you mean by "problematic tegras" ?

And is it a question only for CM9 version ?

The focusing improvement is also for kitkat ?

When I change a system file (like "hwcomposer.tegra") do I need make a kind of wipe ? Cache? Dalvik ?

Sent from my Atrix 4G KK444, Z's CM11v4 , P's 20150205 kernel.
[Atrix 4G Android Development] J()KER:
it does not work in Skype, Viber, etc.
[Atrix 4G Android Development] todobarato:
Hello krystianp,

I was with cell data on, I will try to repeat it.

I remember you the Mic issue, the one that doest let Skypet to work correctly...but it is weird, the first call works Ok in Skype, but the second one isn't working any more the Mic.
[Atrix 4G Android Development] PolesApart:
Yes, and the framebuffer change was merged: https://github.com/polesapart/andro...mmit/34745c07b66ff37f4644b31f85d8daaada78a48d

(is the above right?)

IIRC the latest compiled kernel in the beta folder included this change, but I may be wrong (it's been a while).

---------- Post added at 08:58 AM ---------- Previous post was at 08:48 AM ----------

I didn't use skype on the atrix for ages (IIRC last time I used it was in epinter's 10.1 with 2.6 kernel). Today I did a test and it worked for maybe 20s, and then the other side (which was my wife on the next room) got very very loud noise. The subsequent calls all had noise from the start. The noise has some randomness in it (as in static), seems like random kernel memory is being read instead of the sound buffer, perhaps a wild pointer.

---------- Post added at 09:01 AM ---------- Previous post was at 08:58 AM ----------

IIRC it seems to trigger w/ auto-hotplug when the phone gets hot. A user reported he had in epinter's too (there was a 3.1 kernel w/ auto-hotplug but IIRC epinter disabled it afterwards). In the kitkat thread there's some discussion on a (ugy) workaround he put in place to avoid deep sleep until the temperature lowered. Not really sure on the details.
[Atrix 4G Android Development] krystianp:
Some tegras have unstable DSI and cause problems during waking SoC (usually those who need hporch32 kernel).

no, it's hardware problem (on any rom with 3.1.10 kernel)

Focusing is also hardware related, so updating kernel will fix for all using it. After changing hwcomposer you just have to restart your device.

I'll take a look at recording issue again then. Maybe during this weekend but it all depends from my personal stuff.

Do your best to hang it;) This way I'll be able to narrow this issue. It might not be related to hotplug or it might be related :D

Yes that's right.

My testing atrix has damaged audio (doesn't work at all) but i think i have one spare board that I might test it on. I'll do some tests to verify when and why it behaves like that.

It might be but i wouldn't go with temperature monitoring but rather clock monitoring. I can perform some tests on my uart enabled atrix. It will give me some more logs, up to last moment before deepsleep. Though question is if my atrix will behave badly in that case. Again, it might be tegra specific.
[Atrix 4G Android Development] J()KER:
about trouble with microphone, I think that the stereo puts all the blame on it. If in LgCamera to mark the option "turn off stereo" then record goes with the sound, otherwise only noise records.

MB add up to turn off a second mic at all?
[Atrix 4G Android Development] krystianp:
Thanks for the clue, I'll test stereo recording.
[Atrix 4G Android Development] krystianp:
New kernel with new approach to panel issues. This is very first release just to test if that is giving any positive results. Don't worry about something else not working just focus on turning panel on/off. It wakes slowly but it's intentional, in final version it will be fully functional as before. Can someone send me kk boot.img from their rom, I can prepare kk build also if anyone is interested.
[Atrix 4G Android Development] krystianp:
Also few things to mention. You might sometimes see screen filled with random pixels before it turns normal, don't worry about that, it's not related. Second thing is if you get screen issues then right away get kernel log. every wakeup there is bunch of olympus_set_clock something in log. So locate one that is wrong and send me log with time pointing to that wrong wakeup.
[Atrix 4G Android Development] J()KER:
https://yadi.sk/d/U3zh5H1DfQVUQ
[Atrix 4G Android Development] krystianp:
Thanks, I'll make kernel for kk this evening when I get home.
[Atrix 4G Android Development] todobarato:
Hello,

I installed it, but the screen wake only 3 times after boot, the next issue is that the touch function in the screen is dead, no reaction at all. After wake the screen 3 times comes the dead sleep...only battery remove help...sorry I cannot check for log s...
[Atrix 4G Android Development] krystianp:
On what rom were you testing this? Is it your daily rom? Either way send me kernel config of your stable kernel.
[Atrix 4G Android Development] todobarato:
Hi,

I use CM9 with your kernel, the last stable that you published months ago..

Where can I find the config?
[Atrix 4G Android Development] krystianp:
It's in /proc folder, file called config.gz
[Atrix 4G Android Development] todobarato:
Ok, I find it, it is the stable kernel that was in my backup of CM9.
[Atrix 4G Android Development] krystianp:
Here is first version of kk kernel. This is same version as those above, just with kk ramdisk. Be sure to have somewhere backup of your current, just in case it doesn't boot.
[Atrix 4G Android Development] krystianp:
This is new kernel for cm9 that was build with your config. It still might cause issues as I have merged PolesApart's kk branch in it. If it doesn't work I'll make new kernel without those commits.
[Atrix 4G Android Development] nozorrog:
Thanx, but wifi is not working.
[Atrix 4G Android Development] krystianp:
I'm aware of that. This kernel is for atrixes that have panel issues (usually needing hporch32 version). I just want to test if this proof of concept actually works. In future I'll recompile kk kernel with kk defconfig.
[Atrix 4G Android Development] J()KER:
Thanx, my Atrix works fine with this kernel. No dead sleep and other panel issues have been reported - all works fine.

On CM9 and 10.1 i use hporch32 version of kernel, but on KK i dont need this.

K, please please focus on mic issue.

P.S sorry for my bad english.
[Atrix 4G Android Development] todobarato:
Hi,

This kernel works Ok for me.

Best regards.
[Atrix 4G Android Development] krystianp:
Mic recording app

I've created simple app to test mic settings. But since there's many options available I need this community help. Please test different configurations. Any bad or similar to Skype issue might give me clue where to search for solution. App might crash in some cases, as not all configs are possible, so you can check logcat for crash logs.

Good, then I'll use it for future kernel test releases.
[Atrix 4G Android Development] J()KER:
it is strange, but after reinstall kernel (after installing your test kernel) lgСamera ceases to record sound (your app too). I installed AlsaMixer (I also installed it for experiments before) and set Analog Left to Off. After that LgCamera starts to record sound (settings: source: MIC; Codec: AMR_NB; Stereo: OFF), your app starts to record sound too (settings: Mic source: MIC; Sampling Rate: 8000; Encoder: AMR_NB; checkbox Stereo is marked on, if the chekbox is unmarked the sound isn't recorded). Mic works only once, after a first record setting Analog left changes to default (Mic2) and starts to record the noise only. That's why before every record you need to set Analog left to off. But this is not stable. After some attempts the sound stoped to recored in any settings of Analog Left.

Test was made on: KK v3; PA Kernel from november 19.

If you don't have any idea, it seems to me that you should try to turn off Mic2 in kernel and see what it's like.
[Atrix 4G Android Development] krystianp:
What about my kernel, can you test it on mine?
[Atrix 4G Android Development] J()KER:
Yes, everything is similar to your kernel
[Atrix 4G Android Development] todobarato:
Hello krystianp,

I have tested the mic with the kernel that has CPU hotplug enabled CM9, it performs very unpredictable, it records OK sometimes and next try stops to record with any particular reason, I need to close the app and try several times and start to work again.

In Default and MIC works mostly OK, but when it stops to works, no one source works. I test this with the stereo unmarked only.

If I force stop the app and clean the cache works again one time.

Voice-Call never work, it hang-up the app.

I test more and give feedback.

Best regards.
[Atrix 4G Android Development] todobarato:
Hello krystianp,

with the kernel kernel-2015_03_19_08_07_cm9.zip, I get the following issue check the picture.

It comes when the phone is long time in deepsleep and sometimes by wake-up it reboots (probably the cpu-hot-plug). I get about 3 to 4 reboot every day with this kernel.

Best regards.

Best regards.[/QUOTE]
[Atrix 4G Android Development] PolesApart:
Unless [MENTION=4641721]krystianp[/MENTION] can debug the auto cpu hotplug feature it's probably not as stable as I though: it's very likely to be the main responsible for that 1 ~ 2 reboots a day (or more for some folks). It's been a while since I've seen an almost 48h uptime (with several phone usage scenarios: multimedia dock & wifi, car dock & waze & 3g, battery powered & 3g, battery powered & wifi), but since I disabled auto cpu hotplug and recompiled (I also disabled CONFIG_SWAP and accidentally set CONFIG_NVMAP_HIGHMEM_ONLY=y, but it's probably unrelated):

root@olympus:/data/data/berserker.android.apps.sshdroid/home # uptime

13:57:16 up 1 day, 22:59, load average: 0.16, 0.26, 0.40

root@olympus:/data/data/berserker.android.apps.sshdroid/home #

(the load is so high probably because it's docked right now)

I'll keep it running for a few more days and will then try without CONFIG_NVMAP_HIGHMEM_ONLY to see if it makes any difference. Too bad my other atrix is unusable, as I could test it right now.
[Atrix 4G Android Development] krystianp:
is it only with that kernel? Is happening regularily?

So those reboots happen only when waking up or also during normal/heavy usage?

Is it still running without reboots?

P.S. I officially killed my jtag'ed Atrix yesterday :( I'll make new one from my spare semi working one. It doesn't have audio working but for early kernel logs it's fine.
[Atrix 4G Android Development] PolesApart:
Nope. It rebooted this dawn. I've got a last_kmsg capture but looking at it I don't yet have a clue where the problem could be. It ends barking about missing sdhci interrupts, but before that it has crazy OOM killer activity, wifi barking, binder complaining and all sorts of things. I'm attaching in case you want to take a look. last_kmsg tends not to be highly useful but I don't have a jtag or anything.

I'll start testing the same version without CONFIG_NVMAP_HIGHMEM_ONLY today, as if that has no impact on stability, it should allow more 3d apps to run (not that I noticed anything out of ordinary, but I just play dumb games now and then).
[Atrix 4G Android Development] krystianp:
[MENTION=4964106]PolesApart[/MENTION] Do you have sdcard inserted? If so, have you excluded possibility that it's because of that?
[Atrix 4G Android Development] PolesApart:
I have a sdcard, and something like it's firmware halting could be the culprit indeed (it could be the wifi too, it's sdhci right?). If that's the case, too bad it leads to a reboot, normally drivers can cope with that (by resetting the sdhci controller and vanishing the block device, followed by it's reappearing, fsck & remount). But if it's just that it should be seldom, and if it's the card and not the wifi, cardless folks are going to enjoy very long uptimes.

I'll keep an eye on the logs for the next days. Also, I think I'll soon be able to revive my other atrix, I can leave it on for tests.
[Atrix 4G Android Development] todobarato:
Hello krystianp,
[Atrix 4G Android Development] bobmorsy:
[MENTION=4641721]krystianp[/MENTION] I can't get past the boot logo with the 26/3 kk kernel. I tried several times and waited for like 15 mins.

any clue?
[Atrix 4G Android Development] krystianp:
I was affraid of that. I used my [MENTION=3447717]todobarato[/MENTION] config with only small change for wifi. I suspected kk needs some more changes in config. I'll rebuild it this evening and upload it again.

From user perspective it doesn't really differ. I'm sure there are many improvements but can't really say much about it. I've just recently started looking at 3.4 kernel sources.
[Atrix 4G Android Development] PolesApart:
From my (little) experience with 3.4, it behaves way better than 3.0/3.1 at flushing dirty pages (it's more smooth, 3.0 was a regression compared to 2.6) on both foreground and background cases, and also in dealing with low memory (where it needs to flush dirty data and also search for pages to discard).

Recent phones behaves way better on both accounts (but most of the ones I played had 3.10 kernel), but I suspect that they have recent and (way) faster eMMC, and it may also play it's part on the equation.

Is there any 3.4 kernel for android with (already working) tegra2 drivers?
[Atrix 4G Android Development] nozorrog:
We have some 3.8 kernel for the Acer Iconia Tab a500 based on the same hardware as our Atrix 4G. Isn't possible to build a proper kernel for us? Thanx for advance.

http://forum.tegraowners.com/viewforum.php?f=9&sid=38a4b0f4dfc429c69e65bd76d9ae4f2d
[Atrix 4G Android Development] PolesApart:
First of all: is it stable? If not, it's not even an option.

Assuming it is stable, then it's hard to say if it's feasible. If we are so lucky that all needed drivers are present and flatened-device-tree-aware (CONFIG_USE_OF & related options), it would be just a matter of setting some text files for binding devices to resources and voila.

Real life tends to be tricker than that. Think the motorola xoom: it's probably the most similar hardware to atrix (even considering it has a great deal of differences) and AFAIK they still run it on 2.6 kernel, and it's not for nothing.

So I would expect at least a bit of hardcore porting and debugging required. With just a little of that, we're probably talking a lot of work, but would still be feasible.

Now, if it's a little cruder than that, then huge amounts of porting / merging / debugging is required. I can only speak for myself, of course, but I don't think that anybody else here have that amount of free time in their hands...

The thing is that it's not a "try and succeed" task, meaning no guarantees it would result in a overall better experience (sometimes for several reasons the newer kernel performs poorer and it's hard to fix/optimize). Also, the kernel <-> userspace layer could have incompatibilities. Linux APIs changes a lot. Things like sound on newer kernel could require library changes. Some of these libraries aren't exactly open source and sometimes there's a way around, but sometimes not. I'm not sure if that's the case or not.

I'm afraid this is getting too off topic, can we ressurrect the kernel thread or something should anyone is really interested in this endeavor?
[Atrix 4G Android Development] palmbeach05:
My bad for that, i was looking for a quick opinion from krystian about the difference between kernels on our devices (we both have devices from the same chipset family). It then spilled into a discussion about upgrading our kernel here on the A4G.

It is an interesting theory though. I do have to agree I have seen better performance out of newer kernel (version number i mean). While each release on our 3.1.10 does get better and better, I do wonder if we should look into the possibility of updating it to a higher version number. Could it improve our device? Yes, it could. But it could also lead to issues, esp with as you were saying, libraries that aren't open sourced. There's also the age of the technology to consider as well. Will things break with an increased revision? I fully back an improved kernel, esp based off of our device's past track record to get to this point.
[Atrix 4G Android Development] krystianp:
I have somewhere partially ported 3.4 kernel. I used tegra4 kernel from nvidia git server. I stopped at some point, afair most of olympus code was implemented but kernel had some compilation errors related to tegra, some parts weren't resolved for t2. Maybe it was updated since then, i can upload it on github if anyone wants to look at it.

I've uploaded kk kernel, should work now.
[Atrix 4G Android Development] vicfuze:
With today's kernel, kernel-2015_03_26_06_56_atrics.zip

Wifi is working

USB storage now works for me

Camera still zippy

Now testing battery life
[Atrix 4G Android Development] bobmorsy:
[MENTION=4641721]krystianp[/MENTION] I still can't get past the boot logo using the latest kk kernel.

I wiped cache and dalvic then flashed the zip in cwm over kk v4...am I doing something wrong?
[Atrix 4G Android Development] krystianp:
I suspect I'm still not using correct config. I'll check config from that first build for kk and use that.

Also I'd like to mention that there is a bug somewhere in kernel. Somewhere in code there is a cap on CPU with 760MHz value. Unfortunately it's not removed so CPU is stuck at 760MHz max. That might lead to thinking that CPU hotplug is failing to boot second core. But this time it isn't, hotplug boots second core @812MHz which is never reached. I'll locate that 760MHz cap and find why it's not removing it when needed.
[Atrix 4G Android Development] todobarato:
Hello krystianp,

the last kernel: kernel-2015_03_26_06_56_cm9.zip, it is very unstable, it reboots after about 20min and continues rebooting by about every 30min.

But the kernel-2015_03_19_08_07_cm9.zip is absolute stable, I tested today with everything enabled on it, 3G, GPS, blue-tooth ( music streaming and hands-free) by driving and works perfectly, no reboots at all. The CPU-hotplug works OK, I like the interactive governor, it reacts extremely fast up and down with the Mhz and the cpu1 get disabled and enabled according.

Best regards,
[Atrix 4G Android Development] PolesApart:
Since you merged my changes, see if I didn't mess (too much) with clock sources: I remember changing some things in pll related files.
[Atrix 4G Android Development] iTaisHi:
That's helps, thanks ,

But now there is a new error :

E/audioHardwareMot( 206): Error:Cannot change SMP affinity for IRQ 124 (Permission denied)

Any suggestion?

And by the way,

What's the different between this chown command vs give "write" permission to "other"?

Sent from my Atrix 4G KK444, Z's CM11v4 , P's 20150205 kernel.
[Atrix 4G Android Development] krystianp:
You don't want to give access to anybody to cpu. Giving write permisions to everybody might end up badly. Minimise access to lower layer only to those who really need it.
[Atrix 4G Android Development] iTaisHi:
do i need run the chown command after every reboot ?

cause after reboot the error is back.

any idea for a solution for the 2nd error?

E/audioHardwareMot( 206): Error:Cannot change SMP affinity for IRQ 124 (Permission denied)

thanks again.
[Atrix 4G Android Development] krystianp:
To have it persistent you have to add it to init.olympus.rc file.

I'm not sure why audio want's to change i2c affinity settings. Anyway... you can try changing /proc/irc/124/smp_affinity group with chown like previously.
[Atrix 4G Android Development] marcgarcia322:
hello i'm new here and i'm trying to get the laptop working on this rom any help would be much appreciated

thank you for any help