From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-a1p-077721.sys.comcast.net (resqmta-a1p-077721.sys.comcast.net [IPv6:2001:558:fd01:2bb4::a]) by sourceware.org (Postfix) with ESMTPS id 774333858D35 for ; Thu, 20 Jan 2022 01:01:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 774333858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=comcast.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=comcast.net Received: from resomta-a1p-077252.sys.comcast.net ([96.103.145.241]) by resqmta-a1p-077721.sys.comcast.net with ESMTP id AJo3n6a26JIhgALpbntnGO; Thu, 20 Jan 2022 01:01:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1642640499; bh=5yQD6/POyzw8RANRqkO2G2s8/S+iQrlZ8mdMGl2O5ek=; h=Received:Received:Message-ID:Date:MIME-Version:Subject:To:From: Content-Type; b=1IqI3AP+kMR6ORSmXjqIt5RzBOOQ9NxFF7V2ZzHyNeuHrCLv5Omzg97QBTtg+IzIm lR3uYKCEVDDfu9V9fgSXlSko9OtkYwaAQpoY+uCOo+snciTxTMOPv9Hn/W1ex5thy/ Moq934jOv93HDsEmhRJIEK+ykWN56bhByJ9sBeie/H1v9v59Epy3if0B4mWzZg6hfL 0OGy6dlmDJHGR5UR9Z9wws4PC+pSyRCIHqPxwDHJEkTZI9Cnu5IEBwrIegCxjt+tb0 T2+VXdxLL3KKN0AXsxoen43MAeHjUjce04snTY26GUwpSGpsl/sRjDRAcYK7rPn6V2 1eywMCS1wz/RA== Received: from [IPV6:2601:541:c103:bf60:58a0:1986:734d:e908] ([IPv6:2601:541:c103:bf60:58a0:1986:734d:e908]) by resomta-a1p-077252.sys.comcast.net with ESMTPSA id ALpEnzSimUXVDALpFntNNR; Thu, 20 Jan 2022 01:01:17 +0000 X-Xfinity-VMeta: sc=-100.00;st=legit Message-ID: Date: Wed, 19 Jan 2022 20:01:16 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Cygwin/X with Win10 display scaling corrupting font display of typed characters - Issue identified Content-Language: en-US To: The Cygwin Mailing List References: <02b8ba82-0a40-e9ea-c4e6-fe201097d957@comcast.net> <4f4d8d34-3e30-82fe-4be2-2926da2c1c6a@dronecode.org.uk> From: Ken Whitesell In-Reply-To: <4f4d8d34-3e30-82fe-4be2-2926da2c1c6a@dronecode.org.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, JMQ_SPF_NEUTRAL, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2022 01:01:42 -0000 On 1/19/2022 2:28 PM, Jon Turney wrote: > On 19/01/2022 00:02, Ken Whitesell wrote: >> On 1/17/2022 1:29 PM, Ken Whitesell wrote: >>> >>> Is there a known solution for this? (Or is it known that there is no >>> solution?) > > Thanks for reporting this. > >>> Any guidance, pointers, suggestions of avenues for further research, >>> or other information, will all be greatly appreciated. >>> >> After more research and experimentation, it appears to be related to >> one of xorg-server, xorg-server-common, or xorg-server-xorg. >> >> Installing the older version 1.20.12-1 of these packages allows the >> windows to be moved between monitors without any issues. Upgrading to >> the current version 21.1.3-1 creates the problems. I'm able to >> replicate this behavior on two different laptops with two different >> external monitors. > > It seems likely that this is an unintended effect of changes in > xorg-server 21.1.0-1, trying to fix problems in this area (See [1]) Thanks for the references. I've read all the messages in the thread - I was particularly intrigued by this comment: wrt the font scaling issue, looking at the source, it seems that we don't re-consider the display dpi after a WM_DISPLAYCHANGE message, but keep on using the value determined at startup. This is probably a bug. I'm curious enough to want to take a look at the code, but I've got no belief that I'm going to be able to find an answer. (I'm *not* a C++ programmer. I can read it and write a little of it, but that's about it.) I was going to start by comparing the last known-working version to the first known-non-working version, but given that it's a major release change, that's not likely going to be a useful approach. (I'm way out of my league here. It's probably going to take me a long time just to get to the point where I can even begin to explore this.) > > You might find that starting the server and specifying a fixed dpi > value with the '-dpi' option might workaround this. > > [1] > https://cygwin.com/pipermail/cygwin-announce/2021-November/010286.html > I tried three different DPI settings, each one confirmed by verifying the setting as reported in the XWin.0.log file. Example: [252575.109] winUpdateDpi - Using fixed 96 DPI No setting prevented the issue from appearing. >> If I change the scaling from 125% to 100% on the laptop's display, >> the problem appears until I restart Cygwin/X. Restarting Cygwin/X >> shows it displaying properly, until I change the scaling again. > > I could only reproduce this problem with mis-rendering when changing > the scaling on the secondary monitor. Wow, I did a really poor job of writing that. I'm sorry. For clarity, just in case you were unable to interpret what I meant by what I wrote - At start: Laptop scaling set at 125%, second monitor at 100%. Mis-rendering occurs at start, on the second monitor only. If I change the scaling on the laptop, while the current instance of XWin is running - the same mis-rendering now occurs on the laptop. Interestingly enough, if I change the laptop from 125% to 100%, the tops are clipped as previously reported. But if I change the scaling from 125% to 150%, then the bottoms are clipped. (It kinda makes sense from what you've written.) If I then stop and restart XWin after having reset the scaling such that both monitors have the same setting, then the problem doesn't appear.