Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: core.dump on March 18, 2020, 12:17:02 PM

Title: Xorg and dual monitor
Post by: core.dump on March 18, 2020, 12:17:02 PM
Hello everybody,
I'm currently using TC on a dual monitor computer (CorePure64 + Xorg). After a fresh install, I found Xorg works perfectly and has dual monitor support activated by default (thru xrandr I suppose, since it has been installed as a dependency), and this is OK.

Now, my problem is: when I enter the graphical environment, the two monitors are inverted, i.e. the left part of the desktop is on the right monitor and vice versa: moving the mouse towards the very right side, the cursor "exits" the desktop and "re-enters" at the left side. This clearly means my primary monitor is the one on the right, while I need it to be the one on the left.

You can tell me the most immediate and logical solution would be "phisically swap the monitors, idiot..." Well, you're not wrong of course, and I'd like to solve the problem that way, but actually I can't, it's a matter of cables' length. Thus I have to find a way to swap the left and right parts of the desktop in Xorg, rather than phisically change the monitors' order.

By searching the forum, I found a possible solution here (http://forum.tinycorelinux.net/index.php?topic=14923.0), but there are a couple of things I don't understand:

(1) That topic is about editing the xorg.conf file, but my system has no xorg.conf. Do I have to create one by myself? Where should I place it, and how I tell Xorg to use that file? My Xorg is working despite it hasn't a configuration file, how is it possible?

(2) AFAYK, does it exist a way to pass one or more directives to Xorg and/or Xrandr on the command line (I mean in .xsession) without creating a custom xorg.conf, so that the left and right desktop pairing is correctly set at boot time?
Title: Re: Xorg and dual monitor
Post by: Rich on March 18, 2020, 12:38:02 PM
Hi core.dump
Click the  Exit  icon and select  Exit to Prompt. Then execute this:
Code: [Select]
sudo Xorg -configure
This will create an  xorg.conf  file in  /root. The name may be a little different (xorg.conf.new?). Copy the file to your  /home  directory:
Code: [Select]
sudo cp /root/xorg* /home/tc/
Now restart X:
Code: [Select]
startx
Now you can change permissions, edit, and copy it to /etc/X11/.
Title: Re: Xorg and dual monitor
Post by: curaga on March 18, 2020, 01:36:22 PM
As found in your link, you can change the monitor order with xrandr commands at runtime. If you find something like "xrandr --output DVI-0 --right-of VGA-0" is enough, you can then put that into a file in ~/.X.d to run it on each X startup.
Title: Re: Xorg and dual monitor
Post by: core.dump on March 18, 2020, 03:11:35 PM
As found in your link, you can change the monitor order with xrandr commands at runtime. If you find something like "xrandr --output DVI-0 --right-of VGA-0" is enough, you can then put that into a file in ~/.X.d to run it on each X startup.

Well, I tried and it works actually, but this just fixes the mouse movement and doesn't affect wallpaper and other screen objects like Wbar.
Title: Re: Xorg and dual monitor
Post by: core.dump on March 18, 2020, 04:15:15 PM
OK, I created a fresh xorg.conf file and edited it as follows:

Code: [Select]
Section "ServerLayout"
Identifier     "X.org Configured"
Screen      0  "Screen0" 0 0
InputDevice    "Mouse0" "CorePointer"
InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
ModulePath   "/usr/local/lib/xorg/modules"
FontPath     "/usr/local/lib/X11/fonts/misc/"
FontPath     "/usr/local/lib/X11/fonts/TTF/"
FontPath     "/usr/local/lib/X11/fonts/OTF/"
FontPath     "/usr/local/lib/X11/fonts/Type1/"
FontPath     "/usr/local/lib/X11/fonts/100dpi/"
FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
Load  "glx"
EndSection

Section "InputDevice"
Identifier  "Keyboard0"
Driver      "kbd"
EndSection

Section "InputDevice"
Identifier  "Mouse0"
Driver      "mouse"
Option     "Protocol" "auto"
Option     "Device" "/dev/input/mice"
Option     "ZAxisMapping" "4 5 6 7"
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

Then I did a test as suggested by Xorg itself:

Code: [Select]
/home/tc/$ Xorg -config xorg.conf
Note, I tried to put xorg.conf in /etc/X11/ but I was returned an error stating it's not possible to call Xorg using abolute paths or something similar.
However, the test result was a blank screen (actually two blank screens), and the following error(s) in console:

Code: [Select]
X.Org X Server 1.20.6
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.19.10-tinycore64 x86_64
Current Operating System: Linux box 5.4.3-tinycore64 #2020 SMP Tue Dec 17 17:38:30 UTC 2019 x86_64
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
Build Date: 10 December 2019  03:37:35PM
 
Current version of pixman: 0.38.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Mar 18 20:55:04 2020
(==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
MESA-LOADER: failed to open nouveau (search paths /usr/local/lib/dri)
failed to load driver: nouveau
MESA-LOADER: failed to open kms_swrast (search paths /usr/local/lib/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast (search paths /usr/local/lib/dri)
failed to load swrast driver
couldn't get display device
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
(II) Server terminated successfully (0). Closing log file.

Probably I forgot something, or wrote something wrong... but what exactly?

P.S.: Please be patient, I'm not a system administrator...  :-\
Title: Re: Xorg and dual monitor
Post by: Rich on March 18, 2020, 04:43:36 PM
Hi core.dump
Quote
Code: [Select]
MESA-LOADER: failed to open nouveau (search paths /usr/local/lib/dri)
That looks like  Xorg-7.7-3d.tcz  is missing.
Title: Re: Xorg and dual monitor
Post by: core.dump on March 18, 2020, 05:37:16 PM
Hi core.dump
Quote
Code: [Select]
MESA-LOADER: failed to open nouveau (search paths /usr/local/lib/dri)
That looks like  Xorg-7.7-3d.tcz  is missing.

Ummm ok, installed Xorg-7.7-3d.tcz, it was actually missing, BUUUT... the result is still a blank screen! :D
Here is the output of the Xorg test call:

Code: [Select]
X.Org X Server 1.20.6
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.19.10-tinycore64 x86_64
Current Operating System: Linux box 5.4.3-tinycore64 #2020 SMP Tue Dec 17 17:38:30 UTC 2019 x86_64
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
Build Date: 10 December 2019  03:37:35PM
 
Current version of pixman: 0.38.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Mar 18 22:16:18 2020
(==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
(II) Server terminated successfully (0). Closing log file.

It looks like there weren't errors. What did I forget?
Title: Re: Xorg and dual monitor
Post by: Rich on March 18, 2020, 09:16:27 PM
Hi core.dump
First run a dependency to make sure nothing else is missing. You can do this using the  Apps  utility, or if you prefer, through the
command line like this:
Code: [Select]
tce-audit builddb
tce-audit updatedeps
tce-audit fetchmissing
tce-update
Now reboot.

When X comes up:
Code: [Select]
sudo mkdir /etc/X11
sudo cp xorg.conf /etc/X11

Click the  Exit  icon and select  Exit to Prompt. Then execute this:
Code: [Select]
startx
When X comes up, check  /var/log/Xorg.0.log  for errors or post it here.

If X is messed up, hit  Ctrl-Alt-F1  to get into the console. Then:
Code: [Select]
cp /var/log/Xorg.0.log /var/log/Xorg.0.log.bak
sudo rm /etc/X11/xorg.conf
sudo kill Xorg
startx
When X comes up, check  /var/log/Xorg.0.log.bak  for errors or post it here.
Title: Re: Xorg and dual monitor
Post by: curaga on March 19, 2020, 03:42:35 AM
If you only start Xorg, ie running Xorg -whatever instead of startx, a black screen is expected (that's the default background) - you didn't start any X apps. The -retro option will tell it to use the retro background instead, which is useful for such tests.
Title: Re: Xorg and dual monitor
Post by: core.dump on March 19, 2020, 06:25:46 AM
If you only start Xorg, ie running Xorg -whatever instead of startx, a black screen is expected (that's the default background) - you didn't start any X apps. The -retro option will tell it to use the retro background instead, which is useful for such tests.

Yes this works, what I see is a black-white dotted weave with a x-shaped mouse cursor in the middle of the desktop. The problem is the monitors are still NOT swapped.


Hi core.dump
First run a dependency to make sure nothing else is missing.
[...snip...]
When X comes up, check  /var/log/Xorg.0.log.bak  for errors or post it here.

Hi Rich,
OK I exactly followed your instructions in that order (tce-audit, reboot and all), the result is "failed in waitforX", here is what I got (Xorg.0.log):
Code: [Select]
[   981.559]
X.Org X Server 1.20.6
X Protocol Version 11, Revision 0
[   981.559] Build Operating System: Linux 4.19.10-tinycore64 x86_64
[   981.559] Current Operating System: Linux box 5.4.3-tinycore64 #2020 SMP Tue Dec 17 17:38:30 UTC 2019 x86_64
[   981.559] 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
[   981.559] Build Date: 10 December 2019  03:37:35PM
[   981.559] 
[   981.559] Current version of pixman: 0.38.4
[   981.559] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[   981.559] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   981.559] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Mar 19 10:35:51 2020
[   981.559] (==) Using config file: "/etc/X11/xorg.conf"
[   981.559] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   981.559] (==) ServerLayout "X.org Configured"
[   981.559] (**) |-->Screen "Screen0" (0)
[   981.559] (**) |   |-->Monitor "HDMI"
[   981.560] (**) |   |-->Device "Card0"
[   981.560] (**) |-->Input Device "Mouse0"
[   981.560] (**) |-->Input Device "Keyboard0"
[   981.560] (==) Automatically adding devices
[   981.560] (==) Automatically enabling devices
[   981.560] (==) Automatically adding GPU devices
[   981.560] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   981.560] (WW) The directory "/usr/local/lib/X11/fonts/OTF/" does not exist.
[   981.560] Entry deleted from font path.
[   981.560] (WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
[   981.560] Entry deleted from font path.
[   981.560] (WW) The directory "/usr/local/lib/X11/fonts/OTF/" does not exist.
[   981.560] Entry deleted from font path.
[   981.560] (WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
[   981.560] Entry deleted from font path.
[   981.560] (**) 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/,
/usr/local/lib/X11/fonts/misc/,
/usr/local/lib/X11/fonts/TTF/,
/usr/local/lib/X11/fonts/Type1/,
/usr/local/lib/X11/fonts/75dpi/
[   981.560] (**) ModulePath set to "/usr/local/lib/xorg/modules"
[   981.560] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[   981.560] (WW) Disabling Mouse0
[   981.560] (WW) Disabling Keyboard0
[   981.560] (II) Loader magic: 0x5b0be0
[   981.560] (II) Module ABI versions:
[   981.560] X.Org ANSI C Emulation: 0.4
[   981.560] X.Org Video Driver: 24.0
[   981.560] X.Org XInput driver : 24.1
[   981.560] X.Org Server Extension : 10.0
[   981.561] (II) xfree86: Adding drm device (/dev/dri/card0)
[   981.576] (--) 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
[   981.576] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[   981.576] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[   981.576] (II) LoadModule: "glx"
[   981.576] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   981.578] (II) Module glx: vendor="X.Org Foundation"
[   981.578] compiled for 1.20.6, module version = 1.0.0
[   981.578] ABI class: X.Org Server Extension, version 10.0
[   981.578] (II) LoadModule: "nouveau"
[   981.578] (WW) Warning, couldn't open module nouveau
[   981.578] (EE) Failed to load module "nouveau" (module does not exist, 0)
[   981.578] (EE) No drivers available.
[   981.578] (EE)
Fatal server error:
[   981.578] (EE) no screens found(EE)
[   981.578] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
 for help.
[   981.578] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   981.578] (EE)
[   981.578] (EE) Server terminated with error (1). Closing log file.

Please disregard the warnings (WW), I'll check them later. The error says "Failed to load module "nouveau" (module does not exist, 0)" but the strangest thing is: I installed nouveau-5.4.3-tinycore64.tcz (since that's the only way to make Xorg start correctly), but all works regularly (and no nouveau-related errors are raised) only if I don't tell Xorg to use the xorg.conf file.

I'm still not able to understand how can Xorg work without a configuration but with the correct driver, and not work work with a configuration because of the driver.

AFAIK there is no other suitable driver for my graphics card in the TC repo. I also tried installing the official Nvidia proprietary driver, without success (too many missing libs, too many wrong hardcoded paths, etc.).
Should I just remove the Driver "nouveau" statement from the Section "Device" in xorg.conf? Does it make sense?
Title: Re: Xorg and dual monitor
Post by: Juanito on March 19, 2020, 06:29:34 AM
In recent versions of x, you can use "snippets" of the config file - i.e. only the part you wish to alter from the default behaviour (in your case, swap screens) - you could try that?
Title: Re: Xorg and dual monitor
Post by: Rich on March 19, 2020, 09:15:23 AM
Hi core.dump
...  The error says "Failed to load module "nouveau" (module does not exist, 0)" but the strangest thing is: I installed nouveau-5.4.3-tinycore64.tcz (since that's the only way to make Xorg start correctly), but all works regularly (and no nouveau-related errors are raised) only if I don't tell Xorg to use the xorg.conf file. ...
Yes, but did you install  xf86-video-nouveau.tcz ?
Title: Re: Xorg and dual monitor
Post by: core.dump on March 19, 2020, 09:18:44 AM
Yes, but did you install  xf86-video-nouveau.tcz ?
Well no, I suppose xf86-video-nouveau.tcz is useless for me since it has no support for my GPU (supported by nouveau-5.4.3.-tinycore64.tcz instead).
Title: Re: Xorg and dual monitor
Post by: Rich on March 19, 2020, 09:38:42 AM
Hi core.dump
Well no, I suppose xf86-video-nouveau.tcz is useless for me since it has no support for my GPU (supported by nouveau-5.4.3.-tinycore64.tcz instead).
I thought it was  nvidia-390.116  that didn't support your GPU.

First see what  xf86-video-nouveau.tcz  does.

If that errors out, you can try changing this in your  xorg.conf  file from this:
Code: [Select]
Section "Device"
Identifier  "Card0"
Driver      "nouveau"
to that:
Code: [Select]
Section "Device"
Identifier  "Card0"
Driver      "nv"

and install  xf86-video-nv.tcz.
Title: Re: Xorg and dual monitor
Post by: core.dump on March 19, 2020, 09:59:05 AM
Hi core.dump
First see what  xf86-video-nouveau.tcz  does.

If that errors out, you can try changing this in your  xorg.conf  file from this:
Code: [Select]
Section "Device"
Identifier  "Card0"
Driver      "nouveau"
to that:
Code: [Select]
Section "Device"
Identifier  "Card0"
Driver      "nv"

and install  xf86-video-nv.tcz.

Of course I can try, but are we sure xf86-video-nouveau.tcz and/or xf86-video-nv.tcz won't overlap my currently installed driver and mess up everything? The description for xf86-video-nouveau.tcz reports:

"Driver for NVidia Cards including RIVA TNT, RIVA TNT2, GeForce 256, QUADRO, GeForce2, QUADRO2, GeForce3, QUADRO DDC, nForce, nForce2, GeForce4, QUADRO4, GeForce FX, QUADRO FX, GeForce 6XXX and GeForce 7xxx chipsets"

while xf86-video-nv.tcz is for GeForce 8 series GPUs. Mine is a GTX 16xx chipset, and it does not appear to be supported by any TC drivers package except for nouveau-5.4.3-tinycore64.tcz.

Certainly there are some hacks to get the things working, but I'm not so experienced in playing with x servers and video drivers, so I'm quite afraid of breaking all up :-\
Title: Re: Xorg and dual monitor
Post by: Rich 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.
Title: Re: Xorg and dual monitor
Post by: core.dump 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.
Title: Re: Xorg and dual monitor
Post by: Rich 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.
Title: Re: Xorg and dual monitor
Post by: core.dump 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.
Title: Re: Xorg and dual monitor
Post by: core.dump 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.
Title: Re: Xorg and dual monitor
Post by: Juanito 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.
Title: Re: Xorg and dual monitor
Post by: core.dump 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...
Title: Re: Xorg and dual monitor
Post by: Rich 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:~$
Title: Re: Xorg and dual monitor
Post by: core.dump 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 :)