WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Xorg and dual monitor  (Read 7779 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Xorg and dual monitor
« Reply #15 on: March 19, 2020, 10:11:54 AM »
Hi core.dump
OK, If you're certain that neither one of those will work, then just try changing this:
Code: [Select]
Section "Device"
Identifier  "Card0"
Driver      "nouveau"
to that:
Code: [Select]
Section "Device"
Identifier  "Card0"

and let it pick a driver.

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Xorg and dual monitor
« Reply #16 on: March 19, 2020, 10:26:28 AM »
Done. This is my xorg.conf:

Code: [Select]
[Section "ServerLayout"
Identifier     "X.org Configured"
Screen      0  "Screen0" 0 0
EndSection

Section "Module"
Load  "glx"
EndSection

Section "Monitor"
Identifier   "HDMI"
Option      "Primary" "true"
EndSection

Section "Monitor"
Identifier   "DVI"
Option      "Primary" "false"
Option      "RightOf" "HDMI"
EndSection

Section "Device"
Identifier  "Card0"
Driver      "nouveau"
BusID       "PCI:101:0:0"
        Option      "HDMI-0" "HDMI"
        Option      "DVI-0" "DVI"
EndSection

Section "Screen"
Identifier "Screen0"
Device     "Card0"
Monitor    "HDMI"
DefaultDepth 24
SubSection "Display"
Viewport   0 0
Depth     24
Modes   "1920x1080" "1680x1050"
EndSubSection
EndSection

And this is Xorg.0.log:

Code: [Select]
[  4228.798]
X.Org X Server 1.20.6
X Protocol Version 11, Revision 0
[  4228.798] Build Operating System: Linux 4.19.10-tinycore64 x86_64
[  4228.798] Current Operating System: Linux box 5.4.3-tinycore64 #2020 SMP Tue Dec 17 17:38:30 UTC 2019 x86_64
[  4228.798] Kernel command line: BOOT_IMAGE=/tce/boot/vmlinuz64 quiet  waitusb=5 loglevel=3 home=sda1 tce=sda1 opt=sda1 kmaps=qwerty/it syslog waitusb=5:UUID="17e65e47-1cf4-4b7e-8b24-72597b4a3e7d" tce=UUID="17e65e47-1cf4-4b7e-8b24-72597b4a3e7d"  initrd=/tce/boot/corepure64.gz
[  4228.798] Build Date: 10 December 2019  03:37:35PM
[  4228.798] 
[  4228.798] Current version of pixman: 0.38.4
[  4228.798] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[  4228.798] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  4228.798] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Mar 19 15:17:10 2020
[  4228.798] (==) Using config file: "/etc/X11/xorg.conf"
[  4228.798] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[  4228.798] (==) ServerLayout "X.org Configured"
[  4228.798] (**) |-->Screen "Screen0" (0)
[  4228.798] (**) |   |-->Monitor "HDMI"
[  4228.799] (**) |   |-->Device "Card0"
[  4228.799] (==) Automatically adding devices
[  4228.799] (==) Automatically enabling devices
[  4228.799] (==) Automatically adding GPU devices
[  4228.799] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  4228.799] (WW) The directory "/usr/local/lib/X11/fonts/OTF/" does not exist.
[  4228.799] Entry deleted from font path.
[  4228.799] (WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
[  4228.799] Entry deleted from font path.
[  4228.799] (==) FontPath set to:
/usr/local/lib/X11/fonts/misc/,
/usr/local/lib/X11/fonts/TTF/,
/usr/local/lib/X11/fonts/Type1/,
/usr/local/lib/X11/fonts/75dpi/
[  4228.799] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[  4228.799] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[  4228.799] (II) Loader magic: 0x5b0be0
[  4228.799] (II) Module ABI versions:
[  4228.799] X.Org ANSI C Emulation: 0.4
[  4228.799] X.Org Video Driver: 24.0
[  4228.799] X.Org XInput driver : 24.1
[  4228.799] X.Org Server Extension : 10.0
[  4228.799] (II) xfree86: Adding drm device (/dev/dri/card0)
[  4228.813] (--) PCI:*(101@0:0:0) 10de:1f82:1043:86b9 rev 161, Mem @ 0xd7000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000b000/128, BIOS @ 0x????????/131072
[  4228.813] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[  4228.813] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[  4228.813] (II) LoadModule: "glx"
[  4228.813] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[  4228.814] (II) Module glx: vendor="X.Org Foundation"
[  4228.814] compiled for 1.20.6, module version = 1.0.0
[  4228.814] ABI class: X.Org Server Extension, version 10.0
[  4228.814] (II) LoadModule: "nouveau"
[  4228.815] (WW) Warning, couldn't open module nouveau
[  4228.815] (EE) Failed to load module "nouveau" (module does not exist, 0)
[  4228.815] (EE) No drivers available.
[  4228.815] (EE)
Fatal server error:
[  4228.815] (EE) no screens found(EE)
[  4228.815] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
 for help.
[  4228.815] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  4228.815] (EE)
[  4228.815] (EE) Server terminated with error (1). Closing log file.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Xorg and dual monitor
« Reply #17 on: March 19, 2020, 10:34:35 AM »
Hi core.dump
You didn't remove this line:
Code: [Select]
Driver      "nouveau"
As long as you leave that line in your  xorg.conf  it will look for the driver from  xf86-video-nouveau.tcz.

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Xorg and dual monitor
« Reply #18 on: March 19, 2020, 10:55:20 AM »
Sorry, you're right. I posted the wrong copy of my xorg.conf.

