You are not logged in.

#1 2020-11-08 07:42:26

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

[SOLVED] XRANDR/NVIDIA Not Enabling Twinview

Hi all,

First, I'm not sure if this should be in 'Newbie Corner,' 'Kernel & Hardware,' or 'Laptop Issues.' So, if appropriate, feel free to move this thread.

So, to the issue: my new job recently bought me some hardware to work more effectively from home. I have been able to get my keyboard, mouse, and external monitor working (kind of). I am trying to get my laptop (a ThinkPad P53) and monitor to run in twinview but what happens when I plug the HDMI cord into my laptop is that X doesn't seem to detect my default monitor (the one on my laptop).

How I actually got my laptop to give an output through the HDMI was by using the nvidia-xconfig command, per the wiki. I then tried following the instructions for enabling twinview, also on the wiki. However, the command is not found (nvidia-xconfig --twinview). I have also tried running something I noticed in the discussion about the NVIDIA wiki. That is, to try using nvidia-xconfig --dynamic-twinview but this command is also missing. So, basically, this got me stuck.

My next idea was to go look at the actual NVIDIA documentation concerning twinview, found here. I followed the instructions but they didn't seem to do anything. And, when I went to follow the example they had on the wiki concerning a config file for twinview. However, when I did this, I ended up getting stuck logging in as I had an "invalid screen line." I think, however, this is because I used "DFP-0" and "DFP-1" when I should have used the identifiers given in the output of xrandr -- but I am not sure.

I am really quite stuck on what to do next. I've been trying to get twinview working for a couple days now (and, quite frankly, just the output being displayed on my monitor is a huge step). I'm not sure if I'm just missing something (a link or a wiki) but I'm thoroughly stuck). Any help is greatly appreciated.

I have posted below the output of some commands/files that I think would be helpful. Please note that the HDMI cord is connected to the external monitor at the time of pasting when considering any command output.

xrandr:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP-0 disconnected primary (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080     60.00*+  59.94    50.00  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.93    59.94  
DP-3 disconnected (normal left inverted right x axis y axis)

/etc/X11/xorg.conf:

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

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"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option "TwinView"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

/etc/X11/xorg.conf.d/10-monitor.conf.old (the '.old' was tacked on so I can actually boot into my system):

Section "ServerLayout"
	Identifier "TwinLayout"
	Screen 0 "metaScreen" 0 0
EndSection

Section "Monitor"
	Identifier "Monitor0"
	Option "Enable" "true"
EndSection 

Section "Monitor"
	Identifier "Monitor1"
	Option "Enable" "true"
EndSection

Section "Device"
	Identifier "Card0"
	Driver "nvidia"
	VendorName "NVIDIA Corporation"

	Option "HorizSync" "DFP-0: 28-33; DFP-1: 28-33"
	Option "VertRefresh" "DFP-0: 43-73; DFP-1: 43-73"
	Option "MetaModes" "1920x1080, 1920x1080"
	Option "ConnectedMonitor" "DFP-0, DFP-1"
	Option "MetaModeOrientation" "DFP-1 LeftOf DFP-0"
EndSection	

Section "Screen"
	Identifier "metaScreen"
	Device "Card0"
	Monitor "Monitor0"
	DefaultDepth 24
	Option "TwinView" "True"
	SubSection "Display"
		Modes "1920x1080"
	EndSubSection
EndSection

Last edited by ErdosOrGauss (2020-11-22 18:09:52)

Offline

#2 2020-11-08 09:20:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: [SOLVED] XRANDR/NVIDIA Not Enabling Twinview

This is by 99% chance an optimus system, the internal display is on the intel chip, the external ones on the nvidia.
Remove all static configs you generated and see https://wiki.archlinux.org/index.php/NVIDIA_Optimus
Decide on how you intend to use the system (primarily intel/primarily nvidia) and configure it accordingly

nb. that in order  to use the outputs on the nvidia chip, the latter cannot be fully powered down.

Edit: to secure the assessment, post the output of lspci"

Last edited by seth (2020-11-08 09:21:13)

Offline

#3 2020-11-08 18:23:50

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] XRANDR/NVIDIA Not Enabling Twinview

seth wrote:

to secure the assessment, post the output of lspci"

