xpra icon
Bug tracker and wiki

Opened 3 months ago

Closed 8 weeks ago

#1545 closed defect (worksforme)

Seemingly random DPI problem

Reported by: Thomas Esposito Owned by: Thomas Esposito
Priority: major Milestone: 2.1
Component: client Version: 1.0.x
Keywords: Cc:

Description

I am on RHEL 6.6 (using the Centos 6.6 RPMs). I am currently on the latest supported version: 1.0.6. I did not start experiencing this issue until 1.0.5 (I think).

Sometimes, when I reconnect to a running session, applications that use fontconfig fonts (e.g. gnome-terminal) render fonts MUCH smaller than they would normally, as if the DPI setting has been dramatically reduced. After disconnecting and reconnecting, sometimes multiple times, the issue is resolved.

FWIW, I'm using the latest client version 2.0.2 on Windows 7. I suppose the issue could be related to that.

I doesn't appear that 2.x is supported on Centos 6.6, otherwise I would be using it.

Attachments (5)

xpra_debug_bad.txt (3.8 KB) - added by Thomas Esposito 3 months ago.
output when DPI is bad
xpra_debug_good.txt (3.8 KB) - added by Thomas Esposito 3 months ago.
output when DPI is good
GTK_info.txt (3.3 KB) - added by Thomas Esposito 3 months ago.
NativeGUI_info.txt (2.4 KB) - added by Thomas Esposito 3 months ago.
server.log (112.9 KB) - added by Thomas Esposito 3 months ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 3 months ago by Antoine Martin

Owner: changed from Antoine Martin to Thomas Esposito

Please attach client and server logs with the "-d screen,xsettings" debug switch.

And try to capture some of the debug information as per wiki/DPI comparing when the problem occurs and when it does not.
ie:

xrdb -query -all | grep dpi
xdpyinfo | grep dots
xrandr

client output, etc.

Changed 3 months ago by Thomas Esposito

Attachment: xpra_debug_bad.txt added

output when DPI is bad

Changed 3 months ago by Thomas Esposito

Attachment: xpra_debug_good.txt added

output when DPI is good

comment:2 Changed 3 months ago by Thomas Esposito

It looks like the fontconfig DPI value is cut in half (from 96 to 48) when the bug manifests. Interestingly, even when fonts look correct (i.e. the "good" case), the horizontal DPI value reported by xdpyinfo is incorrect (i.e. 48 instead of 96).

comment:3 Changed 3 months ago by Antoine Martin

Please post:

  • the full client output
  • "xpra info" from the server
  • "GTK_info.exe" output
  • "NativeGUI_info.exe" output
  • the server log running with "-d xsettings,screen"

FWIW, I'm using the latest client version 2.0.2 on Windows 7. I suppose the issue could be related to that.
I doesn't appear that 2.x is supported on Centos 6.6, otherwise I would be using it.

2.x clients connecting to a 1.x server should work just fine, for more information, see wiki/Platforms and wiki/Versions.

Changed 3 months ago by Thomas Esposito

Attachment: GTK_info.txt added

Changed 3 months ago by Thomas Esposito

Attachment: NativeGUI_info.txt added

comment:4 Changed 3 months ago by Thomas Esposito

I attached files containing the information that you asked for. Ignore server.2.log which was added in error. I'm not sure how to remove attachments.

Changed 3 months ago by Thomas Esposito

Attachment: server.log added

comment:5 Changed 3 months ago by Thomas Esposito

I re-uploaded server.log with a new version with more interesting output. In this case, shortly before dumping the log, I returned to my PC after being locked for a while and discovered that my DPI had changed WITHOUT reconnecting. You can see evidence of this in the log.

comment:6 Changed 3 months ago by Antoine Martin

Milestone: 2.1
Owner: changed from Thomas Esposito to Antoine Martin
Status: newassigned

I'm not sure how to remove attachments.

Just click on the attachment link and select "Delete Attachment" at the bottom of the attachment view page. (I've done it for you)

I will take a look at the data as soon as I can.

comment:7 Changed 2 months ago by Antoine Martin

Owner: changed from Antoine Martin to Thomas Esposito
Status: assignednew

From the server log:

  • initial dpi is unset (good): init_all_server_settings() dpi=0, default_dpi=0
  • after the client handshake, we set the client's dpi: overrides: dpi=96, double click time=550, double click distance=(4, 4)
  • Warning: xxhash python bindings not found - not sure how that is possible, "python2-xxhash" is a dependency of the xpra package which you are missing.
  • at 14:20:03 the client sends an updated screen definition (with the same size), that happens sometimes (screensaver, etc) - we re-apply the xsettings and the DPI is still at 96
  • 14:22:51 a new client connection
  • 14:54:34 another spurious screen size change - this is the one where the DPI ends up at 48, and just before that we can see:
    14:54:34,145 client 2: failed to get xdpi: argument 2: <type 'exceptions.OverflowError'>: long int too long to convert
    

So we failed to get the xdpi... and that value must therefore be invalid. Then we take the average of 0 and 96... and we get 48. This bug is only occurring with the 2.x clients because of the move from pywin32 to ctypes (#678).


Fixes:

  • r16361: the overflow fix
  • r16362: don't take the average if one of the values is invalid!

(these updates will be applied to the 1.x and 2.x branches)
You can find beta 2.1 builds with these fixes (and more) here: http://xpra.org/beta. Please close if that works for you.

Many thanks for reporting this bug with the server log!

comment:8 Changed 8 weeks ago by Antoine Martin

Resolution: worksforme
Status: newclosed

Feel free to re-open if you still have problems.

Note: See TracTickets for help on using tickets.