/srv/irclogs.ubuntu.com/2019/09/17/#xubuntu-devel.txt

=== brainwash_ is now known as brainwash
bluesabreUnit193: would you be interested in sponsoring catfish 1.4.10 into debian?09:14
Unit193Sure, anything else to add?09:15
Unit193(It's set to unreleased)09:15
bluesabreUnit193: nope, should be ready to go otherwise09:18
Unit193OK, please commit and sign (perhaps after the ACK).  I uploaded.09:21
bluesabreUnit193: much appreciated!09:34
ali1234ochosi: i have 4.14.1 and it behaves exactly the same17:52
ali1234also still got the thing where only two of my monitors go to sleep17:55
ali1234if i do "xset dpms force off" then they all turn off17:56
ali1234i think this rules out cable problems17:56
ali1234although i notice there are three different levels: blank, sleep, off17:57
ali1234hmm... i set power saving like this https://imgur.com/yf7ppYE.png18:06
ali1234after 1 minute all monitors turn off, then 1 minute later one of them turns back on, then 1 minute later it turns off again18:06
ali1234i tried setting each setting to 1 minute and the others to never, in all three cases all monitors switched off18:14
ali1234it seems like whatever order the three settings are put in, the second one always causes 1 monitor to turn on18:17
ali1234i tried swapping the outputs around and the same monitor still turns on so maybe it is the cable18:18
ali1234"xset dpms force off && sleep 15s && xset dpms force off" does not make one monitor turn on though18:20
ali1234hmm power manager is just calling DPMSSetTimeouts so this cannot be an xfce bug18:32
ali1234yeah i reproduced it with just xset18:39
ali1234i read the product descriptions of these cables really carefully and it turns out the cable that works is bi-directional, the one that doesn't work properly is not19:29
ali1234i dont see why that would affect anything but i guess the not-bidirectional one is just rubbish19:29
ali1234okay, on to the other problem... if i kill xfsettings then my monitors dont all turn off when i unplug one, and it turns on again when i plug it back in21:08
ali1234and honestly this is how i want it to behave21:08
ali1234also i found that this problem only happens with 3 or more monitors so i suspect it actually is a bug21:09
ali1234ah, i think i found the problem21:15
ali1234if i unplug my middle monitor it doesn't happen21:15
ali1234he other two are identical21:15
ali1234how do i get xfsettingsd to print the debugs?21:21
ali1234ah i have to set an environment variable... okay21:26
ali1234hmm okay so xfsettngsd is going bananas - whenever the monitors change it tries to reconfigure every monitor about 4 times21:30
ochosiali1234: ok, so i tried to read carefully, but what was the remaining problem? something after killing xfsettingsd?22:38
ali1234the remaining problem is that when i unplug a monitor, xfsettings turns off all my monitors, permanently22:39
ochosithat is very curious22:39
ochosii think i've never seen that at all so far22:39
ochosiit has an extra check to never disable *all* monitors22:39
ochosiso always at least one should remain, although that check may only be valid for laptops - would have to check in the code22:40
ali1234yeah none of that is what happens22:41
ochosijust a debug idea, have you tried to save a profile for the two remaining monitors?22:41
ochosithat way it should know what to do when you unplug22:41
ali1234what happens is it gets confused about what monitors are connected, then goes on a rampage disabling things, trying to re-enable things that no longer exist, and eventually just gives up when it has disabled everything22:41
ali1234this is the debug output after i unplugged one monitor: http://paste.ubuntu.com/p/mp36hM584M/22:42
ali1234line 70 is where i plugged it back in, due to having a saved profile it eventually managed to restore the settings22:44
ochosiand saving a profile for 2 monitors?22:48
ochosiand yeah, urgh, doesnt look nice. i wonder though why it would fail to configure your monitors22:48
ali1234well it thinks the screen is 1280x176, which is too small for any of the monitors to fit on22:51
ochosithat's what randr is telling it though22:53
ali1234i doubt that22:53
ochosiwell it surely doesn't invent the number :)22:53
ali1234right, it didn't. 176 is the vertical position of some of the monitors, not the height22:53
ali1234so somewhere there is a foo->y instead of foo->height or something22:54
ochosiindeed helper->height seems to be off in your case22:58
ochosiok, so your analysis seems to match the code to some extent23:01
ochosiit checks whether if any crtcs won't fit into the new screen and as the height is fairly low, it ends up disabling them all23:02
ochosiand in xfce_displays_helper_set_screen_size your height seems to actually be helper->y23:03
ochosiali1234: would you mind adding this debug statement? http://dpaste.com/1F7QWWA23:06
ochosijust to see if it all goes wrong in line 1267 of xfsettingsd/displays.c23:07
ali1234building it23:08
ochosihelper->height should be set 0 before this function is called23:09
ali1234hang on let me log in to irc from my laptop23:09
ochosithat's why i thought we probably don't need that value (and that's also in part what i don't understand about line 1267... cause 0 can hardly ever be MAX)23:09
ochosibut then again, that code wasn't written by me and i have a hard time understanding some parts...23:11
ali1234size=433x3200, pos=1200x128023:14
ali1234wait23:15
ali1234you messed up the printf :)23:15
ali1234you have more arguments than formats23:15
ochosiah sure :)23:17
ochosii didn't test, sorry23:17
ali1234http://paste.ubuntu.com/p/n2YgbQgZHs/23:17
ochosiluckily that's easily fixable23:18
ali1234thats startup, before i do anything23:18
ali1234the numbers are right there23:18
ochositotal screen size looks ok there23:18
ali1234http://paste.ubuntu.com/p/y9XHXsQJFZ/ then after unplug, the numbers are very wrong23:20
ochosii guess you can try to further debug line 1267 which (wrongly?) calculates height in your case23:22
ochosithe problem is without being able to reproduce it's hard(er)23:22
ali1234okay i found something23:37
ali1234scalex and scaley are 023:37
ali1234so width * scale = 023:38
ali1234so helper->width becomes min(0, crtc->x)23:39
ali1234i think i see the problem23:43
ali1234when it starts up it loads all the properties from xfconf, including the scale23:43
ali1234when it gets a change event it rebuilds the randr cache but does not set the scale on the new objects23:44
ali1234if you have only onemonitor then it must be at pos=0,023:45
ali1234this results in helper thinking the screen is 0x023:45
ali1234there is probably a sanity check for this23:45
ali1234however if you have twomonitors then one of them is not at 0,0, the position of this monitor ends up being how big helper thinks the screen is23:45
ali1234this confuses it23:45
ali1234when there is a matching profile itgets the scale from the profile23:50
ali1234initializing the scale to 1.0 prevents it from doing weird stuff23:52
ochosisounds like a simple patch23:54
ali1234yeah. not sure if it is entirely correct though23:54
ali1234i'll make a bug report with the details23:54
ali1234when i get out from under my desk23:54
ochosiin what sense? that you set the scale to 1.0 initially?23:54
ali1234brb23:55
ochosisure23:55
ali1234so the problem is that https://github.com/xfce-mirror/xfce4-settings/blob/master/xfsettingsd/displays.c#L1266 scalex = 023:56
ali1234scalex is initialized here https://github.com/xfce-mirror/xfce4-settings/blob/master/xfsettingsd/displays.c#L84923:56
ali1234that code only runs when loading a profile23:57
ali1234the rest of the crtc is initialized here https://github.com/xfce-mirror/xfce4-settings/blob/master/xfsettingsd/displays.c#L111323:57
ali1234but not the scale23:57
ali1234so if there is no matching profile, you get scale = 023:57
ali1234that messes up all the calculations23:58
ali1234so the question is should list_crtcs initialize the scale to 123:58
ali1234or should it try to fetch the real scale, and if so, from where?23:58
ali1234now i write all this in a bug report :)23:58

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!