yubikey-personalization-gui icon indicating copy to clipboard operation
yubikey-personalization-gui copied to clipboard

GUI is not HiDPI aware

Open colemickens opened this issue 9 years ago • 16 comments

Are there any workarounds for this? See screenshot. I have to squint quite hard to make things out.

https://i.imgur.com/xgqv54K.png

Thanks!

colemickens avatar Dec 17 '15 03:12 colemickens

I see colemickens beat me to it, but I see no response so far and the lack of 4k / HiDPI support is not tolerable! It is really, really hard to read anything! I'm using Gnome Shell and Linux with 4k display.

Just compare the normal size text (in the browser) and what Yubikey personalization app shows! On 4k display the text in the browser looks with normal size, while the text in the Yubikey personalization looks unreadably tiny!!

yubikey

juliandroid avatar Mar 26 '16 22:03 juliandroid

same story here, version 3.1.24 is unusable on HiDPI display.

AlexeyGusev avatar Sep 28 '16 15:09 AlexeyGusev

So unfortunately this tool is built with pixel sizes, so fixing this properly might take some work.

With QT 5.6 it should be possible to get the application to auto scale (like what happens on a mac) by setting the environment variable QT_AUTO_SCREEN_SCALE_FACTOR=1 when starting.

klali avatar Sep 29 '16 07:09 klali

Comment regarding QT 5.6 scaling is correct and this is what I am doing now; unfortunately, QT_AUTO_SCREEN_SCALE_FACTOR only takes integers, and value 2 is too big for my screen whilst 1 is too small.

AlexeyGusev avatar Sep 29 '16 07:09 AlexeyGusev

http://doc.qt.io/qt-5/highdpi.html#high-dpi-support-in-qt details some different ways this can be controlled. Not sure how much it helps, but what I can offer in the short run.

klali avatar Sep 29 '16 07:09 klali

Workaround for the yubico released windows binaries is setting environment variable QT_DEVICE_PIXEL_RATIO to auto.

crrodriguez avatar Sep 29 '16 17:09 crrodriguez

Commenting to report same issue on Surface Pro. GUI is unusable. Is there any way to change the variable mentioned above without downloading QT studio, source code, and compiling?

Edit: adding " -platform windows:dpiawareness=0" to the end of the "Target" field of the shortcut properties seems to have fixed the issue on my SP4 running W10. It does look somewhat blurry, however.

gingerbreadassassin avatar Oct 29 '16 23:10 gingerbreadassassin

The issue exists as well on Ubuntu 16.04.1 Xenial LTS with a 3200x1800 @ 13.3" monitor (276 DPI).

In the Ubuntu settings, the ratio is set to 1.75 (under the Ajuster les menus et barres de titre label): http://imgur.com/4UStDfi

Example with the GitHub issue and the Google search homepage for comparision: http://imgur.com/epBbp9S

Using Yubico Personalization Tool v. 3.1.23 (the one provided in the official Ubuntu repo)

nagromc avatar Dec 28 '16 18:12 nagromc

Same problem with Fedora 27 on XPS 13 HiDPI laptop. Super tiny GUI

emelbardis avatar Feb 07 '18 05:02 emelbardis

On Ubuntu 18.04 I found that using

QT_DEVICE_PIXEL_RATIO=auto

makes the application window taller than the available pixels, and as the window isn't resizeable the controls in the off-screen area are unreachable. It also reports as being deprecated

Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
   QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
   QT_SCREEN_SCALE_FACTORS to set per-screen factors.
   QT_SCALE_FACTOR to set the application global scale factor.

I then tried

QT_AUTO_SCREEN_SCALE_FACTOR=1

which is a boolean with the same result. I eventually found the solution with

QT_SCALE_FACTOR=1.5

iam-TJ avatar Aug 17 '18 22:08 iam-TJ

I commented on this 2 years ago and it's still an issue.

emelbardis avatar Feb 25 '20 04:02 emelbardis

4 years ago - yubico are really-really fast fixing issues

juliandroid avatar Mar 14 '20 21:03 juliandroid

And 2022 still not working

KywoSkylake avatar Jan 14 '22 22:01 KywoSkylake

2023 and still not working

foxycode avatar Jan 21 '23 21:01 foxycode

This worked for me. Using a 2017 vintage HP x360 Spectre 15" with 16:9 aspect ratio screen, 4k UHD, running Windows 10 v. 22H2.

  • Start menu --> "YubiCo" folder --> Right click on "Yubikey Personalization Tool" --> More --> Open file location

(opens actual shortcut folder)

  • Right click shortcut for "Yubikey Personalization Tool" --> Properties --> "Compatibility" tab --> (at bottom) "Change high DPI settings" button --> (pop-up dialog box) (at bottom) Check box for "Override high DPI scaling behavior" --> toggle option for either "System" or "System (enhanced)" --> apply --> OK

Double click shortcut to test.

The aspect ratio of the initial tiny, illegible box (which originally appeared on my screen as 3-3/16" (3.1875") x 2-3/4 (2.75") for a ratio of .86) changed slightly to .83 or so after the change (7-7/8" (7.875") x 6-9/16" (6.5625") for a ratio of .83 or so), but the app is much more usable than before. I haven't found any options / toggle buttons / margins unusable yet, but please advise if any issues are found that I may have missed.

Regards,

RC

P.S. Granted this is only a Windows solution (vs Linux or Ubuntu, etc), but it might help someone else out there.

RCxRC1 avatar Mar 14 '23 14:03 RCxRC1

If using Ubuntu, try changing the Exec line in the file /usr/share/applications/yubikey-personalization-gui.desktop from

Exec=yubikey-personalization-gui

to

Exec=env QT_AUTO_SCREEN_SCALE_FACTOR=2 yubikey-personalization-gui

Note: This will only change when rendered from search not the command line.

AOrps avatar Feb 07 '24 07:02 AOrps