The latest SFOS update (2.2.1) which was released today has fixed the compass sensor for XperiaX devices. Also the compass on ModRana now seems to work, I do not know how reliable that is.