Now I have tried removing that line, Xork starts without any errors, but the desktop is cloned on both monitors instead of being extended.

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Xorg and dual monitor
« Reply #19 on: March 19, 2020, 11:18:38 AM »
BTW, I tried xf86-video-nouveau, just to be sure. This is what Xorg.0.log reports:

Code: [Select]
[   214.076]
X.Org X Server 1.20.6
X Protocol Version 11, Revision 0
[   214.076] Build Operating System: Linux 4.19.10-tinycore64 x86_64
[   214.076] Current Operating System: Linux box 5.4.3-tinycore64 #2020 SMP Tue Dec 17 17:38:30 UTC 2019 x86_64
[   214.076] Kernel command line: BOOT_IMAGE=/tce/boot/vmlinuz64 quiet  waitusb=5 loglevel=3 home=sda1 tce=sda1 opt=sda1 kmaps=qwerty/it syslog waitusb=5:UUID="17e65e47-1cf4-4b7e-8b24-72597b4a3e7d" tce=UUID="17e65e47-1cf4-4b7e-8b24-72597b4a3e7d" text  initrd=/tce/boot/corepure64.gz
[   214.076] Build Date: 10 December 2019  03:37:35PM
[   214.076] 
[   214.076] Current version of pixman: 0.38.4
[   214.076] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[   214.076] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   214.076] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Mar 19 16:06:13 2020
[   214.077] (==) Using config file: "/etc/X11/xorg.conf"
[   214.077] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   214.077] (==) ServerLayout "X.org Configured"
[   214.077] (**) |-->Screen "Screen0" (0)
[   214.077] (**) |   |-->Monitor "HDMI"
[   214.080] (**) |   |-->Device "Card0"
[   214.080] (==) Automatically adding devices
[   214.080] (==) Automatically enabling devices
[   214.080] (==) Automatically adding GPU devices
[   214.080] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   214.080] (WW) The directory "/usr/local/lib/X11/fonts/OTF/" does not exist.
[   214.080] Entry deleted from font path.
[   214.080] (WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
[   214.080] Entry deleted from font path.
[   214.080] (==) FontPath set to:
/usr/local/lib/X11/fonts/misc/,
/usr/local/lib/X11/fonts/TTF/,
/usr/local/lib/X11/fonts/Type1/,
/usr/local/lib/X11/fonts/75dpi/
[   214.080] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   214.080] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[   214.080] (II) Loader magic: 0x5b0be0
[   214.080] (II) Module ABI versions:
[   214.080] X.Org ANSI C Emulation: 0.4
[   214.080] X.Org Video Driver: 24.0
[   214.080] X.Org XInput driver : 24.1
[   214.080] X.Org Server Extension : 10.0
[   214.080] (II) xfree86: Adding drm device (/dev/dri/card0)
[   214.088] (--) PCI:*(101@0:0:0) 10de:1f82:1043:86b9 rev 161, Mem @ 0xd7000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000b000/128, BIOS @ 0x????????/131072
[   214.088] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[   214.088] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[   214.088] (II) LoadModule: "glx"
[   214.088] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   214.093] (II) Module glx: vendor="X.Org Foundation"
[   214.093] compiled for 1.20.6, module version = 1.0.0
[   214.093] ABI class: X.Org Server Extension, version 10.0
[   214.093] (II) LoadModule: "nouveau"
[   214.093] (II) Loading /usr/local/lib/xorg/modules/drivers/nouveau_drv.so
[   214.095] (II) Module nouveau: vendor="X.Org Foundation"
[   214.095] compiled for 1.20.4, module version = 1.0.16
[   214.095] Module class: X.Org Video Driver
[   214.095] ABI class: X.Org Video Driver, version 24.0
[   214.095] (II) NOUVEAU driver
[   214.095] (II) NOUVEAU driver for NVIDIA chipset families :
[   214.095] RIVA TNT            (NV04)
[   214.095] RIVA TNT2           (NV05)
[   214.095] GeForce 256         (NV10)
[   214.095] GeForce 2           (NV11, NV15)
[   214.095] GeForce 4MX         (NV17, NV18)
[   214.095] GeForce 3           (NV20)
[   214.095] GeForce 4Ti         (NV25, NV28)
[   214.095] GeForce FX          (NV3x)
[   214.095] GeForce 6           (NV4x)
[   214.095] GeForce 7           (G7x)
[   214.095] GeForce 8           (G8x)
[   214.095] GeForce 9           (G9x)
[   214.095] GeForce GTX 2xx/3xx (GT2xx)
[   214.095] GeForce GTX 4xx/5xx (GFxxx)
[   214.095] GeForce GTX 6xx/7xx (GKxxx)
[   214.095] GeForce GTX 9xx     (GMxxx)
[   214.095] GeForce GTX 10xx    (GPxxx)
[   214.095] (--) using VT number 2

[   214.099] (II) [drm] nouveau interface version: 1.3.1
[   214.099] (EE) Unknown chipset: NV167
[   214.099] (II) [drm] nouveau interface version: 1.3.1
[   214.099] (EE) Unknown chipset: NV167
[   214.099] (II) [drm] nouveau interface version: 1.3.1
[   214.099] (EE) Unknown chipset: NV167
[   214.100] (II) [drm] nouveau interface version: 1.3.1
[   214.100] (EE) Unknown chipset: NV167
[   214.100] (II) [drm] nouveau interface version: 1.3.1
[   214.100] (EE) Unknown chipset: NV167
[   214.100] (EE) No devices detected.
[   214.100] (EE)
Fatal server error:
[   214.100] (EE) no screens found(EE)
[   214.100] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
 for help.
[   214.100] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   214.100] (EE)
[   214.115] (EE) Server terminated with error (1). Closing log file.


proving that my GPU is not supported by xf86-video-nouveau. the same for for xf86-video-nv.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: Xorg and dual monitor
« Reply #20 on: March 19, 2020, 11:19:21 AM »
Now that Xorg starts, you can check Xorg.0.log to find the name of the two monitors and then experiment with xrandr commands to see what works.

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Xorg and dual monitor
« Reply #21 on: March 19, 2020, 12:24:01 PM »
Hi all,
this is my log file - see attachment - in normal conditions, i.e. Xorg starts but monitors are in wrong order (not swapped).
If someone could kindly take a look at it and help me understand what it means, it would be highly appreciated...

