Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seemingly random DPI problem #1545

Closed
totaam opened this issue Jun 13, 2017 · 20 comments
Closed

Seemingly random DPI problem #1545

totaam opened this issue Jun 13, 2017 · 20 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Jun 13, 2017

Issue migrated from trac ticket # 1545

component: client | priority: major | resolution: worksforme

2017-06-13 15:51:35: thomase00 created the issue


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.

@totaam
Copy link
Collaborator Author

totaam commented Jun 13, 2017

2017-06-13 16:03:48: antoine changed owner from antoine to Thomas Esposito

@totaam
Copy link
Collaborator Author

totaam commented Jun 13, 2017

2017-06-13 16:03:48: antoine commented


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

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

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

client output, etc.

@totaam
Copy link
Collaborator Author

totaam commented Jun 13, 2017

2017-06-13 21:32:01: thomase00 uploaded file xpra_debug_bad.txt (3.8 KiB)

output when DPI is bad

@totaam
Copy link
Collaborator Author

totaam commented Jun 13, 2017

2017-06-13 21:32:16: thomase00 uploaded file xpra_debug_good.txt (3.8 KiB)

output when DPI is good

@totaam
Copy link
Collaborator Author

totaam commented Jun 13, 2017

2017-06-13 21:33:57: thomase00 commented


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).

@totaam
Copy link
Collaborator Author

totaam commented Jun 14, 2017

2017-06-14 13:47:50: antoine commented


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 [Platforms] and [Versions](../wiki/Platforms] and [../wiki/Versions) and [Platforms] and [Versions](../wiki/Platforms] and [../wiki/Versions).

@totaam
Copy link
Collaborator Author

totaam commented Jun 27, 2017

2017-06-27 22:02:56: thomase00 uploaded file GTK_info.txt (3.3 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Jun 27, 2017

2017-06-27 22:03:11: thomase00 uploaded file NativeGUI_info.txt (2.4 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Jun 27, 2017

2017-06-27 22:05:07: thomase00 commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jun 27, 2017

2017-06-27 22:36:12: thomase00 uploaded file server.log (112.9 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Jun 27, 2017

2017-06-27 22:37:46: thomase00 commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jun 28, 2017

2017-06-28 10:41:44: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Jun 28, 2017

2017-06-28 10:41:44: antoine changed owner from Thomas Esposito to antoine

@totaam
Copy link
Collaborator Author

totaam commented Jun 28, 2017

2017-06-28 10:41:44: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2017

2017-07-16 12:40:28: antoine changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2017

2017-07-16 12:40:28: antoine changed owner from antoine to Thomas Esposito

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2017

2017-07-16 12:40:28: antoine commented


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!

@totaam
Copy link
Collaborator Author

totaam commented Jul 25, 2017

2017-07-25 17:54:54: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Jul 25, 2017

2017-07-25 17:54:54: antoine set resolution to worksforme

@totaam
Copy link
Collaborator Author

totaam commented Jul 25, 2017

2017-07-25 17:54:54: antoine commented


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

@totaam totaam closed this as completed Jul 25, 2017
@totaam totaam added the v1.0.x label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant