If as you say the power adapter only works sometime then you should consider that it may be faulty.
Is your x2 still in warranty?
If it is, then now would be a great time to resolve this while parts still can be replaced without cost under the warranty.