Skip to content

Instantly share code, notes, and snippets.

@r0xsh
Created August 30, 2016 20:28
Show Gist options
  • Save r0xsh/4d1c7219ee63e4cee0c7fe1077559b28 to your computer and use it in GitHub Desktop.
Save r0xsh/4d1c7219ee63e4cee0c7fe1077559b28 to your computer and use it in GitHub Desktop.
## /etc/X11/xorg.conf.d
Section "Monitor"
Identifier "eDP1"
Option "Primary" "true"
Option "PreferredMode" "1920x1080_60.05"
EndSection
Section "Monitor"
Identifier "DP2"
Option "LeftOf" "eDP1"
Option "PreferredMode" "1366x768_59.79"
EndSection
@CalvinLanger
Copy link

How set second monitor in this file adding HDMI1 ??

@r0xsh
Copy link
Author

r0xsh commented Sep 3, 2021

You have to identify the screen via the "Identifier"

Section "Monitor"
	Identifier	"HDMI1"
	Option	XXXX
EndSection

@CalvinLanger
Copy link

When I start my pc with external monitor then my monitor is okay but window in laptop have the same resolution as the oder monitor. When pc is full loading then my pc monitor back to normal resolution. I don'n know how fix this issue.

xrandr log

Screen 0: minimum 8 x 8, current 5360 x 1440, maximum 32767 x 32767
LVDS1 connected primary 1920x1080+0+360 (normal left inverted right x axis y axis) 350mm x 190mm
   1920x1080     59.93*+  59.93  
   1680x1050     59.88  
   1400x1050     59.98  
   1600x900      60.00    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1368x768      60.00    59.88    59.85  
   1280x800      59.81    59.91  
   1280x720      59.86    60.00    59.74  
   1024x768      60.00  
   1024x576      60.00    59.90    59.82  
   960x540       60.00    59.63    59.82  
   800x600       60.32    56.25  
   864x486       60.00    59.92    59.57  
   640x480       59.94  
   720x405       59.51    60.00    58.99  
   640x360       59.84    59.32    60.00  
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 3440x1440+1920+0 (normal left inverted right x axis y axis) 800mm x 330mm
   3440x1440_30.00  30.00*+
   3440x1440     30.00 +
   1720x1440     60.00  
   1920x1080     60.00    60.00    50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1680x1050     59.88  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   800x600       72.19    75.00    60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    60.00    59.94  
   720x400       70.08  
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

10-monitor.conf

Section "Monitor"
    Identifier "HDMI1"
    Modeline "3440x1440_30.00"  196.90  3440 3600 3960 4480  1440 1441 1444 1465  -HSync +Vsync
    Option "PreferredMode" "3440x1440_30.00"
EndSection

Section "Monitor"
    Identifier "Screen 0"
    Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    Option "PreferredMode" "1920x1080_60"
EndSection

Section "Device"
    Identifier "Device0"
    Driver "intel"
EndSection

@neocollin
Copy link

I have an external 5K monitor and the only way I would get proper 5k resolution is if I split the "5120x2160_30.00" as resolution and [Option "TargetRefresh" "30"]... Now even lockscreen is fixed.
I also had to create a "profile" under display and set resolution there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment