You are not logged in.
Hi guys,
I would like to present my project called umonitor. The goal of this project is to implement desktop environment independent dynamic monitor management. Dynamic monitor management means that the positions and resolutions of the monitors will be automatically be updated whenever monitors are hotplugged. This project is similar to projects like autorandr, but my project is written in C and consists of only a single binary. When properly setup, using it is as easy as just including it in your .xinitrc file. More information and how to use it can be found at the Github page. Hope you guys find this program useful like I do! I welcome any feedback
Github: https://github.com/rliou92/umonitor
AUR: https://aur.archlinux.org/packages/umonitor-git/
Last edited by LeaveAThousand (2017-07-22 15:34:37)
Offline
i am excited by this.. will give it a test over the next few days to see how it all goes
laptop docked at work with 2 external displays then undocked at home.. if this can all be automatic in arch/xfce4 then i will be a most happy penguin!!
will come back with feedback
Offline
i created a docked and undocked profile. it works when i undock my laptop but doesnt seem to catch it when i dock my laptop.. what logging do you need to help work this one out?
Offline
Stanna,
Thanks for trying it out! I would like to point out that once you run the umonitor program, you must restart the program if you make any changes to the configuration file. Just mentioning that in case you saved the docked profile after you ran umonitor --listen. Can you give me the following information:
1. xrandr --verbose (when you have your docked profile setup)
2. umonitor --load docked --verbose
- Do this when you are undocked, plug into your dock, then run the umonitor program with those flags. --verbose will make it spit out a lot of debugging information
Offline
xrandr --verbose
Screen 0: minimum 320 x 200, current 3360 x 1050, maximum 8192 x 8192
eDP-1 connected (normal left inverted right x axis y axis)
Identifier: 0x41
Timestamp: 5059268
Subpixel: unknown
Clones:
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
EDID:
00ffffffffffff004ca3414c00000000
00130104801a10780a87f594574f8c27
27505400000001010101010101010101
010101010101121b0049502036301030
130005a3100000190c12004950203630
1030130005a310000019000000000000
00000000000000000000000000000002
000c3ff40a3c6e1815276e000000007a
scaling mode: Full aspect
supported: None, Full, Center, Full aspect
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
1280x800 (0x48) 69.300MHz -HSync -VSync +preferred
h: width 1280 start 1296 end 1344 total 1353 skew 0 clock 51.22KHz
v: height 800 start 801 end 804 total 854 clock 59.98Hz
1280x800 (0x49) 46.200MHz -HSync -VSync
h: width 1280 start 1296 end 1344 total 1353 skew 0 clock 34.15KHz
v: height 800 start 801 end 804 total 854 clock 39.98Hz
1024x768 (0x4a) 133.475MHz -HSync +VSync DoubleScan
h: width 1024 start 1100 end 1212 total 1400 skew 0 clock 95.34KHz
v: height 768 start 768 end 770 total 794 clock 60.04Hz
1024x768 (0x4b) 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
960x720 (0x4c) 117.000MHz -HSync +VSync DoubleScan
h: width 960 start 1024 end 1128 total 1300 skew 0 clock 90.00KHz
v: height 720 start 720 end 722 total 750 clock 60.00Hz
928x696 (0x4d) 109.150MHz -HSync +VSync DoubleScan
h: width 928 start 976 end 1088 total 1264 skew 0 clock 86.35KHz
v: height 696 start 696 end 698 total 719 clock 60.05Hz
896x672 (0x4e) 102.400MHz -HSync +VSync DoubleScan
h: width 896 start 960 end 1060 total 1224 skew 0 clock 83.66KHz
v: height 672 start 672 end 674 total 697 clock 60.01Hz
800x600 (0x4f) 81.000MHz +HSync +VSync DoubleScan
h: width 800 start 832 end 928 total 1080 skew 0 clock 75.00KHz
v: height 600 start 600 end 602 total 625 clock 60.00Hz
800x600 (0x50) 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 (0x51) 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
700x525 (0x52) 61.000MHz +HSync +VSync DoubleScan
h: width 700 start 744 end 820 total 940 skew 0 clock 64.89KHz
v: height 525 start 526 end 532 total 541 clock 59.98Hz
640x512 (0x53) 54.000MHz +HSync +VSync DoubleScan
h: width 640 start 664 end 720 total 844 skew 0 clock 63.98KHz
v: height 512 start 512 end 514 total 533 clock 60.02Hz
640x480 (0x54) 54.000MHz +HSync +VSync DoubleScan
h: width 640 start 688 end 744 total 900 skew 0 clock 60.00KHz
v: height 480 start 480 end 482 total 500 clock 60.00Hz
640x480 (0x55) 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
512x384 (0x56) 32.500MHz -HSync -VSync DoubleScan
h: width 512 start 524 end 592 total 672 skew 0 clock 48.36KHz
v: height 384 start 385 end 388 total 403 clock 60.00Hz
400x300 (0x57) 20.000MHz +HSync +VSync DoubleScan
h: width 400 start 420 end 484 total 528 skew 0 clock 37.88KHz
v: height 300 start 300 end 302 total 314 clock 60.32Hz
400x300 (0x58) 18.000MHz +HSync +VSync DoubleScan
h: width 400 start 412 end 448 total 512 skew 0 clock 35.16KHz
v: height 300 start 300 end 301 total 312 clock 56.34Hz
320x240 (0x59) 12.587MHz -HSync -VSync DoubleScan
h: width 320 start 328 end 376 total 400 skew 0 clock 31.47KHz
v: height 240 start 245 end 246 total 262 clock 60.05Hz
VGA-1 connected 1680x1050+1680+0 (0x5a) normal (normal left inverted right x axis y axis) 474mm x 296mm
Identifier: 0x42
Timestamp: 5059268
Subpixel: unknown
Gamma: 1.0:1.0:1.0
Brightness: 1.0
Clones:
CRTC: 1
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
EDID:
00ffffffffffff004c2d7e023232454d
1a1101030e2f1e782ad515a455499a27
145054bfef80b30081808140714f0101
0101010101017c2e90a0601a1e403020
3600da281100001a000000fd00384b1e
510e000a202020202020000000fc0053
796e634d61737465720a2020000000ff
00485643503634313937310a202000aa
1680x1050 (0x5a) 119.000MHz +HSync -VSync *current +preferred
h: width 1680 start 1728 end 1760 total 1840 skew 0 clock 64.67KHz
v: height 1050 start 1053 end 1059 total 1080 clock 59.88Hz
1280x1024 (0x5b) 135.000MHz +HSync +VSync
h: width 1280 start 1296 end 1440 total 1688 skew 0 clock 79.98KHz
v: height 1024 start 1025 end 1028 total 1066 clock 75.02Hz
1280x1024 (0x5c) 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 (0x5d) 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
1152x864 (0x5e) 108.000MHz +HSync +VSync
h: width 1152 start 1216 end 1344 total 1600 skew 0 clock 67.50KHz
v: height 864 start 865 end 868 total 900 clock 75.00Hz
1024x768 (0x5f) 78.750MHz +HSync +VSync
h: width 1024 start 1040 end 1136 total 1312 skew 0 clock 60.02KHz
v: height 768 start 769 end 772 total 800 clock 75.03Hz
1024x768 (0x60) 75.000MHz -HSync -VSync
h: width 1024 start 1048 end 1184 total 1328 skew 0 clock 56.48KHz
v: height 768 start 771 end 777 total 806 clock 70.07Hz
1024x768 (0x4b) 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
832x624 (0x61) 57.284MHz -HSync -VSync
h: width 832 start 864 end 928 total 1152 skew 0 clock 49.73KHz
v: height 624 start 625 end 628 total 667 clock 74.55Hz
800x600 (0x62) 50.000MHz +HSync +VSync
h: width 800 start 856 end 976 total 1040 skew 0 clock 48.08KHz
v: height 600 start 637 end 643 total 666 clock 72.19Hz
800x600 (0x63) 49.500MHz +HSync +VSync
h: width 800 start 816 end 896 total 1056 skew 0 clock 46.88KHz
v: height 600 start 601 end 604 total 625 clock 75.00Hz
800x600 (0x50) 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 (0x51) 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 (0x64) 31.500MHz -HSync -VSync
h: width 640 start 656 end 720 total 840 skew 0 clock 37.50KHz
v: height 480 start 481 end 484 total 500 clock 75.00Hz
640x480 (0x65) 31.500MHz -HSync -VSync
h: width 640 start 664 end 704 total 832 skew 0 clock 37.86KHz
v: height 480 start 489 end 492 total 520 clock 72.81Hz
640x480 (0x66) 30.240MHz -HSync -VSync
h: width 640 start 704 end 768 total 864 skew 0 clock 35.00KHz
v: height 480 start 483 end 486 total 525 clock 66.67Hz
640x480 (0x55) 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
720x400 (0x67) 28.320MHz -HSync +VSync
h: width 720 start 738 end 846 total 900 skew 0 clock 31.47KHz
v: height 400 start 412 end 414 total 449 clock 70.08Hz
HDMI-1 connected primary 1680x1050+0+0 (0x5a) normal (normal left inverted right x axis y axis) 474mm x 296mm
Identifier: 0x43
Timestamp: 5059268
Subpixel: unknown
Gamma: 1.0:1.0:1.0
Brightness: 1.0
Clones:
CRTC: 0
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
EDID:
00ffffffffffff004c2d7c0332325141
0a120103802f1e782a78f1a655489b26
125054bfef80b30081808140714f0101
0101010101017c2e90a0601a1e403020
3600da281100001a000000fd00384b1e
510e000a202020202020000000fc0053
796e634d61737465720a2020000000ff
00484d41513330313932340a202000dd
aspect ratio: Automatic
supported: Automatic, 4:3, 16:9
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
1680x1050 (0x5a) 119.000MHz +HSync -VSync *current +preferred
h: width 1680 start 1728 end 1760 total 1840 skew 0 clock 64.67KHz
v: height 1050 start 1053 end 1059 total 1080 clock 59.88Hz
1280x1024 (0x5b) 135.000MHz +HSync +VSync
h: width 1280 start 1296 end 1440 total 1688 skew 0 clock 79.98KHz
v: height 1024 start 1025 end 1028 total 1066 clock 75.02Hz
1280x1024 (0x5c) 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 (0x5d) 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
1152x864 (0x5e) 108.000MHz +HSync +VSync
h: width 1152 start 1216 end 1344 total 1600 skew 0 clock 67.50KHz
v: height 864 start 865 end 868 total 900 clock 75.00Hz
1024x768 (0x5f) 78.750MHz +HSync +VSync
h: width 1024 start 1040 end 1136 total 1312 skew 0 clock 60.02KHz
v: height 768 start 769 end 772 total 800 clock 75.03Hz
1024x768 (0x60) 75.000MHz -HSync -VSync
h: width 1024 start 1048 end 1184 total 1328 skew 0 clock 56.48KHz
v: height 768 start 771 end 777 total 806 clock 70.07Hz
1024x768 (0x4b) 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
832x624 (0x61) 57.284MHz -HSync -VSync
h: width 832 start 864 end 928 total 1152 skew 0 clock 49.73KHz
v: height 624 start 625 end 628 total 667 clock 74.55Hz
800x600 (0x62) 50.000MHz +HSync +VSync
h: width 800 start 856 end 976 total 1040 skew 0 clock 48.08KHz
v: height 600 start 637 end 643 total 666 clock 72.19Hz
800x600 (0x63) 49.500MHz +HSync +VSync
h: width 800 start 816 end 896 total 1056 skew 0 clock 46.88KHz
v: height 600 start 601 end 604 total 625 clock 75.00Hz
800x600 (0x50) 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 (0x51) 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 (0x64) 31.500MHz -HSync -VSync
h: width 640 start 656 end 720 total 840 skew 0 clock 37.50KHz
v: height 480 start 481 end 484 total 500 clock 75.00Hz
640x480 (0x65) 31.500MHz -HSync -VSync
h: width 640 start 664 end 704 total 832 skew 0 clock 37.86KHz
v: height 480 start 489 end 492 total 520 clock 72.81Hz
640x480 (0x66) 30.240MHz -HSync -VSync
h: width 640 start 704 end 768 total 864 skew 0 clock 35.00KHz
v: height 480 start 483 end 486 total 525 clock 66.67Hz
640x480 (0x55) 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
720x400 (0x67) 28.320MHz -HSync +VSync
h: width 720 start 738 end 846 total 900 skew 0 clock 31.47KHz
v: height 400 start 412 end 414 total 449 clock 70.08Hz
DP-1 disconnected (normal left inverted right x axis y axis)
Identifier: 0x44
Timestamp: 5059268
Subpixel: unknown
Clones:
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
HDMI-2 disconnected (normal left inverted right x axis y axis)
Identifier: 0x45
Timestamp: 5059268
Subpixel: unknown
Clones:
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
aspect ratio: Automatic
supported: Automatic, 4:3, 16:9
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
DP-2 disconnected (normal left inverted right x axis y axis)
Identifier: 0x46
Timestamp: 5059268
Subpixel: unknown
Clones:
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
umonitor --load docked --verbose
Connected to server
Loading profile: docked
Done loading values from configuration file
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 3
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 3
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 3
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 3
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 3
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 3
adding disable crtc
Crtc 63 should be disabled? 1
Crtc 64 should be disabled? 1
Disable crtcs here
Disabling this crtc: 63
Change screen size here
Number of profiles:2
dockedFound output that is connected
Starting edid_to_string
Finished edid_to_string
output match, 0
undockedFound output that is connected
Starting edid_to_string
Finished edid_to_string
output match, 0
Found matching profile
Done loading values from configuration file
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 1
Found potential crtc 63. Is it already assigned?
Queing up crtc to load: 63
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 1
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 1
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 1
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 1
Starting edid_to_string
Finished edid_to_string
Num outputs per profile: 1
Crtc 63 should be disabled? 1
Crtc 64 should be disabled? 1
Unknown profile*
---------------------------------
umon.conf
docked :
{
Screen :
{
width = 3360;
height = 1050;
widthMM = 889;
heightMM = 278;
};
Monitors :
{
eDP-1 :
{
EDID = "SEC unknown";
resolution :
{
x = 0;
y = 0;
};
pos :
{
x = 0;
y = 0;
};
};
VGA-1 :
{
EDID = "SAM SyncMaster";
resolution :
{
x = 1680;
y = 1050;
};
pos :
{
x = 1680;
y = 0;
};
};
HDMI-1 :
{
EDID = "SAM SyncMaster";
resolution :
{
x = 1680;
y = 1050;
};
pos :
{
x = 0;
y = 0;
};
primary = 1;
};
};
};
undocked :
{
Screen :
{
width = 1280;
height = 800;
widthMM = 338;
heightMM = 211;
};
Monitors :
{
eDP-1 :
{
EDID = "SEC unknown";
resolution :
{
x = 1280;
y = 800;
};
pos :
{
x = 0;
y = 0;
};
primary = 1;
};
};
};
it seemed to work when i manually load it with that command but the monitors are mirrored instead of dual display
my current method of switching is pressing control-shift-F1 for undocked and control-shift-f2 for docked which just runs 2 seperate scripts with the xrandr commands
but i hope the above helps you
EDIT : added the umon.conf as requested
Last edited by stanna (2017-06-26 07:13:21)
Offline
Stanna,
Oops I forgot to ask for one more thing: could you also post your ~/.config/umon2.conf?
I'm going to sleep now, I'll look more into the verbose output tomorrow morning. Might have to add/improve the debug output to determine what's happening.
Thanks!
Offline
happy hunting mate, i have updated the post to include the umon2.conf data.
Offline
@LeaveAThousand
Your PKGBUILD has some issues which need sorting...
As this is a git package you need to include a pkgver() function.
As you're using an MIT license it needs to be included in the correct location - https://wiki.archlinux.org/index.php/PKGBUILD#license
You should remove all empty variables from your PKGBUILD.
Last edited by Slithery (2017-06-26 16:10:05)
Offline
Hmm...from the conf file I am seeing that at work you don't use the laptop screen, just the two external monitors?
I cannot really tell what's happening from the umonitor program output right now. I will improve the debugging output and ask you to post the new output. Sorry!
Offline
Slithery,
Got it, thanks!
Offline
Correct, I dock and use the 2 monitors over the laptop LCD. If the monitors are connected to the dock instead of directly to the laptop does that change how your app works?
Offline
Stanna,
If the monitors are connected to the dock it shouldn't change how my app works. Just to let you know of my progress, I have spotted a bug that I will fix. However, fixing this bug probably will not fix the underlying problem that you are experiencing. I will improve debugging and then get back to you!
Offline
No problem. Happy to help test any updates apps for you and provide any other I formation required.
Offline
Stanna,
Can you update your umonitor and post the verbose output in the same scenario as I previously mentioned? Thanks.
Offline
@LeaveAThousand
umonitor --load docked --verbose
Connected to server
Loading profile: docked
Done loading values from configuration file
Loading profile docked
Num outputs per profile docked: 3
Trying to find configuration file output that matches SEC unknown
Found output in configuration file that matches SEC unknown
Trying match up the configuration resolution with the mode id
No need to find mode id, just let this output be disabled later
Trying to find configuration file output that matches SAM SyncMaster
Found output in configuration file that matches SAM SyncMaster
Trying match up the configuration resolution with the mode id
Found matching mode id: 90
Found potential crtc 63. Is it already assigned?
Queing up crtc to load: 63
Crtc settings: x:1680, y:0, is_primary: 0, mode_id: 90, output: VGA-1
Found output in configuration file that matches SAM SyncMaster
Trying match up the configuration resolution with the mode id
Found matching mode id: 90
Found potential crtc 63. Is it already assigned?
Crtc 63 already assigned!
Found potential crtc 64. Is it already assigned?
Queing up crtc to load: 64
Crtc settings: x:0, y:0, is_primary: 1, mode_id: 90, output: VGA-1
Trying to find configuration file output that matches SAM SyncMaster
Found output in configuration file that matches SAM SyncMaster
Trying match up the configuration resolution with the mode id
Found matching mode id: 90
Found potential crtc 63. Is it already assigned?
Crtc 63 already assigned!
Found potential crtc 64. Is it already assigned?
Crtc 64 already assigned!
Offline
Stanna,
Thanks for the debug output, I believe I have fixed the bug. Could you try again and see if it works? If not, could you post the debug output again?
Offline
ill let you sweat it out for a few days - wont be in the office until monday
Offline
@LeaveAThousand, below is the new logs. This time i started docked and ran the command then undocked and waited a few seconds then docked again and hopefully the below helps - still didnt work btw.
[stanna@motion ~]$ umonitor --listen --verbose
Connected to server
Autoloading
Number of profiles:2
Trying to find which profile matches current setup
Looping over profile docked
output eDP-1 is connected
output VGA-1 is connected
output HDMI-1 is connected
Looping over profile undocked
output eDP-1 is connected
output VGA-1 is connected
output HDMI-1 is connected
Unknown profile*
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 0
Time of event: 13907020
Screen change event detected
Now I should load
Number of profiles:2
Trying to find which profile matches current setup
Looping over profile docked
output eDP-1 is connected
Looping over profile undocked
output eDP-1 is connected
Profile undocked matches current setup
Done loading values from configuration file
Loading profile undocked
Num outputs per profile undocked: 1
Trying to find matching setting for output: eDP-1 edid: SEC unknown
Found output in configuration file that matches SEC unknown
Trying match up the configuration resolution with the mode id
Found matching mode id: 72
Found potential crtc 63. Is it already assigned?
Queing up crtc to load: 63
Crtc settings: x:0, y:0, is_primary: 1, mode_id: 72, output: eDP-1
Change screen size here
Enable crtc 63
*
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 13924877
Time of event: 13907020
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 13924877
Time of event: 13907020
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 13924877
Time of event: 13924326
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 13924877
Time of event: 13924348
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 13924877
Time of event: 13924348
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 13924877
Time of event: 13924877
Screen change event detected
Now I should load
Number of profiles:2
Trying to find which profile matches current setup
Looping over profile docked
output eDP-1 is connected
output VGA-1 is connected
output HDMI-1 is connected
Looping over profile undocked
output eDP-1 is connected
output VGA-1 is connected
output HDMI-1 is connected
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 13924877
Time of event: 13924877
Screen change event detected
Now I should load
Number of profiles:2
Trying to find which profile matches current setup
Looping over profile docked
output eDP-1 is connected
output VGA-1 is connected
output HDMI-1 is connected
Looping over profile undocked
output eDP-1 is connected
output VGA-1 is connected
output HDMI-1 is connected
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 13924877
Time of event: 13924877
Screen change event detected
Now I should load
Number of profiles:2
Trying to find which profile matches current setup
Looping over profile docked
output eDP-1 is connected
output VGA-1 is connected
output HDMI-1 is connected
Looping over profile undocked
output eDP-1 is connected
output VGA-1 is connected
output HDMI-1 is connected
---------------------------------
Waiting for event
Event type: 34
screen change masked: 0
output change masked: 0
Waiting for event
Event type: 34
screen change masked: 0
output change masked: 0
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 13924877
Time of event: 13924877
Screen change event detected
Now I should load
Number of profiles:2
Trying to find which profile matches current setup
Looping over profile docked
output eDP-1 is connected
output VGA-1 is connected
output HDMI-1 is connected
Looping over profile undocked
output eDP-1 is connected
output VGA-1 is connected
output HDMI-1 is connected
---------------------------------
^C
Offline
Stanna,
Thanks for the new logs. From the logs I see 3 things happening:
1. There is another bug with detecting which profile to load based on the current monitor configuration. I believe I have fixed this bug now. It is similar to the bug I fixed before.
2. I am unsure if the program worked when you undocked. I say that because I expect to see crtc 64 being disabled, but it looks like the program is not touching that crtc. This could either be a bug in my program or indicate my lack of understanding of how X11 works. In any case, I have improved the debugging output so that if you run it again, I should be able to determine the cause.
3. The program triggered many times after you docked, but the program should only trigger once. I am not sure how to fix the root cause of this. It seems like the X11 server is sending multiple screen change events with the same timestamp. Sometimes I see it happening, and other times I do not. For example, the program only triggered once when you undocked. This should not affect the managing of monitors, though. It will only cause redundant execution of code.
Sorry for the program not working so many times! Could you post the logs after trying it again?
Offline
hey it worked that time, output below
[stanna@motion ~]$ umonitor --listen --verbose
Connected to server
Autoloading
Number of profiles: 2
Trying to find which profile matches current setup
Current connected outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster) HDMI-1 (SAM SyncMaster)
Looping over profile docked
Configuration outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster) HDMI-1 (SAM SyncMaster)
Profile docked matches current setup
Done loading values from configuration file
Loading profile docked
Num outputs per profile docked: 3
Trying to find matching setting for eDP-1 (SEC unknown)
Found output in configuration file that matches eDP-1 (SEC unknown)
Trying match up the configuration resolution with the mode id
No need to find mode id, just let this output be disabled later
Trying to find matching setting for VGA-1 (SAM SyncMaster)
Found output in configuration file that matches VGA-1 (SAM SyncMaster)
Trying match up the configuration resolution with the mode id
Found matching mode id: 299
Found potential crtc 63. Is it already assigned?
Queing up crtc to load: 63
Crtc settings: x:1680, y:0, is_primary: 0, mode_id: 299, output: VGA-1
Trying to find matching setting for HDMI-1 (SAM SyncMaster)
Found output in configuration file that matches HDMI-1 (SAM SyncMaster)
Trying match up the configuration resolution with the mode id
Found matching mode id: 299
Found potential crtc 63. Is it already assigned?
Crtc 63 already assigned!
Found potential crtc 64. Is it already assigned?
Queing up crtc to load: 64
Crtc settings: x:0, y:0, is_primary: 1, mode_id: 299, output: HDMI-1
Does any of queued crtc match currently loaded crtc 63?
Crtc: x:0, y:0, mode_id: 299, output: HDMI-1
Queued crtc 64 matches! Remove duplicate crtc 64 from ll
Does any of queued crtc match currently loaded crtc 64?
Crtc: x:1680, y:0, mode_id: 299, output: VGA-1
Queued crtc 63 matches! Remove duplicate crtc 63 from ll
No crtcs to disable or enable. Profile docked is currently active
*
Looping over profile undocked
Configuration outputs: eDP-1 (SEC unknown)
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 0
Time of event: 4530938
Screen change event detected
Now I should load
Number of profiles: 2
Trying to find which profile matches current setup
Current connected outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster)
Looping over profile docked
Configuration outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster) HDMI-1 (SAM SyncMaster)
Looping over profile undocked
Configuration outputs: eDP-1 (SEC unknown)
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 0
Time of event: 4530938
Screen change event detected
Now I should load
Number of profiles: 2
Trying to find which profile matches current setup
Current connected outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster)
Looping over profile docked
Configuration outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster) HDMI-1 (SAM SyncMaster)
Looping over profile undocked
Configuration outputs: eDP-1 (SEC unknown)
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 0
Time of event: 9409649
Screen change event detected
Now I should load
Number of profiles: 2
Trying to find which profile matches current setup
Current connected outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster)
Looping over profile docked
Configuration outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster) HDMI-1 (SAM SyncMaster)
Looping over profile undocked
Configuration outputs: eDP-1 (SEC unknown)
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 0
Time of event: 9409757
Screen change event detected
Now I should load
Number of profiles: 2
Trying to find which profile matches current setup
Current connected outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster)
Looping over profile docked
Configuration outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster) HDMI-1 (SAM SyncMaster)
Looping over profile undocked
Configuration outputs: eDP-1 (SEC unknown)
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 0
Time of event: 9409757
Screen change event detected
Now I should load
Number of profiles: 2
Trying to find which profile matches current setup
Current connected outputs: eDP-1 (SEC unknown)
Looping over profile docked
Configuration outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster) HDMI-1 (SAM SyncMaster)
Looping over profile undocked
Configuration outputs: eDP-1 (SEC unknown)
Profile undocked matches current setup
Done loading values from configuration file
Loading profile undocked
Num outputs per profile undocked: 1
Trying to find matching setting for eDP-1 (SEC unknown)
Found output in configuration file that matches eDP-1 (SEC unknown)
Trying match up the configuration resolution with the mode id
Found matching mode id: 72
Found potential crtc 63. Is it already assigned?
Queing up crtc to load: 63
Crtc settings: x:0, y:0, is_primary: 1, mode_id: 72, output: eDP-1
Does any of queued crtc match currently loaded crtc 63?
Crtc: x:0, y:0, mode_id: 0, output: eDP-1
Does any of queued crtc match currently loaded crtc 64?
Crtc: x:1680, y:0, mode_id: 0, output: eDP-1
Change screen size here
Enable crtc 63
*
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 9414476
Time of event: 9409757
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 9414476
Time of event: 9409757
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 9414476
Time of event: 9409757
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 9414476
Time of event: 9414476
Screen change event detected
Now I should load
Number of profiles: 2
Trying to find which profile matches current setup
Current connected outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster) HDMI-1 (SAM SyncMaster)
Looping over profile docked
Configuration outputs: eDP-1 (SEC unknown) VGA-1 (SAM SyncMaster) HDMI-1 (SAM SyncMaster)
Profile docked matches current setup
Done loading values from configuration file
Loading profile docked
Num outputs per profile docked: 3
Trying to find matching setting for eDP-1 (SEC unknown)
Found output in configuration file that matches eDP-1 (SEC unknown)
Trying match up the configuration resolution with the mode id
No need to find mode id, just let this output be disabled later
Trying to find matching setting for VGA-1 (SAM SyncMaster)
Found output in configuration file that matches VGA-1 (SAM SyncMaster)
Trying match up the configuration resolution with the mode id
Found matching mode id: 299
Found potential crtc 63. Is it already assigned?
Queing up crtc to load: 63
Crtc settings: x:1680, y:0, is_primary: 0, mode_id: 299, output: VGA-1
Trying to find matching setting for HDMI-1 (SAM SyncMaster)
Found output in configuration file that matches HDMI-1 (SAM SyncMaster)
Trying match up the configuration resolution with the mode id
Found matching mode id: 299
Found potential crtc 63. Is it already assigned?
Crtc 63 already assigned!
Found potential crtc 64. Is it already assigned?
Queing up crtc to load: 64
Crtc settings: x:0, y:0, is_primary: 1, mode_id: 299, output: HDMI-1
Does any of queued crtc match currently loaded crtc 63?
Crtc: x:0, y:0, mode_id: 72, output: eDP-1
Queing disable crtc 63
Does any of queued crtc match currently loaded crtc 64?
Crtc: x:1680, y:0, mode_id: 0, output: eDP-1
Disabling this crtc: 63
Change screen size here
Enable crtc 64
Enable crtc 63
*
Looping over profile undocked
Configuration outputs: eDP-1 (SEC unknown)
---------------------------------
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 9429816
Time of event: 9414476
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 9429816
Time of event: 9414476
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 9429816
Time of event: 9426745
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 9429816
Time of event: 9426745
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 9429816
Time of event: 9429105
Screen change event detected
Waiting for event
Event type: 89
screen change masked: 1
output change masked: 0
Last time of configuration: 9429816
Time of event: 9429105
Screen change event detected
Waiting for event
Event type: 34
screen change masked: 0
output change masked: 0
Waiting for event
Event type: 34
screen change masked: 0
output change masked: 0
Waiting for event
^C
Offline
Yes!!! Everything looks good from the logs. The only thing that is slightly unexpected is when you undock, the X11 server detects that the HDMI disconnects first, and then the VGA. The program sees your laptop screen and the VGA outputs connected, but then does not finding a matching profile. I don't think that's such a big deal though.
Let me know if you have any feature requests / improvements to the program
Offline
Wow... I've been waiting for something like this for years!
Moving between monitor-setups (esp. with a Notebook, ...) has long been one the remaining situations where Linux embarrassingly fell back behind Windows.
Thanks for making a serious attempt to change that!
Will give feedback as I try it out and learn more.
\Claus
Offline
No problem, I felt the same way
Offline
while this was great on my very old laptop, it does not work on my new laptop.
Offline
Alright can you post the output of the program when you try to load the profile, using the verbose flag?
Offline