Author Topic: [Coding] Sensors Daemon  (Read 12745 times)

Offline veradg

  • Full Member
  • ***
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 112
  • Reputation: +102/-0
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #75 on: April 04, 2012, 08:08:52 PM »
You are not allowed to view links. Register or Login
No! :(

But now it is! ;)
This app can replace memsicd: You are not allowed to view links. Register or Login
Source: You are not allowed to view links. Register or Login

Install: overwrite the memsicd on /system/bin/ with the new daemon. Make a backup before... ;)

For testers:
With a sensor app running (like speedx) you can open a terminal and type:
1. su
2. killall memsicd     // I supose that memsicd is the new daemon...
3. memsicd <delay_ms>  // delay_ms is the delay in miliseconds - default is 25...

Specifically which file is that I have to replace that? I have to rename the downloaded file (G5sensors-deamon) by memsicd?

MADTeam Forum

Re: [Coding] Sensors Daemon
« Reply #75 on: April 04, 2012, 08:08:52 PM »

Offline Trenico

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 58
  • Reputation: +72/-2
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #76 on: April 04, 2012, 08:58:15 PM »
Works great on Miui rom, i put v3.3 on miui rom, and it gets better when you use keyboard on landscape and also on settings, and when i use the Miui compass, it works perfect, thanks :D

MADTeam Forum

Re: [Coding] Sensors Daemon
« Reply #76 on: April 04, 2012, 08:58:15 PM »

Offline [Saint]

  • Hero Member
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 117
  • Posts: 989
  • Reputation: +641/-28
    • View Profile
    • www.rockbox.org
Re: [Coding] Sensors Daemon
« Reply #77 on: April 05, 2012, 12:17:15 AM »
Perhaps I'm missing something here...
I thought that this sensor daemon was already included in the current release for Europa (barring recent changes of course)...but when I compare, the file present in the ROM is approximately one third the size of the binaries available in the first post.


[Saint]
Please don't PM me about support issues.
Personal Messages for support will be ignored.

Offline anantttt

  • Full Member
  • ***
  • Thank You
  • -Given: 2
  • -Receive: 10
  • Posts: 227
  • Reputation: +125/-1
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #78 on: April 05, 2012, 03:54:00 AM »
You are not allowed to view links. Register or Login
Perhaps I'm missing something here...
I thought that this sensor daemon was already included in the current release for Europa (barring recent changes of course)...but when I compare, the file present in the ROM is approximately one third the size of the binaries available in the first post.


[Saint]

yep, just wondering the same...
the file present in the rom is just 22kb......
ROM                  --- CyanMobile-Revo
BASEBAND        ---- BVJJP9
GOVERNOR       ---- SmatassV2
Cpu                  ---- Min:122mhz    Max:604mhz

Offline stef

  • Full Member
  • ***
  • Thank You
  • -Given: 28
  • -Receive: 5
  • Posts: 224
  • Reputation: +119/-4
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #79 on: April 05, 2012, 05:28:50 AM »
You are not allowed to view links. Register or Login
Perhaps I'm missing something here...
I thought that this sensor daemon was already included in the current release for Europa (barring recent changes of course)...but when I compare, the file present in the ROM is approximately one third the size of the binaries available in the first post.



[Saint]
And if you copy it into system/bin  you have to activate it otherwise compass freezes!

Offline OuNao

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 14
  • Posts: 331
  • Reputation: +516/-0
    • View Profile
Re: Re: [Coding] Sensors Daemon
« Reply #80 on: April 05, 2012, 05:56:27 AM »
You are not allowed to view links. Register or Login
Perhaps I'm missing something here...
I thought that this sensor daemon was already included in the current release for Europa (barring recent changes of course)...but when I compare, the file present in the ROM is approximately one third the size of the binaries available in the first post.


[Saint]
The way I build the binary is different then psyke...

Sent from my GT-I5500 using Tapatalk

dondkz

  • Guest
Re: [Coding] Sensors Daemon
« Reply #81 on: April 05, 2012, 07:36:48 AM »
How to instal this sensors?

Offline Wanderlei

  • Great Donor
  • Full Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 166
  • Reputation: +173/-0
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #82 on: April 05, 2012, 07:41:19 AM »
You are not allowed to view links. Register or Login
How to instal this sensors?

Get the file and put it on /system/bin
You can use root explorer or save in sdcard and use ADB:
adb remount
adb shell cp /sdcard/g5sensord /system/bin/g5sensord
adb shell chown root.system /system/bin/g5sensord
adb shell chmod 755  /system/bin/g5sensord
rom: [Galaxy 5 CyanogenMod 7.2.0-RC2 - 2.6 - 20120702 by psyke]
recovery: [ClockWorkMod 5.5.0.4]
swap: [Internal Swap 64mb]
ext: [512mb - S2E]
sdcard: [MicroSDHC Kingston 8 GB Class 4]
cpu: [SmartASSV2 122-604 Mhz]
baseband: [I5500BVJJP7]
laucher: [Holo Laucher]

Offline Noivern

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 44
  • Reputation: +27/-0
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #83 on: April 08, 2012, 10:15:09 PM »
Hi again!
I'm sorry if i sounded like a douche in the last post u.u, i never tried to demand a a solution.
BTW, now i'm reporting how the new daemon  (3.3) works (installed manually via root explorer): it goes awesome at 90°! Thanks OuNao, you rock :)

