Default [Q] X10i always starts on safe mode


I got a used x10i from a friend, the mechanical buttons are not working(after boot work for about 2-3 mins, then stop), was installed with android gingerbread 2.3.3, so i decided to upgrade to jelly bean with a custom kernel and rom to get the soft key option. But right after the install it goes to safe mode and i don't know why.. I've rooted and unlocked bootloader and tried about 3-4 custom ROMs with kernels which should match. Tried different button combinations, hard reset (selecting from the settings and it just stalls... won't go any further than "rebooting").