You are not logged in.

#1 2017-03-12 10:13:57

anselm
Banned
Registered: 2016-05-11
Posts: 120

How can I determine which Xorg.conf file is in use?

I am trying to configure my display for a low resolution (old display, only 640x480 and 800x600 are supported). I edited /etc/X11/Xorg.conf, looks like following:

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc/"
	FontPath     "/usr/share/fonts/TTF/"
	FontPath     "/usr/share/fonts/OTF/"
	FontPath     "/usr/share/fonts/Type1/"
	FontPath     "/usr/share/fonts/100dpi/"
	FontPath     "/usr/share/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   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
	#640x480 59.38 Hz (CVT 0.31M3) hsync: 29.69 kHz; pclk: 23.75 MHz
	Modeline "640x480_60.00"   23.75  640 664 720 800  480 483 487 500 -hsync +vsync
	# 800x600 59.86 Hz (CVT 0.48M3) hsync: 37.35 kHz; pclk: 38.25 MHz
        Modeline "800x600_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync
	# 1024x768 49.98 Hz (CVT 0.79M3) hsync: 39.63 kHz; pclk: 52.00 MHz
	Modeline "1024x768_50.00"   52.00  1024 1072 1168 1312  768 771 775 793 -hsync +vsync
	Option "PreferredMode" "640x480_60.0"
	Option "Primary" "true"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "nouveau"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	DefaultDepth 16
	SubSection "Display"
		Viewport   0 0
		Depth     16
		Modes "640x480_60.0" "800x600_60.0" "1024x768_50.0"
	EndSubSection
EndSection

But after that something went wrong, a higher resolution was set than the monitor supports (no picture on the monitor in this case) so I temporarily renamed the /etc/X11/Xorg.conf file to get again a working GUI. After succesfully loading the GUI I am still able to select the resolutions I defined in the Xorg.conf from "Start menu / Settings / Display". So they must be stored somewhere else, because the /etc/X11/Xorg.conf was renamed.

My question is how can I determine which Xorg.conf file is in use currently?

Last edited by anselm (2017-03-12 10:14:52)

Offline

#2 2017-03-12 10:50:50

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,865
Website

Re: How can I determine which Xorg.conf file is in use?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2017-03-12 11:16:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: How can I determine which Xorg.conf file is in use?

Without the xorg conf reasonable defaults that usually work are used.  If the modes you tried to define are already defined by default, why do you feel the need to add them?

I'm confused.  You say you think you need to add an xorg.conf to set a resolution that works, but when you have an xorg.conf it fails, but without an xorg.conf it works.  If it works without an xorg.conf, then get rid of the xorg.conf.  What is the problem when you *don't* have an xorg.conf?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2017-03-12 11:29:56

anselm
Banned
Registered: 2016-05-11
Posts: 120

Re: How can I determine which Xorg.conf file is in use?

It contains these lines:

...
[    29.839] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    29.839] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    29.883] (==) No Layout section.  Using the first Screen section.
[    29.883] (==) No screen section available. Using defaults.
[    29.883] (**) |-->Screen "Default Screen Section" (0)
[    29.883] (**) |   |-->Monitor "<default monitor>"
[    29.903] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
...

Directory /etc/X11/xorg.conf.d contains files:

-rw-r--r-- 1 root root  320 Mar 11 22:58 00-keyboard.conf
-rw-r--r-- 1 root root  684 Mar  7 20:02 20-nvidia.conf.old
-rw-r--r-- 1 root root  538 Mar  7 16:50 20-nvidia.conf.old2

Directory /usr/share/X11/xorg.conf.d contains files:

-rw-r--r-- 1 root root 1350 Mar  3 18:04 10-quirks.conf
-rw-r--r-- 1 root root  964 Mar  9 13:31 40-libinput.conf
-rw-r--r-- 1 root root 1753 Nov 18 09:09 70-synaptics.conf

None of them contains an Xorg.conf.
xrandr utility prints:

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 640 x 480, maximum 1024 x 768
default connected 640x480+0+0 0mm x 0mm
   1024x768       0.00  
   800x600       61.00  
   640x480       60.00* 

Offline

#5 2017-03-12 11:32:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: How can I determine which Xorg.conf file is in use?

Like I said, for each section it is noting that it is using defaults.  So what is the problem?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2017-03-12 11:38:08

anselm
Banned
Registered: 2016-05-11
Posts: 120

Re: How can I determine which Xorg.conf file is in use?

Trilby wrote:

Without the xorg conf reasonable defaults that usually work are used.  If the modes you tried to define are already defined by default, why do you feel the need to add them?

I'm confused.  You say you think you need to add an xorg.conf to set a resolution that works, but when you have an xorg.conf it fails, but without an xorg.conf it works.  If it works without an xorg.conf, then get rid of the xorg.conf.  What is the problem when you *don't* have an xorg.conf?

When I don't have an xorg.conf I can't define a resolution for the login screen. And in my case it is 1024x768 and I barely can see anyithing because my monitor doesn't support that resolution: image is doubled somehow in horizontally, and half tall of the monitor height, and not clear image but scrambled. When I login, resolution is set to 640x480 automatically though.

Anyway I had to add kernel line parameter "nomodeset" to get the old monitor working. When I don't add that parameter I get only a not black but gray screen when GUI begins to load and video card is switched to graphical mode from the pure character terminal (which I had set in grub.cfg)

Furthermore I would like to set 800x600 resolution if possible, but I have to find out the right hsync and vsync (as far as I remember it worked well when I used Windows 95 with this old monitor). And I would like to try out the panning mode too: bigger logical screen size than the physical resolution, and viewport follows the mouse movements. I think this can be defined in xorg.conf.

My other monitor, 15" MAG DJ530 unfortunately run down - nearly got fire - and I must use this old one till I manage to by a new monitor or a laptop. Laptops can be bought only in webshops, so I must have a working monitor to buy a new one. I also have a 3rd monitor, 17" LG, but it seems to be not working any more, if I plug it to the video card, there is no picture. Monitor menus also doesn't come up when I press the buttons. In the past it doesn't worked well but when GUI was loaded the LG monitor took the signal and it switched itself on somehow. Right now it simply refuses to work.

Last edited by anselm (2017-03-12 11:47:26)

Offline

#7 2017-03-12 11:43:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: How can I determine which Xorg.conf file is in use?

Ok, so the main problem is that your display manager is using the wrong resolution, right?  Does it work if you use startx/xinit?  You can put an xrandr command in your xinitrc to select the 800x600 mode.

If this is just a display manager issue, which display manager is it?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2017-03-12 11:55:38

anselm
Banned
Registered: 2016-05-11
Posts: 120

Re: How can I determine which Xorg.conf file is in use?

Which display manager: I am using Xfce. And I have a process called "lxdm.service", sometimes I have to invoke:

sudo systemctl stop lxdm.service

Eg.: when GUI isn't loading for some reason, and I have to get a terminal console to login and to install another video drivers, etc, similarly when adding runlevel parameter 1 to the kernel line to disable loading the GUI and get a maintenance mode. If I not kill the lxdm.service, I press Ctrl+Alt+F2 in vain, because I will be always switched back to virtual terminal 7 (Ctrl+Alt+F7) where the graphical GUI would reside, but in these cases I can see only a message: "Target graphical interface reached".

Old 14" monochrome grayscale monitor from 1993 still on duty:

crwtq29.jpg

I got - hopefully - proper timing info with command "cvt"

cvt 800 600 60

# 800x600 59.86 Hz (CVT 0.48M3) hsync: 37.35 kHz; pclk: 38.25 MHz
Modeline "800x600_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync

Then I used the values for xrandr:

xrandr --newmode "800x600"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync
xrandr --addmode default 800x600
xrandr --output default --mode 800x600

But unfortunatelly instead of 60 Hz, 61 Hz is set (sixty-one Hz) and monitor doesn't support that well, I get a distorted picture on the screen.

Last edited by anselm (2017-03-12 12:30:20)

Offline

#9 2017-03-13 21:57:40

seth
Member
Registered: 2012-09-03
Posts: 51,270

Re: How can I determine which Xorg.conf file is in use?

If you do not have the tech sheet for the monitor, you can interactively search the proper values (and a modeline) using xorg-xvidtune.
Otherwise feed the data into http://xtiming.sourceforge.net/cgi-bin/xtiming.pl

Then  put the  "Monitor" section with proper modelines into its own /etc/X11/xorg.conf.d/11-monitor.conf configlet and use the randr output name ("default" in the output you provided, but it's usually sth. like "VGA-0" or so) as Identifier string.

Offline

Board footer

Powered by FluxBB