You are not logged in.

#1 2020-06-07 23:41:25

ZaheenJ
Member
Registered: 2020-04-04
Posts: 18

SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

I have a monitor(1600x900) connected to my laptop(1920x1080), which has an integrated intel gpu and dedicated Nvidia gpu. I use prime render offloading with optimus manager. When I am plugged in, the Nvidia card is being used fully.
Output of xrandr:

Screen 0: minimum 8 x 8, current 3520 x 1080, maximum 32767 x 32767
HDMI-0 connected primary 1600x900+0+90 (normal left inverted right x axis y axis) 443mm x 249mm
   1600x900      59.95*+
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  
eDP-1-1 connected 1920x1080+1600+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080     59.98*+  59.97    59.96    59.93    47.98  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   640x400       59.88    59.98  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
  1280x1024 (0x1c0) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1280x960 (0x1c1) 108.000MHz +HSync +VSync
        h: width  1280 start 1376 end 1488 total 1800 skew    0 clock  60.00KHz
        v: height  960 start  961 end  964 total 1000           clock  60.00Hz
  1280x800 (0x1c2) 83.500MHz -HSync +VSync
        h: width  1280 start 1352 end 1480 total 1680 skew    0 clock  49.70KHz
        v: height  800 start  803 end  809 total  831           clock  59.81Hz
  1024x768 (0x1c7) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  800x600 (0x1ca) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  800x600 (0x1cb) 36.000MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz
        v: height  600 start  601 end  603 total  625           clock  56.25Hz
  640x480 (0x1ce) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz

I have tried using multiple themes with the same result. My lower resolution monitor is not displaying correctly, I think its trying to display 1920x1080.Here is what it looks like. What I want is for the login screen to be mirrored on both displays. When I do

sddm-greeter --test-mode --theme /usr/share/sddm/themes/[theme]

, it displays correctly. Any help would be greatly appreciated, thankyou

Last edited by ZaheenJ (2020-06-07 23:53:07)

Offline

#2 2020-06-08 04:14:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,692

Re: SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

Is the xrandr output from the SDDM login screen or obtained during your session?
If the latter, how do you configure the resolution during for SDDM?
If the answer is "not", see https://wiki.archlinux.org/index.php/Xr … figuration and https://wiki.archlinux.org/index.php/Multihead .

Offline

#3 2020-06-08 16:36:09

ZaheenJ
Member
Registered: 2020-04-04
Posts: 18

Re: SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

Yes, that was from my session(after login), and I have only ever configured it through kscreen(kde screen management software in settings).

I first installed autorandr, and set it up with my two configurations that I use right now. It created a systems service so I assumed it would run before login, but my resolution was still wrong. How do I make it run before the login screen?
Another solution I tried was adding

if xrandr | grep "$mon1 connected"; then
	xrandr --output "$mon1" --primary --mode 1600x900 --output "$intern" --left-of "$mon1" --mode 1920x1080
else
	xrandr --output "$intern" --mode 1920x1080
fi

to /usr/share/sddm/scripts/Xsetup, but it seems to have no effect. I also need a dynamic configuration so I can't use x config files or multihead. At least autorandr now lets me hook up my monitor and unplug it seamlessly.

Last edited by ZaheenJ (2020-06-08 16:43:09)

Offline

#4 2020-06-08 18:25:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,692

Re: SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

Is that the entire script? What defines "$mon1" and "$intern"?
Did you check whether the expected branch is met (or the script is executed at all) by eg. "echo dual >> /tmp/sddm_randr.dbg" resp. "echo single >> /tmp/sddm_randr.dbg"?

Offline

#5 2020-06-09 02:53:35

ZaheenJ
Member
Registered: 2020-04-04
Posts: 18

Re: SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

I did define mon1 and intern, I just forgot to copy paste it, sorry for the confusion. No I didn't test if the script is running, I don't remember why I didn't. I put that line in /usr/share/sddm/scripts/Xsetup, where I added my script, but I did not see sddm_randr.dbg when doing "ls -a /tmp | grep sddm". I am sorry if I am doing something wrong.

Offline

#6 2020-06-09 05:44:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,692

Re: SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

Post the entire /usr/share/sddm/scripts/Xsetup and also the output of

stat /usr/share/sddm/scripts/Xsetup

Offline

#7 2020-06-09 09:13:29

ZaheenJ
Member
Registered: 2020-04-04
Posts: 18

Re: SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

I first tried to write the script with autorandr instead of xrandr, which is the commented part. Here is the entire /usr/share/sddm/scripts/Xsetup script:

#!/bin/sh
# Xsetup - run as root before the login dialog appears

