You are not logged in.

#1 2020-11-28 11:30:44

Boogz_Linux
Member
Registered: 2020-06-19
Posts: 29

[Solved][Avoided Problem] i3wm Dual Monitor - signal problem

I've been running into a small hiccup that I wish to resolve. Upon booting into arch, logging in and starting X up, I get my left monitor to find signal, although my right will not. If I mod+shift+e to end my X session, and type startx instantly, I'm greeted with both monitors working fine. If I quit my X session and leave it to idle for a while and try startx, I run into the same problems again. The left monitor is the one that shows signal from boot (bios screen et cetera). Xrandr shows both monitors being registered regardless of what I see in front of me. I didn't have this issue with previous nvidia drivers with the exact same set up.

$ uname -a                                                                                                                                          
Linux computer 5.9.10-arch1-1 #1 SMP PREEMPT Sun, 22 Nov 2020 14:16:59 +0000 x86_64 GNU/Linux
$ lspci -k | grep -A 2 -E "(VGA|3D)"                                                                                                                    
                                       
0a:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 SUPER] (rev a1)
	Subsystem: ASUSTeK Computer Inc. Device 870b
	Kernel driver in use: nvidia

nvidia 455-45-01.

Everything up to date as of posting this.

Any help or guidance would be lovely.

Last edited by Boogz_Linux (2020-12-02 11:30:58)

Offline

#2 2020-11-28 13:46:21

seth
Member
Registered: 2012-09-03
Posts: 49,950

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

https://wiki.archlinux.org/index.php/NV … de_setting
Try parameter AND early KMS.

What's the actual output of "xrandr -q" when this happens?

Online

#3 2020-11-29 10:09:38

Boogz_Linux
Member
Registered: 2020-06-19
Posts: 29

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

Hey seth,

This is after my roundabout solution.

