[Hero, G2 Touch Android Development] pontusp:
Hello,

When I found out this morning that HTC has released their hero-2.6.29-5f74b252, I decided to go ahead and try to compile this without modifications. Just to make sure it works as the pre-compiled version before doing any modifications.

As I'm already running the official 2.1 (ChungHwa, same kernel as the source) I performed the following steps to try to replicate the official build:

Fetch kernel config from my device

adb pull /proc/config.gz config-htc-2.1.gz

Build zImage

export PATH=$PATH:<path/to/android/source>prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/
gunzip -c ../config-htc-2.1.gz > .config
make -j4 zImage ARCH=arm CROSS_COMPILE=arm-eabi-

After that I built a new wlan.ko and created a boot.img, followed by a signed update package and so on.

The kernel booted just fine and everything seemed to be working as it should. But sometimes when unlocking (lock screen) the phone and entering sense with the weather/clock widget (that shows a weather animation overlay in fullscreen) I get some bad looking gray-scale shapes flying over the screen. Also games like Labyrinth runs really slow after this problem occurs. Attaching screenshot of weather animation bug.

Has anyone else had similar experience with the released kernel source???

I've been running the official hero-2.6.29-5f74b252 kernel for quite some time now and never had any problems like this.

logcat (when unlocking)

I/HtcLockScreen( 90): touch ACTION_DOWN
D/skia ( 90): purging 191K from font cache [26 entries]
I/HtcLockScreen( 90): touch ACTION_UP
W/dalvikvm( 90): disableGcForExternalAlloc: true
D/HtcLockScreen( 90): unlock animationn done
I/HtcLockScreen( 90): Drag down to unlock screen
W/dalvikvm( 90): disableGcForExternalAlloc: false
I/HtcLockScreen( 90): HtcLockScreen:onPause
D/dalvikvm( 160): GC freed 9041 objects / 531616 bytes in 200ms
W/IndicatorRequest( 445): The running request PersonIndicatorRequest(112) is no longer valid... requeue it!
W/IndicatorRequest( 445): The running request PersonIndicatorRequest(112) is no longer valid... requeue it!
D/KeyguardViewMediator( 90): pokeWakelock(7000)
D/KeyguardViewMediator( 90): pokeWakelock(7000)
D/HtcLockScreen( 90): onScreenPause
D/KeyguardViewManager( 90): hide()
W/InputManagerService( 90): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy <at> 4494e8b0
D/dalvikvm( 1732): GC freed 1224 objects / 190144 bytes in 80ms
D/dalvikvm( 1732): GC freed 483 objects / 186216 bytes in 82ms
D/libEGL ( 1732): loaded /system/lib/egl/libGLES_qcom.so
[B]E/EGL.oem ( 1732): could not open hw3dc (Operation not permitted)
E/libEGL ( 1732): No EGLDisplay for hardware EGL!
E/copybit ( 1732): Error opening frame buffer errno=13 (Permission denied)
E/copybit ( 1732): Error opening frame buffer errno=13 (Permission denied)
E/copybit ( 1732): Error opening frame buffer errno=13 (Permission denied)[/B]
D/dalvikvm( 1533): GC freed 567 objects / 28344 bytes in 10 sec

dmesg (when unlocking)

<6>[ 4886.515686] request_suspend_state: wakeup (3->0) at 4883223881359 (2010-07-06 06:31:19.395568809 UTC)
<6>[ 4886.516357] [R] late_resume start
<6>[ 4886.517425] perflock_notifier_call: screen_on_policy_req 1,policy_min 480000
<6>[ 4886.517700] perflock_notifier_call: cpufreq recover policy 480000 528000
<6>[ 4886.538818] lightsensor_enable
<3>[ 4886.541076] lightsensor_enable: microp is suspended
<6>[ 4886.829010] msmfb: ready, waiting for full update
<6>[ 4886.829345] hero_ts_power:1
<6>[ 4886.836975] msmfb: pan_update in state(1)
<6>[ 4886.837005] msmfb: full update starting
<6>[ 4886.866638] msmfb: full update completed
<6>[ 4886.867065] msmfb: turning on panel
<7>[ 4886.907775] turn on backlight.
<6>[ 4887.109832] microp-i2c 0-0066: microp_i2c_auto_backlight_set_interrupt_mode: 1
<6>[ 4887.112579] [R] late_resume end
<7>[ 4887.613098] ALS value: 0x4, level: 2 #
<7>[ 4887.618255] ALS value: 0x4, level: 2 #
<6>[ 4887.649444] S1 <at> 2025, 2676
<6>[ 4887.925445] E1 <at> 2071, 5196
[B]<6>[ 4892.686065] hw3d_open: pid 1772 tid 1777 opening client node
<4>[ 4892.686340] hw3d_open: can't open hw3d while suspending
<6>[ 4892.697113] hw3d_open: pid 1772 tid 1777 opening client node
<4>[ 4892.697387] hw3d_open: can't open hw3d while suspending
<6>[ 4892.708160] hw3d_open: pid 1772 tid 1777 opening client node
<4>[ 4892.708435] hw3d_open: can't open hw3d while suspending
<6>[ 4892.719207] hw3d_open: pid 1772 tid 1777 opening client node
<4>[ 4892.719482] hw3d_open: can't open hw3d while suspending
<6>[ 4892.730255] hw3d_open: pid 1772 tid 1777 opening client node
<4>[ 4892.730560] hw3d_open: can't open hw3d while suspending
<6>[ 4892.741302] hw3d_open: pid 1772 tid 1777 opening client node
<4>[ 4892.741577] hw3d_open: can't open hw3d while suspending
<6>[ 4892.752532] hw3d_open: pid 1772 tid 1777 opening client node
<4>[ 4892.752807] hw3d_open: can't open hw3d while suspending
<6>[ 4892.763763] hw3d_open: pid 1772 tid 1777 opening client node
<4>[ 4892.764068] hw3d_open: can't open hw3d while suspending
<6>[ 4892.774871] hw3d_open: pid 1772 tid 1777 opening client node
<4>[ 4892.775146] hw3d_open: can't open hw3d while suspending
<6>[ 4892.785919] hw3d_open: pid 1772 tid 1777 opening client node
<4>[ 4892.786224] hw3d_open: can't open hw3d while suspending[/B]
<4>[ 4893.162109] select 1762 (ufou.android.su), adj 15, size 4030, to kill
<4>[ 4893.162384] send sigkill to 1762 (ufou.android.su), adj 15, size 4030

It seems as there is some kind of conflict with the power states, as if the kernel has not understood that the device is awake:

hw3d_open: can't open hw3d while suspending

arch / arm / mach-msm / hw3d.c

...
spin_lock_irqsave(&info->lock, flags);
if (info->suspending) {
pr_warning("%s: can't open hw3d while suspending\n", __func__);
ret = -EPERM;
spin_unlock_irqrestore(&info->lock, flags);
goto err;
}
...