DEV Community

Nur Kholis M
Nur Kholis M

Posted on

Fix LightDM Flicker Screen

Issue

My login screen got flicker and black/blank screen when I move the cursor or press any key.
I believe it because lightdm use wrong frequency of my monitor. Lets fix it:

Fix

1. Indentify your current display information

$ xrandr -q
Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384
DisplayPort-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
   2560x1440    165.00 + 144.00 + 119.99    59.95*
   2560x1440i   240.00   199.89
   1920x1080    120.00   119.88    60.00    60.00    50.00    59.94
   1680x1050     59.95
   1280x1024     75.02    60.02
   1440x900      59.89
   1280x720      60.00    50.00    59.94
   1024x768      75.03    70.07    60.00
   800x600       72.19    75.00    60.32    56.25
   720x576       50.00
   720x480       60.00    59.94
   640x480       75.00    72.81    60.00    59.94
   720x400       70.08
   2560x1440_60.00  59.96
Enter fullscreen mode Exit fullscreen mode

It will display all existing available options in your current hardware. I choose first line.

2. Create script to force to use 60Hz frequency

$ vim /etc/lightdm/lightdm-xrandr.sh
#!/usr/bin/bash
xrandr --output DisplayPort-0 --mode 2560x1440 --rate 59.95

$ chmod +x /etc/lightdm/lightdm-xrandr.sh
Enter fullscreen mode Exit fullscreen mode

3. Add script to lightdm

$ sudo cat lightdm.conf.d/80-flicker-fix.conf
[Seat:*]
display-setup-script=/etc/lightdm/lightdm-xrandr.sh
Enter fullscreen mode Exit fullscreen mode

Refs

Top comments (0)