Dual simultaneous monitor
I want to use a fixed monitor resolution. Also, the resolutions of HDMI and DP are different.
And sometimes I use only HDMI or DP.
Also, the resolutions of HDMI and DP are different.
example1: 3840x2160 and 1920x1080
example2: 1920x1080 and 1920x1080
example3: NONE and 1920x1080
example4: 1920x1080 and NONE
However,the settings will change automatically.(always 4K)
I want to set it from xrandr or xorg.conf.
If you are using ubuntu desktop, please check if GUI setting would fix the resolution or not.
After you modify resolution from GUI, there should be a config file as “monitors.xml” under ~/.config/. You can use this file and write it to the resolution you want to use.
Thank you very much. Succeeded.
But there is still a problem …
Since the display used changes from time to time, it is not possible to determine the vendor name or product name.
If these are blank, the resolution will change automatically.
<monitorspec>
<Connector> DP-0 </ connector>
<Vendor> </ Bender>
<Product> </ Product>
<Serial> </ Serial>
</ monitorspec>
You can try to add something like this in xorg.conf.
Section “Screen”
Identifier “Default Screen”
Monitor “Configured Monitor”
Device “Configured Video Device”
DefaultDepth 24
Modes “1024x768”
EndSection
Thank you for letting me know.
But the result was a failure.
HDMI is 4K, DP is 4K
This is my “xorg.conf”.
Section “Module”
Disable “dri”
SubSection “extmod”
Option “omit xfree86-dga”
EndSubSection
End Section
Section “Device”
Identifier “Tegra0”
Driver “nvidia”
Option “AllowEmptyInitialConfiguration” “true”
End Section
I added the lines.
Section “Screen”
Identifier “Screen0”
Device “Tegra0”
Monitor “Monitor0”
SubSection “Display”
Viewport 0 0
Modes “1920x1080”
Depth 24
Virtual 1920 1080
EndSubSection
EndSection
When only HDMI is connected, the resolution is “1920x1080”.
The result was OK.
But when I also connect DP too, both HDMI and DP are 4k.
And I type from the console as follows …
export DISPLAY=:0
xrandr
I got error.
Can’t open display :0
I’m in trouble.
Next, I rewrote xorg.conf as follows.
What I expect is an HDMI resolution of 1920x1080 and a DP resolution of 1280x1024.
Section “Device”
Identifier “Tegra0”
Driver “nvidia”
Option “AllowEmptyInitialConfiguration” “true”
Option “MetaModes” “1920x1080-1280x1024”
Screen 0
EndSection
Section “Device”
Identifier “Tegra1”
Driver “nvidia”
Option “AllowEmptyInitialConfiguration” “true”
Screen 1
EndSection
Section “Monitor”
Identifier “Monitor0”
EndSection
Section “Monitor”
Identifier “Monitor1”
EndSection
Section “Screen”
Identifier “Screen0”
Device “Tegra0”
Monitor “Monitor0”
SubSection “Display”
Viewport 0 0
Modes “1920x1080”
Depth 24
Virtual 1920 1080
EndSubSection
EndSection
Section “Screen”
Identifier “Screen1”
Device “Tegra1”
Monitor “Monitor1”
SubSection “Display”
Viewport 0 0
Modes “1280x1024”
Depth 24
Virtual 1280 1024
EndSubSection
EndSection
Then both became 1920x1080 this time.
Is it impossible to set only with config or xml?
You should check the log from xorg.0.log to see what is going on.
Just arbitrarily write the xorg.conf and doesn’t check log is just like blind test. You didn’t know whether your change in xorg.conf is valid.
Also, if you see desktop is showing up, it means X server is running. Thus, if xrandr cannot open :0, then try :1.