Solved, the problem occurs in raspberry pi 2 when the fake kms GUI is used.