OK so I have an update to this. Flashed back to stock 4.4 and everything works fine even with custom kernels that never worked before. However if I update to 4.4.2 (stock or any custom ROM except CM or CM based ones) it breaks and stops working. On CM and CM based ones it works but without the custom kernels since I use Franco kernel and it is not compatible.
Anyone have an idea as to what could be the cause for this to happen? What is in 4.4.2 that is breaking the auto rotate and the rest of the sensors.