Article 57DN2 Issue with TV screen + monitor setup

Issue with TV screen + monitor setup

by
bionor
from LinuxQuestions.org on (#57DN2)
I've having an issue where my system struggles a bit with my dual screen setup. I have a TV connected via a receiver through HDMI and a monitor also connected via HDMI.

What happens is that xorg seems to struggle with hotplugging. When I start the computer I usually leave the receiver off until I need it (if for instance to watch a movie with Kodi). When I switch on the receiver it seems that the xorg.conf is reset or something which means I have to set it up again every time. It defaults to using the TV as the main screen as well as being on the wrong side (left vs right). Even when I've set it up correctly it sometimes switches back to default without switching anything off, for instance when I quit Kodi, the screens sometimes flash and reverts back to default.

https://wiki.archlinux.org/index.php/NV ... e_monitors

In the article linked above I read that it might be possible to force a certain configuration with xorg.conf, but I'm somewhat unsure as to whether the scenario described there applies to my situation and how exactly to proceed as my setup is a little different to what is shown in it.

The issue is the same whether I use NVIDIA proprietary driver or nouveau. I'm currently using the nvidia driver as it lets me use full force composition to remove the screen tearing I otherwise get.

My /etc/X11/xorg.conf:
Code:# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 450.66

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 450.66

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"

# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "PHILIPS FTV"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 76.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 970"
EndSection

Section "Screen"

# Removed Option "metamodes" "DP-5: nvidia-auto-select +1920+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNC=Off}, HDMI-0: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNC=Off}"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-7"
Option "metamodes" "DP-5: nvidia-auto-select +1920+0 {AllowGSYNC=Off}, HDMI-0: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNC=Off}"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSectionI was able to partially resolve it. Turns out it's there's a xrandr settings daemon that overrides xorg.conf and all I had to do was to disable it. It works now for reboots (as long as both are connected) and for the full duration the machine has both screens attached, but it doesn't work when I switch the receiver off or start the machine with it off. Then I have to re-enable the settings daemon in order for the monitor to get the correct resolution which means the Xorg.conf gets reset.

I'm thinking there may be a workaround by making two separate xorg.conf files (one for single monitor setup and one for dual setup) in a separate folder and then write a script that detects which setup is correct at any given moment and then symlinks /etc/X11/xorg.conf to the correct file for the current setup.

But I have no idea how to do that. Something something udev perhaps? I really hope someone can help me a little bit with this. This is something which have been bothering me for a very long time and now finally I feel like I'm getting closer to a solution, but need some help with the last steps.latest?d=yIl2AUoC8zA latest?i=1a9ykdsPCzA:t3gqHIDOBDA:F7zBnMy latest?i=1a9ykdsPCzA:t3gqHIDOBDA:V_sGLiP latest?d=qj6IDK7rITs latest?i=1a9ykdsPCzA:t3gqHIDOBDA:gIN9vFw1a9ykdsPCzA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments