Discussion:
Keypad mode switch in X fails
(too old to reply)
Mike Spencer
2023-03-12 06:20:18 UTC
Permalink
I'm unable to make X switch between display modes with CTRL ALT KP+
and CTRL ALT KP-. I have an /etc/X11/xorg.conf.d/xorg.conf file
(details below) with a Screen section and 4 modes in a Display
SubSection.

Following startx, the display comes up in the first mode listed in
that file so it's verified that the monitor, video card and X are able
to interpret and render all of the desired resolutions.

But the CTRL ALT KPx key chords don't work. Only the first mode in
the list becomes available.

I wondered if extensive key reassignment in xmodmap might be a source
of the problem but xvidtune(1) next and prev commands also have no
effect, do not switch modes.

I never got the mode switching to work in 14.{1,2} but it didn't
matter as 1024x768 was perfect for my IBM 19" CRT. Now I need to
be able to do it.

Any pointers welcome. I dread having to revert to hacking xorg,conf a
la 1990s -- surely not?

TIA,
- Mike



Details:

/etc/X11/xorg.conf.d/xorg.conf

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"

DefaultDepth 24

SubSection "Display"
Viewport 0 0
Depth 24
# Modes "1280x720" "1920x1080" "1600x900" "1024x768"
Modes "1920x1080" "1280x720" "1600x900" "1024x768"
EndSubSection

EndSection

The monitor's native res is 1920x1080. It nags with popups when
other resolutions are in effect but each of the the 16:9 modes works
if it's the first listed in the Modes line.

The 1024x768 mode is to accommodate a different CRT monitor sometimes
substituted for the 16:9 flatscreen. It also works on the 16:9
monitor if it's the first in the list but, predictably, with distorted
rendering.
Henrik Carlqvist
2023-03-12 11:20:40 UTC
Permalink
Post by Mike Spencer
I never got the mode switching to work in 14.{1,2}
It works fine here on my Slackware 14.2 system. If it does matter in any
way, I use LILO to boot a huge kernel with the good old legacy MBR way
and with only the following option in lilo.conf:

append=" vt.default_utf8=0"

Possible things that could make your system behave differently than mine:

1) The graphics driver, I use the VESA driver for my intel chipset, from
Xorg.0.log:

[ 75.491] (II) VESA(0): VESA VBE OEM: Intel(R) SKL/KBL Mobile/Desktop
Graphics Chipset Accelerated VGA BIOS
...
[ 75.540] (II) VESA(0): Modeline "1920x1200"x0.0 154.00 1920...
[ 75.540] (II) VESA(0): Modeline "800x600"x0.0 40.00 800 ...
[ 75.540] (II) VESA(0): Modeline "640x480"x0.0 25.18 640 ...

2) The kernel options, maybe things like kms matter?

3) The boot method, maybe UEFI messes with your resolution?

regards Henrik
Javier
2023-03-12 17:16:54 UTC
Permalink
Post by Mike Spencer
I never got the mode switching to work in 14.{1,2} but it didn't
matter as 1024x768 was perfect for my IBM 19" CRT. Now I need to
be able to do it.
Any pointers welcome. I dread having to revert to hacking xorg,conf a
la 1990s -- surely not?
Try with xrandr

$ xrandr

Screen 0: minimum 8 x 8, current 1920 x 1200, maximum 32767 x 32767
LVDS1 connected primary (normal left inverted right x axis y axis)
1920x1080 60.00 + 59.93 50.00
1680x1050 59.88
1400x1050 59.98
...
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
LVDS-1-2 disconnected (normal left inverted right x axis y axis)
VGA-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-1 connected 1920x1200+0+0 ...

This is what I use myself, but the exact comand depends on your hardware.

$ xrandr --output LVDS1 --mode 1920x1080 && xrandr --output DP-1-1 --off
Mike Spencer
2023-03-13 04:13:41 UTC
Permalink
Post by Javier
Post by Mike Spencer
I never got the mode switching to work in 14.{1,2} but it didn't
matter as 1024x768 was perfect for my IBM 19" CRT. Now I need to
be able to do it.
Any pointers welcome. I dread having to revert to hacking xorg,conf a
la 1990s -- surely not?
Try with xrandr
$ xrandr
TYVM. Problem solved. The documentation is a little unclear.

--mode mode selects a mode. Use either the name or the XID for mode.

What's a valid name? What's an XID? No matter, it works fine.

alias xdef 'xrandr --output VGA-0 --mode 1920x1080'
alias xmed 'xrandr --output VGA-0 --mode 1600x900'
alias xbig 'xrandr --output VGA-0 --mode 1280x720'

gives me three 16:9 modes to accommodate movies, text and big text for
tired eyes. I'm sure I can repeat or vary the trick when I go for a
bigger monitor now that I know about xrandr.
Post by Javier
This is what I use myself, but the exact comand depends on your hardware.
$ xrandr --output LVDS1 --mode 1920x1080 && xrandr --output DP-1-1 --off
Yeah, an example that told me syntax for a mode's "name" might be
x-resXy-res, tnx.
--
Mike Spencer Nova Scotia, Canada
Loading...