old X configuration methods

The place to discuss Linux and Unix Operating Systems
Forum rules
Behave
Post Reply
User avatar
Grogan
Your Host
Posts: 2049
Joined: Sat Aug 21, 2021 10:04 am
Location: Ontario, Canada

old X configuration methods

Post by Grogan »

Jeeze, I set out on a quest to get X to just permanently use the modeline for 1920x1080x165Hz (which I can get by numerous means). I was getting tired of doing it with xrandr and wanted it in xorg.conf directives (in /etc/X11/xorg.conf.d) so it would simply be done by the X server itself. With the modesetting drivers it seems to ignore all that stuff. I can get it to take my sections, but some of the things I'm trying to do are being ignored. X is considering HDMI-1 to be the primary display (when using the generic modesetting driver. if using xf86-video-amdgpu it's called HDMI-A-0 ) so anything I do to it is going to a non-existent output. I'm still on Display Port, so my output (using the generic modesetting X11 driver) is DP-1

I'm specifying a modeline, and it's just going "yes, that's nice, I know that, but we're using the preferred mode your monitor advertises" (That's the 60 Hz modeline with this Sceptre display, 165 Hz is not the default)

I just can't figure it out because it's telling me things like "Option PreferredMode" are not used, and something I read in the man page about "Option Monitor-outputname monitorsectionname" in the Device section with directives then taking appended "-DP-1" doesn't seem to work anymore. I'm at the point where that would probably actually work if I were to connect the display to "HDMI-1" but I'm not ready to do that yet. (I would try the other DP port on the card first next time my problem happens before changing interfaces)

Note that I'm just trying to override the display behaviour, I don't want to configure the whole thing with multiple sections for the display outputs as if have multiple monitors etc. That's what the xorg.conf.d directory is for. According to older info, it used to just work with a Monitor section for a single display. (maybe still would if I was on HDMI-1)

Fine. I give up.

in my ~/.xinitrc file:

Code: Select all

(snipped variables not relevant to this)
...
xrandr --rate 165
exec icewm-session
# exec starttde
#exec startxfce4
Commands you put ABOVE the exec line are executed after the X server starts, but BEFORE the client starts (the exec line has to be the last one in the file).

xrandr will pick the correct modeline if not specified, so I only need the --rate in the command.

Of course if I was using only a desktop environment (e.g. XFCE) and not any legacy clients I could simply use its configuration manager that uses RandR functions to configure the display. I don't think you can do some of this shit the old way anymore. You'd define your monitor layout etc in xorg.conf directives still, but I think certain stuff has to be done through the RandR interface now.
User avatar
Grogan
Your Host
Posts: 2049
Joined: Sat Aug 21, 2021 10:04 am
Location: Ontario, Canada

Re: old X configuration methods

Post by Grogan »

What I mean is, I was having no luck trying to do things like this:

Code: Select all

Section "Monitor"
        Identifier   "DP-1"
        Modeline "1920x1080"   381.63   1920 1968 2000 2080   1080 1083 1088 1112 +hsync +vsync
        Option "DPMS" "true"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "modesetting"
        BusID       "PCI:3:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
	Monitor    "DP-1"
        DefaultDepth 24
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection
If I looked in the log, no matter what directives I put it said things like "modeset(0): Output HDMI-1 using monitor section DP-1"

If I have to use xrandr to change the DP-1 interface to the primary, I might as well just use "xrandr --rate 165" and not even have xorg.conf directives lol
Post Reply