Automatic restart Sony Xperia Z

Description of the problem: it happens that the Sony Xperia Z and other phones of this family automatically switch off, and then they start without having to enter a PIN.

Diagnosis: it turns out that the reason for this would may be the default settings of Internet indicated by your ISP in the phone.

Solution: you have to change the default protocol IPv6 to IPv4. To change the default protocol, you need to go to Settings, then Wireless & networks → Mobile networks → access points, and we select a point with the name of the network to which the phone is connected, and then in the ASN we change protocol IPv4.