A method in a system including an active stylus and a display controller that detects the active stylus and that drives a display device. The method includes: driving the display device to display first pixel data during a first display period in a first time period, wherein the driving is started a first amount of time and ended a second amount of time after the beginning of the first time period; and driving the display device to display second pixel data during a second display period in a second time period, wherein the driving is started a third amount of time and ended a fourth amount of time after the beginning of the second time period. The first and second display periods have a same time length. The first amount of time is different from the third amount of time, and the second amount of time is different from the fourth amount of time.