Score:0

No display when starting an additional X session

in flag

So I have this setup at home:

+------------------+  +----------------+
| Secondary screen |  | Primary screen |
| 1280x1024 75Hz   |  | 1920x1200 60Hz |
| (Rotated)        |  |                |
+--+---------------+  +--+--------+----+
   | VGA                 | DVI    | Display
+--+-----------+         |        |
| HDMI <-> VGA |         |        |
+--+-----------+         |        |
   |                     |        |
+--+--+                  |        |
| KVM |   +--------------+        |
+-+-+-+   |                       |
  | |     |                       |
  | +-----(--------------+        |
  |       |              |        |
  | HDMI  | DVI          | HDMI   | Display
+-+-------+-----+      +-+--------+--------+
| Home PC       |      | Work from home PC |
| Linux         |      | Windows           |
+---------------+      +-------------------+

(The subject of this question is my Home PC, running Kubuntu 20.04 with sddm.)


About a week ago the resolution of my secondary display failed to be detected by my Home PC, and it reverted to 640x480 60Hz. As a result, my primary screen degraded to similar resolution on the login screen (sddm), and it stayed this way after login.

I was able to fix the resolution of the primary display using KDE's display settings, but the only resolution available for my secondary screen was only 640x480.

And indeed the output of xrander was:

[...]
HDMI-A-0 connected 640x480+0+0 left (normal left inverted right x axis y axis) 0mm x 0mm
   640x480       59.94  
DVI-D-0 connected primary 1920x1200+1024+40 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00  
   1600x1200     60.00  
   1680x1050     59.88  
   1280x1024     60.02  
   1440x900      59.95  
   1280x960      60.00  
   1280x800      59.95  
   1280x720      59.95  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94  
   720x400       70.08  

My work from home PC running Windows was unaffected, and used the proper resolution for both displays.

I resolved this issue by editing /usr/share/sddm/scripts/Xsetup and adding to it:

xrandr --newmode 1280x1024_75_my  138.75  1280 1368 1504 1728  1024 1027 1034 1072 -hsync +vsync
xrandr --addmode HDMI-A-0 1280x1024_my
# generated with arandr
xrandr --output DisplayPort-0 --off \
       --output HDMI-A-0 --mode 1280x1024_75_my --pos 0x0 --rotate left \
       --output DVI-D-0 --primary --mode 1920x1200 --pos 1024x40 --rotate normal

This works, however, when I start a new session (my wife and I are using this to move between her "side" and my "side" w/o the need to logout), I get a black screen with a blinking cursor, which soon changed to a "no signal" message.

When this happens I am not able to switch to a different virtual terminal with the [Ctrl]+[Alt]+[F<n>] and my only option is a reset.

In-fact, the blinking cursor belongs to tty2, and it appears only on my primary display, my secondary display is blank. I can tell this, if prior to creating a new session I use [Ctrl] + [Alt] + [F2] to get to tty2, where I get a login prompt on both screen (the secondary is not rotated properly).

When I got back to my X session with [Ctrl] + [Alt] + [F1] and start a new session from there, I can see my tty2 login on my primary display, and my secondary screen get blank. Typing on the keyboard get no response, and "no signal" replaces whatever I had on the display after a few seconds.

When I logout from my session, I do get the sddm screen and I can log back in.

So my question is: How can I fix my screen resolution so that when I create a new session I will get a working sddm screen?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.