Your device may be out of date and may have an old software which may be interrupting with system operations including screen casting. In this case, you may want to update the software version if your device.