From what I can tell, I think your assessment was correct. For verification, below is the output of lspci. Based on my system's BIOS, I think I may be stuck using only NVIDIA (goodbye battery life).

00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 07)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #0 (rev 10)
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #1 (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #17 (rev f0)
00:1c.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #1 (rev f0)
00:1c.5 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #6 (rev f0)
00:1c.7 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #8 (rev f0)
00:1e.0 Communication controller: Intel Corporation Cannon Lake PCH Serial IO UART Host Controller (rev 10)
00:1f.0 ISA bridge: Intel Corporation Cannon Lake LPC Controller (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-V (rev 10)
01:00.0 VGA compatible controller: NVIDIA Corporation TU117GLM [Quadro T2000 Mobile / Max-Q] (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 10fa (rev a1)
02:00.0 Non-Volatile memory controller: Intel Corporation SSD Pro 7600p/760p/E 6100p Series (rev 03)
04:00.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06)
05:00.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06)
05:01.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06)
05:02.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06)
05:04.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06)
06:00.0 System peripheral: Intel Corporation JHL7540 Thunderbolt 3 NHI [Titan Ridge 4C 2018] (rev 06)
2c:00.0 USB controller: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] (rev 06)
52:00.0 Network controller: Intel Corporation Wi-Fi 6 AX200 (rev 1a)
54:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
seth wrote:

the latter cannot be fully powered down

Do you mean I cannot fully disable the Intel driver?


-----------------------------
[EDIT]

So, following along the lines of having to only use the NVIDIA driver; I have followed the recommendations in the wiki suggested. Now, from there, do I go and follow the NVIDIA config instructions? Because, as of right now, I am still only able to get the single output from the monitor I had before. Any ideas?

Last edited by ErdosOrGauss (2020-11-08 19:09:12)

Offline

#4 2020-11-08 21:10:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: [SOLVED] XRANDR/NVIDIA Not Enabling Twinview

~/.xinitrc isn't sourced by most DMs (aside startx/xinit and XDM) - you'll have to call this and you'll have to call it elsewhere, see the greeen box in https://wiki.archlinux.org/index.php/Xr … figuration
Also "xrandr --listproviders" to ensure the provider names are correct (depending on the used driver, esp. for the intel chip)

Offline

#5 2020-11-08 23:31:11

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] XRANDR/NVIDIA Not Enabling Twinview

seth wrote:

~/.xinitrc isn't sourced by most DMs (aside startx/xinit and XDM) - you'll have to call this and you'll have to call it elsewhere, see the greeen box in https://wiki.archlinux.org/index.php/Xr … figuration

So, I'm a little confused here but I think you're (reasonably) assuming I'm using one of the standard DMs. I actually just use i3 and my startup script calls startx at start. So, I think I'm good? I'm just making sure that I'm not skipping this part because I think it doesn't apply to me when it actually does.

seth wrote:

Also "xrandr --listproviders" to ensure the provider names are correct (depending on the used driver, esp. for the intel chip)

When running this, I got the following output:

 Providers: number : 2
Provider 0: id: 0x218 cap: 0x1, Source Output crtcs: 4 outputs: 5 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x25d cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 1 associated providers: 1 name:modesetting 

I will try following the rest of the xrandr config/the wikis from earlier, but is this the right track?

Also, thank you so much for your help so far!

Offline

#6 2020-11-09 06:35:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: [SOLVED] XRANDR/NVIDIA Not Enabling Twinview

In that case please post the config file you created, the updated Xorg log, "xrandr -q" output and your xinitrc.
The approach is correct, but you'll still have to

xrandr --setprovideroutputsource modesetting NVIDIA-0 # redirect the output
xrandr --auto # activate the outputs, but any xrandr --output eDP1 whatever will do

Do you mean I cannot fully disable the Intel driver?

If you intend to use crtrcs on both chips you cannot power down either chip because they've a job to do.
nb:
1. your system might offer you to disable the iGP/GPU in the BIOS/UEFI settings and then softwire the outputs of that chip to the other one (ie. the nvidia GPU will control the eDP or intel the HDMI ones)
2. running the system on the intel chip and only using the nvidia one as hub for the output MIGHT conserve more power than running everything on the nvidia chip (but that depends on the usage profile and the relative efficiency of the chips to perform the tasks)