I noticed that the only errors are related to the (supposed) non-existing modules, nouveau in particular, but I'm sure the nouveau modules are there:
Code: [Select]
tc@box:~$ locate nouveau
/mnt/sda1/tce/optional/nouveau-5.4.3-tinycore64.tcz
/mnt/sda1/tce/optional/nouveau-5.4.3-tinycore64.tcz.dep
/mnt/sda1/tce/optional/nouveau-5.4.3-tinycore64.tcz.md5.txt
/usr/local/lib/dri/nouveau_dri.so
/usr/local/lib/dri/nouveau_drv_video.so
/usr/local/lib/dri/nouveau_vieux_dri.so
/usr/local/lib/libXvMCnouveau.so
/usr/local/lib/libdrm_nouveau.so
/usr/local/lib/libdrm_nouveau.so.2
/usr/local/lib/libdrm_nouveau.so.2.0.0
/usr/local/lib/modules/5.4.3-tinycore64/kernel/drivers/gpu/drm/nouveau
/usr/local/lib/modules/5.4.3-tinycore64/kernel/drivers/gpu/drm/nouveau/nouveau.ko.gz
/usr/local/lib/vdpau/libvdpau_nouveau.so
/usr/local/lib/vdpau/libvdpau_nouveau.so.1
/usr/local/lib/vdpau/libvdpau_nouveau.so.1.0
/usr/local/lib/vdpau/libvdpau_nouveau.so.1.0.0
/usr/local/tce.installed/nouveau-5.4.3-tinycore64
tc@box:~$

This clearly means Xorg doesn't use nouveau, but I wonder what it is using, then...
Probably Xorg expects to find the module in a specific path. If so, how can I specify a different search path?

Another thing I don't understand is: more or less halfway through the log file, it states the following

Code: [Select]
[    74.861] (II) modeset(0): Output DVI-D-1 using initial mode 1680x1050 +0+0
[    74.861] (II) modeset(0): Output HDMI-1 using initial mode 1920x1080 +1680+0

Both resolutions are correct, but I actually have a "trimmed 1920x1080" on the smaller display (in fact I see a clipped off Wbar).

Probably I'm not that able to read and interpret a log file, but looking at this I can't figure out how to finally swap those two damned monitors.

Edit:
A small update... if I manually swap the two monitors with xrandr from a shell, after a couple of minutes the system freezes completely...
« Last Edit: March 19, 2020, 12:33:17 PM by core.dump »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Xorg and dual monitor
« Reply #22 on: March 19, 2020, 01:23:37 PM »
Hi core.dump
I don't think you have an  /etc/X11/xorg.conf  file. The log file shows nothing when searching for:
Code: [Select]
tc@box:~$ grep "Using config file" Xorg.0.log.ok-noswap
tc@box:~$

Compare that to
BTW, I tried xf86-video-nouveau, just to be sure. This is what Xorg.0.log reports:

Code: [Select]
----- SNIP -----
[   214.077] (==) Using config file: "/etc/X11/xorg.conf"
 ----- SNIP -----


proving that my GPU is not supported by xf86-video-nouveau. the same for for xf86-video-nv.

Also, these messages in the log show it's not finding the  monitor sections  you defined in your config file.
Code: [Select]
tc@box:~$ grep "has no mon" Xorg.0.log.ok-noswap
[    74.590] (II) modeset(0): Output DVI-D-1 has no monitor section
[    74.656] (II) modeset(0): Output HDMI-1 has no monitor section
[    74.708] (II) modeset(0): Output DP-1 has no monitor section
tc@box:~$
« Last Edit: March 19, 2020, 08:21:01 PM by Rich »

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Xorg and dual monitor
« Reply #23 on: March 19, 2020, 05:54:35 PM »
Found a possible solution. Not exactly what I wanted, but it works.

By playing with XrandR, I found it seems to not support extending the desktop across two or more monitors with different resolutions, at least on my hardware. So I downscaled the larger monitor to match the smaller's one res as follows:

First
Code: [Select]
#Temporarily deactivate the smaller display, make the larger one become "primary"
xrandr --off --output HDMI-1 --primary --output DVI-D-1 --off

#Reactivate both displays, lower the primary's resolution, pair the two panels in the correct order
xrandr  --output HDMI-1 --primary --mode 1680x1050 --pos 0x0 --output DVI-D-1 --mode 1680x1050 --pos 1680x0 --right-of HDMI-1

#Reset wallpaper aspect ratio and reposition wbar
/home/tc/.setbackground
sudo killall wbar && wbar

That's all for now. Thank you for your assistance :)