rockowitz / ddcutil

Control monitor settings using DDC/CI and USB
http://www.ddcutil.com
GNU General Public License v2.0
977 stars 40 forks source link

I2C workaround Nvidia drivers for dual monitors? #27

Open AndreasBackx opened 7 years ago

AndreasBackx commented 7 years ago

Previously I was using ddcutil without any problems on AMD hardware. Because of the mining craze I got a good deal on my used AMD hardware and a good deal on a GTX 1070. Now unfortunately I cannot get ddcutil to work on one of my monitors with the proprietary Nvidia drivers. It seems to only detect 1 monitor, but the environment says there is a second one, it just cannot find the udev information. I've got 2 Dell U2515H connected (1 landscape over HDMI and 1 portrait over DP), here is some more information of the following commands.

sudo ddcutil detect --verbose
sudo ddcutil environment --verbose
sudo ddcutil interrogate --verbose
ddcutil interrogate --verbose

I'm not the greatest when it comes to X11 config, but here is my config regardless.

/etc/X11/xorg.conf

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
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"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option     "RegistryDwords"  "RMUseSwI2c=0x01; RMI2cSpeed=100"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option     "RegistryDwords"  "RMUseSwI2c=0x01; RMI2cSpeed=100"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth   24
    Option         "DPI" "96 x 96"
    Option     "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth   24
    Option         "DPI" "96 x 96"
    Option     "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
rockowitz commented 7 years ago

Andreas,

First, some lesser comments: 1) interrogate just packages up detect, environment, usbenvironment, and probe of each detected monitor, all with --verbose and a few other tweaks. So for diagnosing your problem detect and environment give us all the relevant information. 2) The failure at the end of the "sudo ddcutil interrogate --verbose" report is due to an unexpected library return code in the usbenvironment section of interrogate. Since you don't have a USB connected monitor, this is unrelated to your problem. The output of detect and environment is all that matters. 3) Looking at the output of the environment portion of the interrogate run (without sudo), we see that user andreas does not have RW permission on the /dev/ii2c devices. You'll need to fix this if you want to run ddcutil other than as root. This is just a configuration issue. 4) You mention that you used to run ddcutil with AMD hardware. Were you using the proprietary AMD driver or the open source radeon driver? I'm particularly interested if it's the former case. 5) In the future, please send send output reports as multiple attachments, with the output of 1 command per file. It's more convenient for me 6) Re X11 configuration, I too find it painful. I've had good success not specifying any xorg.conf file, letting X11 figure things out. Overriding values, such as the special RegistryDwords settings, are in files in /etc/X11/xorg.conf.d. I've used the proprietary Nvidia driver on a GTX650ti with 4 monitors this way. 7) The special RegistryDwords settings may be necessary for successfully reading and writing DDC commands on I2C slave address x37. However, they have no effect on whether that address is detected, only on whether reads and writes are not corrupted.

With all that out of the way, we're down to the real problem: why isn't the proprietary Nvidia driver allocating a /dev/i2c device for the second monitor. I'm afraid I haven't a clear answer. The nvidia I2C support for recent cards has been problematic. Here are a couple things you can try:

Let me know how it goes.

Sanford

On 07/15/2017 07:18 PM, Andreas Backx wrote:

Previously I was using ddcutil without any problems on AMD hardware. Because of the mining craze I got a good deal on my used AMD hardware and a good deal on a GTX 1070. Now unfortunately I cannot get ddcutil to work on one of my monitors. It seems to only detect 1 monitor, but the environment says there is a second one, it just cannot find the udev information. I've got 2 Dell U2515H connected (1 landscape over HDMI and 1 portrait over DP), here is some more information of the following commands https://gist.github.com/AndreasBackx/aface790b59f3dd5b3c143fa0e1244ee.

sudo ddcutil detect --verbose sudo ddcutil environment --verbose sudo ddcutil interrogate --verbose ddcutil interrogate --verbose

I'm not the greatest when it comes to X11 config, but here is my config regardless.

//etc/X11/xorg.conf/

|Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" 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" HorizSync 28.0 - 33.0 VertRefresh 43.0 - 72.0 Option "DPMS" EndSection Section "Monitor" Identifier "Monitor1" HorizSync 28.0 - 33.0 VertRefresh 43.0

  • 72.0 Option "DPMS" EndSection Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" Option "RegistryDwords" "RMUseSwI2c=0x01; RMI2cSpeed=100" EndSection Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" Option "RegistryDwords" "RMUseSwI2c=0x01; RMI2cSpeed=100" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 Option "DPI" "96 x 96" Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen1" Device "Device1" Monitor "Monitor1" DefaultDepth 24 Option "DPI" "96 x 96" Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }" SubSection "Display" Depth 24 EndSubSection EndSection |

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rockowitz/ddcutil/issues/27, or mute the thread https://github.com/notifications/unsubscribe-auth/ANhsbvU3dl3LNXyW79hAknC_wRMU9JZmks5sOUi9gaJpZM4OZJrt.