echo dual >> /tmp/sddm_randr.dbg" resp. "echo single >> /tmp/sddm_randr.dbg

intern=eDP-1-1
mon1=HDMI-0

if xrandr | grep "$mon1 connected"; then
        xrandr --output "$mon1" --primary --mode 1600x900 --output "$intern" --left-of "$mon1" --mode 1920x1080
else
        xrandr --output "$intern" --mode 1920x1080
fi

#if autorandr | grep "docked (detected)"; then
#       autorandr docked
#elif autorandr | grep "mobile (detected)"; then
#       autorandr mobile
#else
#       autorandr mobile
#fi

Here is the output of "stat /usr/share/sddm/scripts/Xsetup":

  File: /usr/share/sddm/scripts/Xsetup
  Size: 541             Blocks: 8          IO Block: 4096   regular file
Device: 10304h/66308d   Inode: 3679651     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-06-08 09:36:27.885261791 -0700
Modify: 2020-06-08 19:46:45.450465866 -0700
Change: 2020-06-08 19:46:45.450465866 -0700
 Birth: 2020-06-08 09:36:27.885261791 -0700

Offline

#8 2020-06-09 10:02:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,692

Re: SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

I rather meant sth. like

…

intern=eDP-1-1
mon1=HDMI-0

if xrandr | grep "$mon1 connected"; then
        echo dual >> /tmp/sddm_randr.dbg
        xrandr --output "$mon1" --primary --mode 1600x900 --output "$intern" --left-of "$mon1" --mode 1920x1080
else
        echo single >> /tmp/sddm_randr.dbg
        xrandr --output "$intern" --mode 1920x1080
fi
…

Offline

#9 2020-06-09 18:12:10

ZaheenJ
Member
Registered: 2020-04-04
Posts: 18

Re: SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

I did what you said, here is what it looks like now:

#!/bin/sh
# Xsetup - run as root before the login dialog appears

intern=eDP-1-1
mon1=HDMI-0

if xrandr | grep "$mon1 connected"; then
    echo dual >> /tmp/sddm_randr.dbg" resp. "echo single >> /tmp/sddm_randr.dbg
        xrandr --output "$mon1" --primary --mode 1600x900 --output "$intern" --left-of "$mon1" --mode 1920x1080
else
    echo dual >> /tmp/sddm_randr.dbg" resp. "echo single >> /tmp/sddm_randr.dbg
        xrandr --output "$intern" --mode 1920x1080
fi

##if autorandr | grep "docked (detected)"; then
##      autorandr docked
##elif autorandr | grep "mobile (detected)"; then
##      autorandr mobile
##else
##      autorandr mobile
##fi

Nothing else has changed

Offline

#10 2020-06-09 19:58:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,692

Re: SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

Seriously…?

#!/bin/sh
# Xsetup - run as root before the login dialog appears

intern="eDP-1-1"
mon1="HDMI-0"

if xrandr | grep "$mon1 connected"; then
        echo dual >> /tmp/sddm_randr.dbg
        xrandr --output "$mon1" --primary --mode 1600x900 --output "$intern" --left-of "$mon1" --mode 1920x1080
else
        echo single >> /tmp/sddm_randr.dbg
        xrandr --output "$intern" --mode 1920x1080
fi

And check whether /tmp/sddm_randr.dbg was generated and for its contents.

Offline

#11 2020-06-10 06:33:50

ZaheenJ
Member
Registered: 2020-04-04
Posts: 18

Re: SDDM Doesn't Display Correctly on 2 Screens with Different Resolution

Sorry, I copy pasted the wrong line. Here is is now, make sure I haven't done anything else stupid:

#!/bin/sh
# Xsetup - run as root before the login dialog appears

intern=eDP-1-1
mon1=HDMI-0

if xrandr | grep "$mon1 connected"; then
        echo dual >> /tmp/sddm_randr.dbg
        xrandr --output "$mon1" --primary --mode 1600x900 --output "$intern" --left-of "$mon1" --mode 1920x1080
else
        echo single >> /tmp/sddm_randr.dbg
        xrandr --output "$intern" --mode 1920x1080
fi

#if autorandr | grep "docked (detected)"; then
#       autorandr docked
#elif autorandr | grep "mobile (detected)"; then
#       autorandr mobile
#else
#       autorandr mobile
#fi

Unfortunately, I do not see any new results from "ls /tmp | grep sddm", unless that is the wrong command to do. Here is what I got:

sddm-:0-lGWrHf
sddm-authfe242f9e-fc55-4b0d-a792-018ae1e1f95d

Offline

Board footer

Powered by FluxBB