Menu

#1607 Display glitches with high DPI screen

Next release
open
nobody
Medium
2026-02-27
2025-03-16
Crisis
No

I have a 4k monitor with the resolution in Win 11 Pro (23H2) set to 3840x2160 with 200% scaling.

Password Safe works really well with this display set up, but there are couple of minor display glitches which you might not be aware of.

When Password safe first opens, the main toolbar is partially obscured, the status bar at the bottom is blank and the search toolbar at the bottom of the screen is not displayed. If you press Ctrl+F, everything magically fixes itself (see images).

Another minor high DPI issue is the field/font used to enter the master password is not scaled and is tiny. This occurs when 1) opening a password database and asked to enter the master password 2) when the master password is changed (see image)

3 Attachments

Discussion

  • Claus Berghammer

    See Bug 1594.

    Sadly this issues are known for quite some time now, and no improvements ever since... Use Version 3.46.1, thats the last version that is working as expected on HighDPI-Screens, after adjusting the font-sizes.

     
  • Rony Shapiro

    Rony Shapiro - 2025-04-26

    Problem is that I can't reproduce this on my machines.

    Please find in https://sourceforge.net/projects/passwordsafe/upload/PreReleases/3.68.1pre/ a possible fix to this. I'd appreciate any input: Does this resolve the font issue? The toolbar issue? Statusbar? Search bar? Thanks!

     
  • Crisis

    Crisis - 2025-04-26

    Hi Rony.

    I appreciate your efforts to try to fix, but unfortunately, 3.68.01pre did not resolve any of the issues I reported.

     
  • MrMe

    MrMe - 2025-04-27

    Hi Rony,

    I wanted to also test the v3.68.1pre, but I get a permission denied error using the https://sourceforge.net/projects/passwordsafe/upload/PreReleases/3.68.1pre/ link you provided. iSince Claus reports v3.68.1pre did not fix any of the high DPI issues, I'll wait until you have another preliminary verison.

    I also experience the same issues Claus and others have reported on a high DPI display. There are a bunch of interrelated issues with PasswordSafe and high DPI and the issues vary based on how the high DPI settings for Password Safe is configured if you right click on the pwsafe.exe executable and select the Compatibility tab.

    You said you could not reproduce the issues on your machine. Do you have a high DPI display?
    If you right click on the pwsafe.exe executable or a shortcut to it, then Select Properties and then Click on the Compatibility tab, and on the Compatibility tab click on the "Change high DPI settings" button at the bottom. Are the highlighted check boxes in the image I've attached unchecked on your machine?

     
  • Rony Shapiro

    Rony Shapiro - 2025-04-28

    Sorry, here's the correct link: https://sourceforge.net/projects/passwordsafe/files/PreReleases/3.68.1pre/
    I'd appreciate the additional input.

     
    • MrMe

      MrMe - 2025-04-28

      Hi Rony,

      I'm now able to download v3.68.1pre. Thanks.
      I'll provide some findings later.

       
      • MrMe

        MrMe - 2025-05-01

        Hi Rony,

        Here are some findings (8 images) using v3.68.02pre on a high dpi (2K screen) laptop running Windows 10Pro v10.0.19045.

        This first test is for the configuration of the high DPI settings for the pwsafe.exe executable as shown in Fig1. I believe this is the standard configuration one would see after installing Password Safe on a fresh install of Windows 10 (or Windows 11) on a high DPI system.

        Fig0 shows that the password entry text is very tiny. This is true when opening a safe or any action that requires typing in the password after the safe is open.

        Fig2 shows the Display settings of the laptop I'm using for this test

        Fig3 shows the Initial Tree View settings in the test safe I am working with

        Fig4 shows the display anomaly seen once the safe opens where the main toolbar (I didn't have the dragbar showing at this time) is obscured. Using Control-F to show the Find clears up the display issues (Fig 4a)

        Fig5 shows opening the safe where the Dragbar was also set to be displayed and here also the display of the toolbar and dragbar is messed up. Again, a control-F to show the Find clears up the display issues (Fig5a)

        Notice in Fig4 and Fig5 there is also no Status area showing when the safe opens, but once Control-F to show Find is used, the Status area appears.

        Notice in Fig4,4a,5,or5a that the text in the Tree is pixelated and not sharp. In a high dpi device, text is usually sharp. Another configuration of Windows high DPI settings in Fig 1 will make the text sharp. I'll have some images showing this in another test report.

        Other issues I encountered, is that after the safe opens after being saved/closed with the Find showing, Find should automatically be shown (because of the Fig 3 settings I am using) but that did not happen. This is the bug report I recently withdrew because I've seen it works sometimes, but also times where it did not work. Interestingly, this feature works reliably on other Windows 10 devices I have that are not high DPI. It appears that the high dpi display issues with the toolbar and the status bar seen in these tests also affects the automatic showing of the Find bar.

        Miscellaneous observations:

        1. The password safe window would open to the same size and position on the screen it was when password safe was last closed.
        2. The spacing between icons on the tool bars are same as I've observed on other windows 10 devices that are not high dpi where I also use Password Safe.
         
        • MrMe

          MrMe - 2025-05-06

          Hi Rony,

          I'm finding that v3.68.1pre and v3.68.2pre have also introduced menubar and dragbar display issues when the safe opens on a non high DPI device (windows 11 laptop with standard 1080P display). The released v3.68 on same laptop does not have this issue on the same laptop, so I'm thinking the changes made in v3.68.1pre and v3.68.2pre is probably not the way to go.

          If you you're still interested I will post additional pictures as promised of testing v3.68.2pre on a high DPI (2k screen) windows 10 laptop using other/different configurations of Windows high DPI settings.

           
          • MrMe

            MrMe - 2025-05-06

            Hi Rony,

            Ignore what I said above!

            On second look both v3.68.2pre and released 3.68 showed the same display issues after the safe opens on my 1080P display windows 11 laptop.

            Originally this laptop had only the released v3.68 and I don't recall noticing any display issues with the safe after it opens. I "green installed" v3.68.2pre on same laptop to test and now I'm noticing the safe menubar/dragbar cutoff issues and missing status bar at bottom of window after the safe opens with released v3.68 and v3.68.2pre. Very strange!

             
  • MrMe

    MrMe - 2025-07-27

    Here's a workaround I'm using to successfully avoid a couple of the reported issues with using Windows PasswordSafe on a high DPI computer. I'm using the latest Windows version (v3.39) with this workaround on a 2K (2560x1440) screen Windows laptop and so far it has been working great for me.

    The workaround uses a Windows batch script I wrote. The script is my launcher for Password Safe, i.e. it starts pwsafe.exe, but before doing so it modifies the position and size of the Password Safe window in the pwsafe.cfg file to my desired fixed starting position and size (if someone wanted different values, there are comments in the batch file informing where to change these values).

    A windows shortcut to the batch file can be configured to start it minimized so it's is not seen and the shortcut can be placed on the the taskbar. Windows also provides many icons one could chose from to assign to the shortcut.

    The other one-time steps that I use to address high DPI issues are:

    1. Change the high DPI settings of the pwsafe.exe to "Override high DPI scaling behavior. Scaling performed by:" Application. To do so, right click on the pwsafe.exe executable (e.g. in C:\Program Files\Password Safe\pwsafe.exe), then Select Properties and then Click on the Compatibility tab, and on the Compatibility tab click on the "Change high DPI settings" button at the bottom, then configure as in the attached figure.

    2. Change font sizes in Password Safe (View > Change Font) for the Tree/List, Add/Edit, Password, Notes and Virtual Keyboard. The trick here is to select the font size as the desired font size divided by the Scale and Layout percentage Windows is set to. For example, if Scale and Layout in Windows System>Display settings is 200%, in Password Safe, if you want 12 pt font for Tree/List, Add/Edit, Password, Notes, select a font size of 6, not 12.

    If anyone is interested in the batch script, I can provide it to Rony to and maybe he could upload it to sourceforge.

     
    • Alexey Fedorov

      Alexey Fedorov - 2026-02-24

      Sharing my workaround in case it helps someone. Credit to MrMe whose comment crystallized this approach for me. I’m including all the steps to avoid confusing the reader.

      Step 1: Override DPI scaling
      Right-click pwsafe.exe (usually located in "C:\Program Files\Password Safe") → Properties → Compatibility tab → Change high DPI settings → check "Override high DPI scaling behavior. Scaling performed by:" and select "Application". After this, the UI will be crisp and sharp. However, you'll notice two side effects described below.

      Step 2: Fix side effect 1: Giant fonts
      The application fonts become oversized. To fix: open the program (you may need to navigate it "blindly" at first), go to "View" → "Change Font", and set the font size to 6 for each category (at 150% scaling, 6 will be stored as 9). Do this for all font options except "Virtual Keyboard Font".

      Step 3: Fix side effect 2: Window position not remembered
      The program no longer saves its window position between sessions and opens in an unpredictable location each time. As I understand it, this happens because the scaling factor affects the stored coordinates. The workaround: position the window in the top-left corner of your screen and resize it to roughly half your screen size. With these coordinates, the position will be preserved correctly on subsequent launches. It takes a bit of getting used to, but it works.

      You can always revert to default settings:

      1. Open "%LocalAppData%\PasswordSafe" in Explorer (paste this path as-is)
      2. Delete pwsafe.cfg — it will be recreated on next launch.

      Hope this helps someone.

       
      • MrMe

        MrMe - 2026-02-24

        This ☝

        Thanks Alexey!

        If anyone is interested in another solution to Step 3, I created a windows batch file that I use to start pwsafe.exe, and it will position the application window at a x,y location and size of your choosing everytime. It does it by modifying the %UserProfile%\ Appdata\Local\PasswordSafe\pwsafe.cfg for you and then starting pwsafe.exe

        It's been working like charm since I created it.

         
        • Alexey Fedorov

          Alexey Fedorov - 2026-02-25

          Thanks MrMe! Can you please put the batch file somewhere or just paste code here if it not too large?

           
          • MrMe

            MrMe - 2026-02-27

            Ok. I'll paste the code here then copy it from here after I post and test it. If it works, I'll respond letting you know it works.

             
  • MrMe

    MrMe - 2026-02-27

    @echo off
    setlocal enabledelayedexpansion

    :: Source file and temporary file
    set sourceFile=%LOCALAPPDATA%\PasswordSafe\pwsafe.cfg
    set tempFile=%LOCALAPPDATA%\PasswordSafe\pwsafe_updated.cfg

    :: Set the destination folder
    set destinationFolder=%LOCALAPPDATA%\PasswordSafe\

    :: Ensure the temporary file doesn't already exist
    if exist "%tempFile%" del "%tempFile%"

    :: Process the source pwsafe.cfg file line by line and handle the <layout><!CDATA[]]></layout> line
    :: in the pwsafe.cfg file as a special case due to use of setlocal enabledelayedexpansion treating
    :: the ! character on that line as a special character. The trick is to disable delayedexpansion
    :: before echoing the CDATA line, then enable delayedexpansion after.
    ::
    :: *** Only change the 162,600,264,706 values for the top, bottom, left, right to desired values. ***
    ::
    :: Do not add or take out any spaces on the if, else if or echo lines or the script will not work.
    :: I verified that if the values for top, bottom, left and right in this script are the same as in the
    :: original pwsafe.cfg file, the temp file this script creates is exactly the same as the pwsafe.cfg (i.e. SHA1 sums match!)

    for /f "delims=" %%A in ('type "%sourceFile%"') do (
    set "line=%%A"
    if "!line:~0,13!"==" <top>" (
    echo ^<top^>162^<^/top^>>>"%tempFile%"
    ) else if "!line:~0,16!"==" <bottom>" (
    echo ^<bottom^>600^<^/bottom^>>>"%tempFile%"
    ) else if "!line:~0,14!"==" <left>" (
    echo ^<left^>264^<^/left^>>>"%tempFile%"
    ) else if "!line:~0,15!"==" <right>" (
    echo ^<right^>706^<^/right^>>>"%tempFile%"
    ) else if "!line:~0,16!"==" <layout>" (
    setlocal DisableDelayedExpansion
    echo %%A>>"%tempFile%"
    setlocal EnableDelayedExpansion
    ) else (
    echo %%A>>"%tempFile%"
    )
    )</layout></right^></right></left^></left></bottom^></bottom></top^></top>

    :: Replace the original pwsafe.cfg file with the updated cfg file so that when pwsafe.exe starts
    :: the Password Safe window will appear at the desired position and with the desired window size
    move /y "%tempFile%" "%sourceFile%" >nul

    :: Start pwsafe.exe
    :: Uncommnent the one that is approprate for the PasswordSafe installation type

    :: For a normal installation of Password Safe to Windows Program Files directory
    start "" "%PROGRAMFILES%\Password Safe\pwsafe.exe"

    :: If a green install is used, change the path below to the appropriate path to pwsafe.exe
    :: start "" "C:\Portable_ProgramFiles\Password Safe\pwsafe.exe"

     
  • MrMe

    MrMe - 2026-02-27

    Hi Alexey,

    I posted the code above. It works when I copied it back from here and ran it.

    This is what I did.

    1. Selected all lines in the previous post with the code and use Ctrl-C to copy. I pasted the text into a notepad++ window and saved the file locally as start_pwsafe.bat
    2. I created a shortcut on my desktop to start_pwsafe.bat and named the shortcut start_pwsafe
    3. Optional, but this is what I do. Right click on the shortcut on the desktop and select the Shortcut tab. On this tab under Run, select Minimized and under Shortcut, change the icon from a list to something you like.

    Use your desktop shortcut to start pwsafe and you should be good to go.

    The window size and position may not be what you want, if so, just edit the start_pwsafe.bat (for example in notepad++) and change the four numbers that are currently set to 162, 600, 264, 706 for the top, bottom, left, right position respectively of the Password Safe window. It will be obvious how you want to change them to get the window positioned and sized the way you want it. Close pwsafe, change the values and run start_pwsafe again to settle on the position and size you want.

     

Log in to post a comment.

MongoDB Logo MongoDB