Offline

#7 2020-11-22 18:09:22

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] XRANDR/NVIDIA Not Enabling Twinview

[EDIT]

I'm leaving the original "solution" in case it helps someone. However, I ended up changing what I did. The reason for this is that mons allowed me to use the extend function and make the two screens function as one BUT the workspaces in i3 still treated the screens as separate. I was able to do what I wanted (get the screens to be one and have the workspaces function as a single screen. What is did is the following:

1) I disabled the hybrid mode in my BIOS (no link as this method varies per system) and because the only chip available was NVIDIA, I set this to manage my monitors (not sure if this is relevant.)

2) I then followed the instruction for an optimus system using only NVIDIA.

3) I then added the following lines to my .xinitrc:

#add the xrandr output I wanted
xrandr --output eDP-1-1 --auto --output HDMI-0 --auto --right-of eDP-1-1
#add the virtual monitor
xrandr --setmonitor virtual auto eDP-1-1,HDMI-0

4) Then, since I run exec i3 after this, I put the following line right before configuring my status bar for i3.

#create a fake output
fake-outpus 3840x1080+0+0

5) Rebooted.

This created a single, functioning monitor that would extend a single workspace across my monitors. Notice the fake-ouputs size specified is simply 1920+1920 for my monitor length and 1080 since the height isn't changing. Thanks again to [seth] for their help.

-----------------------------------------------------------------------------------------------

[ORIGINAL POST]

Hi,

I'm sorry for the incredibly delayed response. My work got crazy and my time for tinkering was diminished. Ultimately, I was able to solve the issue using your help. For those who are reading this, I used the following steps:

1) I disabled the hybrid mode in my BIOS (no link as this method varies per system) and because the only chip available was NVIDIA, I set this to manage my monitors (not sure if this is relevant.)

2) I then followed the instruction for an optimus system using only NVIDIA.

3) I then went back to the xrandr homepage and looked at the instructions for managing two monitors. There, I learned to download the mons package.

4) After downloading mons (I use the aur helper trizen, in case it matters) and reading its documentation, I used the following command (as the monitor I wanted to "extend" to was on the left):

mons -e left

For thoroughness, I have put the outputs asked for by seth in pastebins linked below, in case this matters. The key, here, was knowing I had an optimus system (thank you, seth).

xrandr -q

.xinitrc

Last edited by ErdosOrGauss (2020-11-23 05:57:08)

Offline

#8 2020-11-22 21:21:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: [SOLVED] XRANDR/NVIDIA Not Enabling Twinview

I disabled the hybrid mode in my BIOS (no link as this method varies per system) and because the only chip available was NVIDIA

At this point you don't have an optimus system but a system w/ an nviida chip and should not have to do anything special (besides having and using the nvidia drivers)
I only took a brief look at it, but mons really looks like it's just an xrandr frontend (and not required in this context at all either)

Offline

#9 2020-11-23 05:49:31

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] XRANDR/NVIDIA Not Enabling Twinview

seth wrote:

At this point you don't have an optimus system but a system w/ an nviida chip and should not have to do anything special (besides having and using the nvidia drivers)

So, I thought this was the point of disabling the actual optimus feature; so I could use only one graphics card and, therefore, allow my outputs to work as desired. However, to do this, knowing that I previously had an optimus system was necessary. So, thank you for telling me about this so I could disable this functionality.

seth wrote:

I only took a brief look at it, but mons really looks like it's just an xrandr frontend (and not required in this context at all either)

You were, of course, correct. I actually went back and did some tinkering and got the exact functionality I wanted. I also didn't need mons, as you said. I've edited the post above.

So, thank you again!

Last edited by ErdosOrGauss (2020-11-23 05:57:38)

Offline

#10 2020-11-23 06:34:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: [SOLVED] XRANDR/NVIDIA Not Enabling Twinview

You can have all outputs available "despite" running on the IGP
The nvidia GPU needs to be powered on, but only acts as a crtcr - so it should™ not draw full power and this can still be beneficial to battery time.
(The only way to really figure is to test it)

If you don't worry about battery time but about performance then yes: degenerating the optimus system into an nvidia system only is likely the better choice.

Offline

Board footer

Powered by FluxBB