lightdm - xrandr command to configure monitors only works once logged in - Ask Ubuntu
i have xrandr command sets monitors required (different scales deal ubuntu's extremely limited hdpi support @ current):
xrandr --fb 7040x2160 --output dp1 --mode 1920x1080 --pos 0x0 --scale 2x2 --output edp1 --mode 3200x1800 --pos 3840x180 --scale 1x1
if run in terminal after logging in works perfectly. works via startup applications seen in these answers: 1, 2, , 3 (works without sleep). configuration looks this:
screen 0: minimum 8 x 8, current 7040 x 2160, maximum 32767 x 32767 edp1 connected primary 3200x1800+3840+180 (normal left inverted right x axis y axis) 294mm x 165mm 3200x1800 59.98*+ 47.99 2880x1620 60.00 2560x1440 60.00 2048x1536 60.00 1920x1440 60.00 1856x1392 60.01 1792x1344 60.01 2048x1152 60.00 1920x1200 59.95 1920x1080 60.00 59.93 1600x1200 60.00 1680x1050 59.95 59.88 1600x1024 60.17 1400x1050 59.98 1600x900 60.00 1280x1024 60.02 1440x900 59.89 1280x960 60.00 1368x768 60.00 1360x768 59.80 59.96 1152x864 60.00 1280x720 60.00 1024x768 60.00 1024x576 60.00 960x540 60.00 800x600 60.32 56.25 864x486 60.00 640x480 59.94 720x405 60.00 640x360 60.00 dp1 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 531mm x 299mm 1920x1080 60.00*+ 50.00 59.94 1920x1080i 60.00 50.00 59.94 1600x1200 60.00 1680x1050 59.88 1280x1024 75.02 60.02 1440x900 74.98 59.90 1280x960 60.00 1280x800 59.91 1152x864 75.00 1280x720 60.00 50.00 59.94 1024x768 75.03 70.07 60.00 832x624 74.55 800x600 72.19 75.00 60.32 56.25 720x576 50.00 720x480 60.00 59.94 640x480 75.00 72.81 66.67 60.00 59.94 720x400 70.08 dp2 disconnected (normal left inverted right x axis y axis) hdmi1 disconnected (normal left inverted right x axis y axis) hdmi2 disconnected (normal left inverted right x axis y axis) virtual1 disconnected (normal left inverted right x axis y axis)
if run same command anywhere in startup process, either garbled configuration in framebuffer size incorrect (with screens placed on top of each other) or no effect @ all. places i've tried .xprofile
, lightdm
configuration (called display-setup-script
, greeter-setup-script
, , session-setup-script
).
i've logged verbose output command, , time says it's set correct values, output on screens , querying xrandr
afterwards says otherwise. how can configure screens further chain (at least greeter displayed correctly)? given x server initialised before then, there way xrandr
configuration commands stick?
edit note: question focuses on root of problem "configuring monitors prior once logged in"
my guess during login process, unity tries set screen itself, might 1 of things breaks. if login screen doesn't require configuration, , needed unity session, consider adding command startup applications runs automatically after login. way unity applies changes, override them own command.
what recommend use modified version of command:
bash -c 'sleep 3 && xrandr --fb 7040x2160 --output dp1 --mode 1920x1080 --pos 0x0 --scale 2x2 --output edp1 --mode 3200x1800 --pos 3840x180 --scale 1x1'
that way there's sufficient delay unity apply changes, , run own
Comments
Post a Comment