Offline OuNao

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 14
  • Posts: 331
  • Reputation: +516/-0
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #84 on: April 15, 2012, 06:41:45 PM »
New version on first post.
Only minor update to remove compass dancing issue... ;)

Offline psyke83

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 1205
  • Posts: 1834
  • Reputation: +3552/-37
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #85 on: April 18, 2012, 12:54:03 AM »
OuNao,

Nice with as always with the daemon code improvements.

I'm wondering if you noticed some odd behaviour related to sensors on the G5. Although it happens with your daemon, it's not your daemon's fault, as the memsicd binary shows the same problem.

If you have sensor rotation active, screen on, no apps open (just on the home screen with no active widgets etc.) and using the ondemand CPU governor with no overclock, the CPU frequency will always alternate between 122Mhz and 600Mhz. While this is happening there is unusual CPU activity noticeable in top - the phone really seems to be idle. This is definitely caused by the kernel i2c / sensor drivers.

I tried testing some of the sensors in isolation using the Sensor List app from the market, and it seems that both the bma023 and mmc31xx drivers individually cause this problem (I tested by disabling screen rotation, and activating just one sensor at a time in the app).

I'm assuming the problem is due to the high I2C bus activity or some problem with the actual sensor drivers. I tried some silly stuff, such as replacing all instances of "mdelay" with "msleep" in the sensor kernel drivers (no effect), and increasing the poll delay in your daemon (doesn't really help even if you double the delay). I wonder if there's anything we can do to reduce the problem?
Please do not send me PMs for support issues. Use the public support threads for support, and send me PMs only for messages that are private. Thank you.

Check out You are not allowed to view links. Register or Login

Offline OuNao

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 14
  • Posts: 331
  • Reputation: +516/-0
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #86 on: April 18, 2012, 05:14:28 PM »
You are not allowed to view links. Register or Login
OuNao,

Nice with as always with the daemon code improvements.

I'm wondering if you noticed some odd behaviour related to sensors on the G5. Although it happens with your daemon, it's not your daemon's fault, as the memsicd binary shows the same problem.

If you have sensor rotation active, screen on, no apps open (just on the home screen with no active widgets etc.) and using the ondemand CPU governor with no overclock, the CPU frequency will always alternate between 122Mhz and 600Mhz. While this is happening there is unusual CPU activity noticeable in top - the phone really seems to be idle. This is definitely caused by the kernel i2c / sensor drivers.

I tried testing some of the sensors in isolation using the Sensor List app from the market, and it seems that both the bma023 and mmc31xx drivers individually cause this problem (I tested by disabling screen rotation, and activating just one sensor at a time in the app).

I'm assuming the problem is due to the high I2C bus activity or some problem with the actual sensor drivers. I tried some silly stuff, such as replacing all instances of "mdelay" with "msleep" in the sensor kernel drivers (no effect), and increasing the poll delay in your daemon (doesn't really help even if you double the delay). I wonder if there's anything we can do to reduce the problem?
Yes! I only need to remove all i2c calls from code... ;) kidding... :)

There´s some way to change the cpu governor code to avoid scale up the CPU frequency on i2c call? I´m don´t know how the cpu governor work, maybe we can change the cpu scale trigger...

Offline psyke83

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 1205
  • Posts: 1834
  • Reputation: +3552/-37
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #87 on: April 19, 2012, 12:03:01 AM »
You are not allowed to view links. Register or Login
Yes! I only need to remove all i2c calls from code... ;) kidding... :)

There´s some way to change the cpu governor code to avoid scale up the CPU frequency on i2c call? I´m don´t know how the cpu governor work, maybe we can change the cpu scale trigger...

;)

As an experiment, I backported the cpufreq, timer and sched drivers from codeaurora's android-msm-2.6.35 branch. It works a little better, with ~60% spent at 122Mhz, 30% at 600Mhz and a few percent for the intermediate frequencies. Maybe I'll try to backport the 3.0 kernel version and see if that's any better.

Maybe the .32 version can work well with some minor tweaks, but I'll try the later versions anyway. To be honest, I'm not really happy with the smartassV2/interactiveX governors, and the conservative governor doesn't give a good balance of battery/performance.
Please do not send me PMs for support issues. Use the public support threads for support, and send me PMs only for messages that are private. Thank you.

Check out You are not allowed to view links. Register or Login

Offline beppe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
  • Reputation: +0/-0
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #88 on: May 16, 2012, 12:46:53 PM »
Really a great job! :D

I'd have a couple of question:
does the g5sensored  daemon work on stock rom? can i fix the compass problem?
edit:i found out by myself: NO

for installation i just have to insert the module g5sensored, or do i also have to kill or delete the memsicd module?
thanks
« Last Edit: May 16, 2012, 12:54:30 PM by beppe »

Offline armalyte

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 38
  • Reputation: +11/-0
    • View Profile
Re: [Coding] Sensors Daemon
« Reply #89 on: July 24, 2012, 06:12:08 AM »
i'd like to download the binaries but it seems like github only hosts the sources and the link to the binaries isn't valid anymore.

 

SimplePortal 2.3.5 © 2008-2012, SimplePortal