$ xrandr -q
Screen 0: minimum 8 x 8, current 7680 x 2160, maximum 32767 x 32767
DVI-D-0 disconnected primary (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 621mm x 341mm
   3840x2160     60.00*+  59.94    50.00    29.97    25.00    23.98    23.98  
   2560x1440     59.95  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.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-2 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 609mm x 349mm
   3840x2160     60.00*+  29.98  
   2560x1440     59.95  
   2048x1280     59.96  
   2048x1080     24.00  
   1920x1200     59.88  
   1920x1080     60.00    60.00    59.94    50.00    23.98  
   1600x1200     60.00  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x720      59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.93    59.94  
DP-3 disconnected (normal left inverted right x axis y axis)

This space here will be for my edit below to output the command after rebooting.
Edit Space:

$ xrandr -q                                                                                                                                                   ✔ 
Screen 0: minimum 8 x 8, current 7680 x 2160, maximum 32767 x 32767
DVI-D-0 disconnected primary (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 621mm x 341mm
   3840x2160     60.00*+  59.94    50.00    29.97    25.00    23.98    23.98  
   2560x1440     59.95  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.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-2 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 609mm x 349mm
   3840x2160     60.00*+  29.98  
   2560x1440     59.95  
   2048x1280     59.96  
   2048x1080     24.00  
   1920x1200     59.88  
   1920x1080     60.00    60.00    59.94    50.00    23.98  
   1600x1200     60.00  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x720      59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.93    59.94  
DP-3 disconnected (normal left inverted right x axis y axis)

Edit: reading the wiki now.

Edit 2: Not going to lie when I say I'm having trouble reading the wiki, a little beyond my comprehension. So in https://wiki.archlinux.org/index.php/NV … de_setting I read that adding nvidia-drm.modeset=1 as a kernel parameter will suffice. Now unsure as to how I exactly should add a kernel parameter I opened the wiki for some more reading. https://wiki.archlinux.org/index.php/Ke … stemd-boot I presume the "Press e when the menu..." is upon booting. It says to make the changed persistent I must edit /boot/loader/entries/arch.conf, so I just edited that instead.
Still apprehensive of my every move, I added nvidia-drm.modeset=1 on the same line as

options root=PARTUUID=a-bunch-of-numbers-pointing-to-drive nvidia-drm.modeset=1 rw

No cigar. I feel as though I've butcherd my attempt and will continue reading in the morning. Thank you for replying and hopefully your patience as I try to understand somewhat how this works.

Last edited by Boogz_Linux (2020-11-29 10:52:31)

Offline

#4 2020-11-29 14:01:05

seth
Member
Registered: 2012-09-03
Posts: 49,950

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

"cat /proc/cmdline" will tell you whether the parameter is applied, but adding the modules to the initramfs is probably even more important.

Online

#5 2020-11-30 01:48:25

Boogz_Linux
Member
Registered: 2020-06-19
Posts: 29

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

https://wiki.archlinux.org/index.php/Mkinitcpio#MODULES
I changed my /etc/mkinitcpio.conf to include

MODULES = (nvidia-drm.modeset=1)

I also added the nvidia.hook included https://wiki.archlinux.org/index.php/NV … de_setting here.

I rebooted and nothing changed. I presume once again I have done something wrong. I'll keep reading the wiki.

Edit: cat /proc/cmdline shows initrd=\initramfs-linux.img root=PARTUUID=48f6331d-f1ef-4ab7-bb6c-dca5420ec983 rw. I  also presume that the added 'module' should be included here?

Edit2: I removed the first 'module' and changed it to include nvidia, nvidia_modeset, nvidia_uvm, nvidia_drm. No cigar.

Edit3: I added nvidia-drm.modeset=1 into /boot/loader/entries/arch.conf so it now shows in cat /proc/cmdline. Although this causes peculiar flashing blank screens whilst booting and logging into X. Once in my i3 environment it's as normal. No flashing screen, screen tearing when scrolling, and only one monitor showing up. Another thing I noticed, which leads me to think it's a hardware fault of the screen / HDMI cable, I boot, both screens receive power, one receives signal and shows bios splash and then goes into arch boot sequence. Then the other screen goes to sleep, and wont find signal. When exiting X and starting X right away, I am able to catch my monitor and have it 'regain signal'. I don't have another monitor to try, But I have plenty of GPU ports and cables. Ill keep this comment updated with findings.

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

Edit4: Interesting finds...
Booting both monitors in isolation works perfectly fine. After booting into i3 with the monitor that has been problematic, if I plug in the other monitor it will show in xrandr. I can enable it in arandr and  it shows no problem. Although the vice versa of this doesn't work at all. There is no option for me to enable the problematic monitor. It does workk perfectly fine in windows though. That's the only thing that keeps me from completely thinking that it's a hardware problem.

Last edited by Boogz_Linux (2020-11-30 04:52:22)

Offline

#6 2020-11-30 05:29:04

Boogz_Linux
Member
Registered: 2020-06-19
Posts: 29

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

Marking Solved...Seemed to be a hardware issue oddly only present with current nvidia drivers (after 450.57). I figured as of my Edit4 in the previous comment that the monitor wasn't being responsive after it didn't get a signal right away at boot. My solution was to swap both cables to HDMI, and swap the cables until the problematic monitor was first to get signal, knowing well that the other monitor is patient enough to wait for signal. Problem Solved. Thank you @seth for your help.

Edit: problems still persist. Not as easy as I had thought. I'm not utterly lost. How exactly do I go about adding a kernel module?

Last edited by Boogz_Linux (2020-11-30 07:59:53)

Offline

#7 2020-11-30 09:44:03

seth
Member
Registered: 2012-09-03
Posts: 49,950

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

You need to add "MODULES = (nvidia nvidia_modeset nvidia_uvm nvidia_dr)" AND run mkinitcpio, https://wiki.archlinux.org/index.php/Mk … generation

Online

#8 2020-12-01 12:06:21

Boogz_Linux
Member
Registered: 2020-06-19
Posts: 29

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

Alright, I added the modules, ran 'sudo mkinitcpio -p linux', found out I had possible missing modules https://wiki.archlinux.org/index.php/Mk … odule_XXXX and added those, ran again, rebooted, same issue. It's real hit or miss. I think a lot of it is determined by how fast I login and startx. Mind you a lot of the time I have to log in without any picture. The only way I know I've actually logged in is by opening a terminal and rebooting and waiting for my computer. Any suggestions?

Edit1: Rebooted, problematic monitor shows boot sequence and now logs in. Normal monitor is now the problematic monitor.

Edit2: Turned off and back on, original problematic Monitor no signal, original normal monitor shows picture after logging in and starting x blind.
For future I'll call "Original Problematic Monitor" 'monitor1', and 'monitor2' for the other.

Last edited by Boogz_Linux (2020-12-01 12:11:29)

Offline

#9 2020-12-01 12:34:49

seth
Member
Registered: 2012-09-03
Posts: 49,950

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

You could try to enforce both outputs to be active during the boot:
https://raw.githubusercontent.com/torva … modedb.rst

Or alternatively disable the framebuffer console:
https://wiki.archlinux.org/index.php/GR … ramebuffer

Then I start to run out of ideas… :-(

Online

#10 2020-12-02 01:56:44

Boogz_Linux
Member
Registered: 2020-06-19
Posts: 29

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

First link is a little out of my know how. Second link leads to grub, I'm using systemd. There doesn't seem to be anything about 'Framebuffer' in https://wiki.archlinux.org/index.php/Systemd-boot.

Apologies for stating what seems to be the obvious here, I'm trying to break it down to figure it out. There's a problem with communication between displays and the system. I've isolated that each screen works fine by itself. This eliminates factors attributing to hardware failure for the most part. Given an opportunity for the display to ever not have signal, it seems to like to stay there. If there was a way to have the boot sequence show on both display, that could solve the issue. I may look into display managers to try get both screens to show output as soon as arch has booted. Maybe even a no-splash for the dmesg and integrate plymouth to show output on both screens.

Another note, after adding the kernel parameters, I can no longer exit i3 and then startx again with an output to the screen. It simply will go into 'no signal' mode.
Thank you again for helping me out and exhausting all options with me.

Edit: I may be using the wrong word with dmesg and many other terms.

Edit2: I've got it now so that auto-login and auto startx is enabled. Still no cigar. Last thing I'll try is plymouth. It is a bit extreme and improbable to work although I'll report back if it yields any results.

Last edited by Boogz_Linux (2020-12-02 03:34:35)

Offline

#11 2020-12-02 04:55:37

Boogz_Linux
Member
Registered: 2020-06-19
Posts: 29

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

Hey @seth, what about xorg.conf and ~/.xinitrc?
I used nvidia-xconfig for xorg.conf, although I noticed that there was only one Section Monitor, not two. I'm reading the arch wiki about https://wiki.archlinux.org/index.php/NV … e_monitors and all subheadings to try sort that out, my ~/.xinitrc has

xrandr --output HDMI-0 --left-of HDMI-1
exec i3

How do these two interplay? And might that cause any conflict?

Edit1: So, changing resolution to 1080p makes the monitor regain signal, then back to 4k works fine. I'll try automate this, then start i3/feh/polybar/et cetera after. Weird solution, adds a couple seconds to boot time but all round happy enough with the solution.

Edit2: made a simple script.sh to change the resolution twice, added it to my i3 config. Only works after refreshing i3 mod+shift+e. Not marking as solved as this is not the solution to the problem, rather the roundabout way of avoiding it as best I can.

Last edited by Boogz_Linux (2020-12-02 07:57:36)

Offline

#12 2020-12-02 08:26:32

seth
Member
Registered: 2012-09-03
Posts: 49,950

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

https://wiki.archlinux.org/index.php/Sy … figuration - try 80x50

The other thing would be to add sth. like "video=HDMI-0:e video=HDMI-1:e" to the kernel command line.

/etc/X11/xorg.conf.d/11-monitor.conf

Section "Monitor"
	Identifier "HDMI-0"
	Option	"Enable"	"True"
	Option	"Primary"	"True"
EndSection

Section "Monitor"
	Identifier "HDMI-1"
#	Option	"Primary"	"True"
	Option	"Enable"	"True"
	Option	"RightOf"	"HDMI-0"
EndSection

should pretty much do what your xrandr script does and try to enable the outputs - whether that works w/o triggering a mode change (resolution forth and back) idk.

For the latter you could also try to just change the refresh rate instead of the resolution (still workaround, but probably less annoying)

Online

#13 2020-12-02 09:21:40

Boogz_Linux
Member
Registered: 2020-06-19
Posts: 29

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

Excellent idea with the refresh rate, given it works. That would eliminate the wallpaper and polybar resizing issue. I'll change up the xorg conf now and edit this with the outcome if it works, else I'll have to look into that link, then running a script to fix the issue. Thank you again for your time investment into my problem!

Edit: adding 'console-mode 1' to /boot/loader/loader.conf yielded no results.
I'm honestly a little lost at how exactly you write to the kernel command line.
https://wiki.archlinux.org/index.php/ke … stemd-boot
I'll follow it now and see where I get.

$cat /proc/cmdline                                                                               
initrd=\initramfs-linux.img root=PARTUUID=48f6331d-f1ef-4ab7-bb6c-dca5420ec983 video=HDMI-0:e video=HDMI-1:e rw

No luck with this. I don't understand what it's doing.

Edit2: I also better understand why the refresh rate would be better, went over my head, change 60 to 59.94 and that means only one line instead of two.

Last edited by Boogz_Linux (2020-12-02 10:00:47)

Offline

#14 2020-12-02 10:14:07

seth
Member
Registered: 2012-09-03
Posts: 49,950

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

You'll probably have to change the refresh rate more than that to get a response from the output (ie. forth and back w/ ~30Hz)

Online

#15 2020-12-02 10:23:38

Boogz_Linux
Member
Registered: 2020-06-19
Posts: 29

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

Both screens go black then show output when changing the refresh rate by 0.04, although in saying that, just changing that in the xinitrc doesn't seem to work. It appears as though I need to manually trigger the script when in X. To trigger a script to start at login I would need to place it in .xinitrc correct? and given it's a #!/bin/sh .sh file, how would I run it in the xinitrc file? I can't use exec as I run i3 from it.

Edit2:
.xinitrc

#configure screens
/usr/local/bin/auto_xrandr2.sh

#start wm
exec i3

/usr/local/bin/auto_xrandr2.sh

#!/bin/bash

#made specifically to walk around my problems
xrandr --output HDMI-1 --mode 1920x1080
xrandr --output HDMI-1 --mode 3840x2160 --right-of HDMI-0

Edit3: Just found this line in my Xorg.0.log

[     5.457] (II) NVIDIA(0): Setting mode "HDMI-0: nvidia-auto-select @3840x2160 +0+0 {ViewPortIn=3840x2160, ViewPortOut=3840x2160+0+0}, HDMI-1: 3840x2160_60_0 @3840x2160 +3840+0 {ViewPortIn=3840x2160, ViewPortOut=3840x2160+0+0}" 

Shouldn't it be  HDMI-1 ... {ViewPortOut=3840x2160+3840+0} ?

Edit4: you were absolutely correct. Edit2 works given I add --rate 30, not 59.96. I'll try add a third line to change it back to 60 and see how that works.

Edit5: nope, I'll try add that thirds line into i3 conf.

Edit6: can't seem to get it to work from i3 conf. Maybe I'll try find a way to have xinitrc pause for a millisecond then run the refreshrate fix.

Last edited by Boogz_Linux (2020-12-02 11:20:59)

Offline

#16 2020-12-02 11:29:40

Boogz_Linux
Member
Registered: 2020-06-19
Posts: 29

Re: [Solved][Avoided Problem] i3wm Dual Monitor - signal problem

Final Post as this has gone far too long. I fixed it. Two Scripts run with a pause in between. First script sets resolution and refresh rate away from native, second script sets it to native.

Thanks again @seth for your help. I don't want to say this is solved by any means, but I'll rename the title appropriately.

Offline

Board footer

Powered by FluxBB