AndreasBackx commented 7 years ago

@rockowitz I was working using AMD's open source drivers. I will simply upload the files next time. When I remove the xorg.conf file and only use xorg.conf.d/90-nvidia_i2c.conf file seen below, then the second display also does not show up.

I do not have a DVI input available unfortunately and cannot test that proposed solution.

Section "Device"
    Identifier     "Dev0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option     "RegistryDwords"  "RMUseSwI2c=0x01; RMI2cSpeed=100"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Dev0"
    Monitor        "Monitor0"
    DefaultDepth   24
    Option         "DPI" "96 x 96"
    Option     "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

I have to add the screen settings or I end up with a dpi of 117 on a 1440p 25" monitor which I don't want. The metamodes option also helps with tearing for me.

rockowitz commented 7 years ago

Andreas,

Thanks for the update.

I thought that all GTX1070s had a DVI connector. For our purposes a second HDMI connector works just as well. The U2515h implements DisplayPort MST (Multi-Stream-Technology). I know there are problems with DisplayPort I2C-Over-Aux and the i915 driver related to MST (see: https://bugs.freedesktop.org/show_bug.cgi?id=100954), which is why I suggest you try connecting the monitors without using DisplayPort.
Other than that, I'm afraid I don't have any suggestions.

Sanford

On 07/19/2017 01:24 PM, Andreas Backx wrote:

@rockowitz https://github.com/rockowitz I was working using AMD's open source drivers. I will simply upload the files next time. When I remove the |xorg.conf| file and only use |xorg.conf.d/90-nvidia_i2c.conf| file seen below, then the second display also does not show up.

I do not have a DVI input available unfortunately and cannot test that proposed solution.

|Section "Device" Identifier "Dev0" Driver "nvidia" VendorName "NVIDIA Corporation" Option "RegistryDwords" "RMUseSwI2c=0x01; RMI2cSpeed=100" EndSection Section "Screen" Identifier "Screen0" Device "Dev0" Monitor "Monitor0" DefaultDepth 24 Option "DPI" "96 x 96" Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }" SubSection "Display" Depth 24 EndSubSection EndSection |

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rockowitz/ddcutil/issues/27#issuecomment-316457983, or mute the thread https://github.com/notifications/unsubscribe-auth/ANhsbk1ESm8VCR5MJIuQFonxNcH6OkORks5sPju4gaJpZM4OZJrt.

AndreasBackx commented 7 years ago

The GTX 1070 does have a DVI connector, but my monitors do not. My GTX 1070 also only has 1 HDMI output which is already connected to the monitor. I just tried to disable DP 1.2 on the monitor as that is required for MST, but it doesn't seem to detect the monitor still. MST is not being used afaik, both monitors are connected with separate cables, one with HDMI and the other with DP.

anupam-git commented 6 years ago

I was facing issues with Nvidia driver for my single monitor setup using HDMI with GT-1030 Pascal Series GPU.

This helped me fix the issue : http://www.ddcutil.com/nvidia/

You can try this once..

AndreasBackx commented 6 years ago

@anupam-git that does not work for DisplayPort. I'm just going to get a second HDMI cable and hope it's fixed.

Edit: noticed that I only have 1 HDMI out so I'll have to stick with nouveau.

toshi2k2 commented 3 years ago

I have a similar problem. ddcutil detect fails to detect second monitor which is connected by HDMI. It only detects the primary monitor connected via displayport. (The second monitor ddc input switch works from my Mac though)

ddcutil version:            1.1.0
Output level:               Verbose
Reporting DDC data errors:  false
Trace groups active:        none
Traced functions:           none
Traced files:               none
Force I2C slave address:    false
User defined features:      disabled

Performance and Retry Options:
   Deferred sleep enabled:                      false
   Sleep suppression (reduced sleeps) enabled:  true
   Dynamic sleep adjustment enabled:            false

Configuration file:         (none)
Display 1
   I2C bus:  /dev/i2c-6
      I2C address 0x50 (EDID) responsive: true 
      Is eDP device:                      false
      Is LVDS device:                     false
      /sys/bus/i2c/devices/i2c-6/name:   NVIDIA i2c adapter 6 at 2d:00.0
   EDID synopsis:
      Mfg id:               PHL
      Model:                PHL 276E8V
      Product code:         49551
      Serial number:        
      Binary serial number: 1919 (0x0000077f)
      Manufacture year:     2020,  Week: 27
   VCP version:         2.2
   Controller mfg:      Mstar
   Firmware version:    1.0
   Monitor returns DDC Null Response for unsupported features: false