Default Gyroscope not working ZL 4.3(101) & 4.4 (230)

This problem appeared in 101 ROM when i tried to used photospere. the mosaic would never align to start the image. So i tried photo 360 to check this. same problem. i checked the gyrocope in service menu. it keeps on rotating even its kept in the stable most place.

so i thought it was a hardware issue, however when i verified the same in 4.3 (569) rom it was perfectly stable. gyrocope would move according the position of the phone. This is where i could conclude that this was a software issue.

And now in 230 (4.4) this problem still exist.

I even verified it with CM 11 ROMS. i didnt have any problem in gyroscope.

Now, is there a way to fix this. as per one of the post this was a kernel problem. if this is a kernel problem what are the things that are needed to fix this. as in any libs or files that may be able to fix this issue. please comment below.
Can the files from CM rom be used to fix this issue?


Note: i have done PCC repair like so many time so it doesnt really wont. so suggest something else.