Preferences Font Size not getting applied at launch (ver 4.9.4 on MINT 19.3)

33 views
Skip to first unread message

Darrell Barabash

unread,
Jun 8, 2020, 2:03:22 PM6/8/20
to Subsurface Divelog
Hello everyone,

First off to all the developers ... THANKS for all your skills, time and effort and sharing Subsurface. It is the only dive logger that I use. Love it.

I do have one issue that has persisted for at least a year in several version on different Linux computers. Currently I am running Subsurface 4.9.4 on MINT 19.3 and installed the binaries through the PPA. It runs fine but I continue to have the issue of the preference net getting applied when it launches. 

Here is what I have tried so far:
1) confirmed that   ~/.config/Subsurface/Subsurface.conf   is actually present and that I am the owner with read and write.
2) started Subsurface and I can see that it is starting with DejaVu Sans size 10. 
3) when I go to  File => Preferences   I see that the font size is 8 which is also what I see in the .conf file.
4) while in the Preference screen, I press "apply" to apply what I see in the window (DejaVu 8) but nothing in the display changes.
5) but, if I toggle the font size to 7 and hit "apply" the size changes to 7. And, when I toggle back to 8 and hit "apply" the display changes to font size 8. It is stable for the rest of the session.
6) exit and then restart and once again it starts at font size 10 even though the .conf is set to 8. I can repeat steps 3) .. 5) again and again and the behavior is consistent.
7) manually editing the .conf file gives same result. No matter what font size I set, it always starts with 10 and I have to go though steps 3) .. 5) above to set it for the session.

Has anyone else has experienced this (I get it on three different Linux computers all running MINT 19.x) and can point me to what I might be doing wrong? Or, what can I do one my end to provide some diagnostics to help track this down?

Stay safe everyone and thanks in advance for the help!
Darrell ...

Willem Ferguson

unread,
Jun 9, 2020, 4:11:24 AM6/9/20
to 'Robert C. Helling' via Subsurface Divelog
--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/0bb7e420-a4c8-493b-b49c-160c71dc8fe5o%40googlegroups.com.

Hi David,


I run Ubuntu 18.04 with one of the late development versions of  Subsurface. Attached screenshots for DejaVu 10 and DejaVu 11. Works according to expectations. There are a few things to look at.

1) Where are your preferences stored and do you have access rights to that directory? IMPORTANT: NEVER run Subsurface as root.

2) Are your other preferences stored and correctly implemented? For instance if you set the animation speed in the Screen Preferences, is it stored and correctly used afterwards? My preferences are stored in Home/.config/subsurface, dunno if yours are the same. Check the file Subsurface.conf and see what the setting inside that file is. This helps to determine whether the font setting is not saved, or whether it is not read back correctly. In my system there is a section as follows:

[Display]
animation_speed=0
divelist_font=DejaVu Sans
font_size=10

Check how your system deals with this. My comments do not represent a fix, but at least one can get closer towards identifying the cause of the problem.

Kind regards,

willem




This message and attachments are subject to a disclaimer.
Please refer to http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf 
for full details.
Screenshot from 2020-06-09 09-42-49.png
Screenshot from 2020-06-09 09-42-16.png

Willem Ferguson

unread,
Jun 9, 2020, 4:12:43 AM6/9/20
to subsurfac...@googlegroups.com
Screenshot from 2020-06-09 09-42-49.png
Screenshot from 2020-06-09 09-42-16.png

Darrell Barabash

unread,
Jun 9, 2020, 12:02:23 PM6/9/20
to Subsurface Divelog
Thanks for those hints Willem. Unfortunately, I think that I have already exhausted the basic ideas:
  • my preferences are stored in the same location as yours:   ~/.config/Subsurface/Subsurface.conf
  • the owner user and group are set to me with r/w access
Trying again to try and isolate where things are going wrong, I manually edited the configuration to set the font size to 6 (really small so easy to tell if this got applied or not):

~/.config/Subsurface/Subsurface.conf
... 
[Display]
displayinvalid=false
divelist_font=DejaVu Sans
font_size=6
...

Now I launch Subsurface from command line with -v -v -v -v option to see if any error messages and there were none. What I see is:
  • Everything launches fine. But, the font size for the log display is clearly still 10.
  • I then opened File => Preferences and that screen shows that the font size is 6 which seem to indicate that the preferences file was read, but not acted upon.

  • Since the preferences file shows the font size to be 6 I just hit "apply" to see if the settings would be applied. They were not applied.
  • I then tried "save" and was taken to the main log screen and the font size is still unchanged at 10.
  • Went back to the preferences screen and typed in a font size of 16 (so that any change would be obvious) and did "save". Now the change got applied. And I can see that the .conf file was also updated with this change.
  • I then typed in font size 6 and "save". The log display immediately updated to the new font size and the .conf file updated too.
  • Exit and restart Subsurface. Unfortunately, the display has reverted back to font size 10 and irrespective of what the .conf file has (it has font_size=6).
  • File => Preferences screen shows font size 6.
  • If I enter "6" into the font size cell and "save" the display does not change accordingly.
  • But, if type any other size that changes this value to something else, the display size changes.
  • It is only when the font size value is changed that the display font gets updated. Otherwise, it seems that the font size is stuck at the default size of 10.
Observation summary (which I hope will help the developers):
  • reading and writing the Subsurface.conf file works fine
  • at launch, the .conf file is read but the display font size is stuck at 10.
  • KEY POINT => only when the font size is changed in the preferences screen does the display font change.
  • any changes made to the preferences and saved are indeed saved in the .conf file.
  • at launch, it doesn't matter what size is in the .conf file, the display starts at 10 and does not change until the value shown in the preferences screen (doesn't actually matter what it is) gets changed to something else. Then, the display size gets updated.
To me it almost seems like there needs to be some sort of explicit instruction to cause the font display size to be updated after the .conf file is read. Maybe this is automatic in some distributions but it seems that my MINT distribution needs to be "kicked" to update. 

This is what gets reported for my particular system:
  • using qt5ct plugin
  • Subsurface v4.9.4,
  • built with libdivecomputer v0.7.0-devel-Subsurface-NG (7882ba423cd87569f9c9361fa999917e9ced1083)
  • built with Qt Version 5.9.5, runtime from Qt Version 5.9.5
  • built with libgit2 1.0.0
  • "validateGL(): created OpenGLContext."
  • "validateGL(): obtained QOpenGLFunctions."
  • "validateGL(): detected OpenGL version 3.3."
  • D-Bus global menu: no
I  hope this is helpful in narrowing down the issue.

Darrell ...

On Tuesday, June 9, 2020 at 3:11:24 AM UTC-5, Willem Ferguson wrote:
On 2020/06/08 20:03, Darrell Barabash wrote:
Hello everyone,

First off to all the developers ... THANKS for all your skills, time and effort and sharing Subsurface. It is the only dive logger that I use. Love it.

I do have one issue that has persisted for at least a year in several version on different Linux computers. Currently I am running Subsurface 4.9.4 on MINT 19.3 and installed the binaries through the PPA. It runs fine but I continue to have the issue of the preference net getting applied when it launches. 

Here is what I have tried so far:
1) confirmed that   ~/.config/Subsurface/Subsurface.conf   is actually present and that I am the owner with read and write.
2) started Subsurface and I can see that it is starting with DejaVu Sans size 10. 
3) when I go to  File => Preferences   I see that the font size is 8 which is also what I see in the .conf file.
4) while in the Preference screen, I press "apply" to apply what I see in the window (DejaVu 8) but nothing in the display changes.
5) but, if I toggle the font size to 7 and hit "apply" the size changes to 7. And, when I toggle back to 8 and hit "apply" the display changes to font size 8. It is stable for the rest of the session.
6) exit and then restart and once again it starts at font size 10 even though the .conf is set to 8. I can repeat steps 3) .. 5) again and again and the behavior is consistent.
7) manually editing the .conf file gives same result. No matter what font size I set, it always starts with 10 and I have to go though steps 3) .. 5) above to set it for the session.

Has anyone else has experienced this (I get it on three different Linux computers all running MINT 19.x) and can point me to what I might be doing wrong? Or, what can I do one my end to provide some diagnostics to help track this down?

Stay safe everyone and thanks in advance for the help!
Darrell ...
 

Hi David,


I run Ubuntu 18.04 with one of the late development versions of  Subsurface. Attached screenshots for DejaVu 10 and DejaVu 11. Works according to expectations. There are a few things to look at.

1) Where are your preferences stored and do you have access rights to that directory? IMPORTANT: NEVER run Subsurface as root.

2) Are your other preferences stored and correctly implemented? For instance if you set the animation speed in the Screen Preferences, is it stored and correctly used afterwards? My preferences are stored in Home/.config/subsurface, dunno if yours are the same. Check the file Subsurface.conf and see what the setting inside that file is. This helps to determine whether the font setting is not saved, or whether it is not read back correctly. In my system there is a section as follows:

[Display]
animation_speed=0
divelist_font=DejaVu Sans
font_size=10

Check how your system deals with this. My comments do not represent a fix, but at least one can get closer towards identifying the cause of the problem.

Kind regards,

willem



Willem Ferguson

unread,
Jun 9, 2020, 1:00:14 PM6/9/20
to subsurfac...@googlegroups.com
On 2020/06/09 18:02, Darrell Barabash wrote:
Thanks for those hints Willem. Unfortunately, I think that I have already exhausted the basic ideas:
  • my preferences are stored in the same location as yours:   ~/.config/Subsurface/Subsurface.conf
  • the owner user and group are set to me with r/w access
Trying again to try and isolate where things are going wrong, I manually edited the configuration to set the font size to 6 (really small so easy to tell if this got applied or not):

~/.config/Subsurface/Subsurface.conf
... 
[Display]
displayinvalid=false
divelist_font=DejaVu Sans
font_size=6
...

Now I launch Subsurface from command line with -v -v -v -v option to see if any error messages and there were none. What I see is:
  • Everything launches fine. But, the font size for the log display is clearly still 10.
  • I then opened File => Preferences and that screen shows that the font size is 6 which seem to indicate that the preferences file was read, but not acted upon.

Hi Darrell (aka David !!??, apologies)

I will make time over the weekend to look at this. My problem is that this is not repeatable on my Ubuntu box. The question is how does the OS handle fonts that are passed to Qt for rendering? Since Ubuntu and Mint are fairly close, I the likelihood is there that our systems would behave similarly. However, I will scan the code to see if I can find anything suspiciously.

One last favour no, actually two.

1) When you activate Help -> About Subsurface in the main menu, what is the precise version it shows, Just 4.9.4 with no other subversion info?

2) Take the troible and download the AppImage from the Subsurface Downloads page and see if the AppImage behaves similarly? I can run that same image (exaclt the same code) and see what happens on my system.

Kind regards,

willem




Darrell Barabash

unread,
Jun 9, 2020, 1:46:50 PM6/9/20
to Subsurface Divelog
I'd be glad to try anything to help out Willem. To your questions:
  • Version from the About screen for the binaries installation is just 4.9.4


  • I tried the App Image for 4.9.3 and 4.9.4
    • The Preferences and font size settings work perfectly. Yay!
    • But now I cannot read my Scubapro G2 over USB (which works fine in the binary installation). The error I get is:
         [0.016763] ERROR: Failed to claim the usb interface (LIBUSB_ERROR_BUSY). [in /__w/subsurface/libdivecomputer/src/usbhid.c:607 (dc_usbhid_open)]
         Finishing download thread: "Unable to open  Scubapro (G2)"
    • I do have a rule in    /etc/udev/rules.d   so that I don't have to run as root and it seems to work for the binaries version of Subsurface:
       /etc/udev/rules.d/91-scubapro-g2.rules:
      SUBSYSTEM=="usb",ATTRS{idVendor}=="2e6c",ATTRS{idProduct}=="3201",GROUP="users",MODE="0666",NAME="ScubaPro-G2"

  • The About screen for the App Image is identical to above. When I launch it with -v -v -v -v the information reported is:
Subsurface v4.9.4,
built with libdivecomputer v0.7.0-devel-Subsurface-NG (7882ba423cd87569f9c9361fa999917e9ced1083)
built with Qt Version 5.12.4, runtime from Qt Version 5.12.4
built with libgit2 0.26.0
"validateGL(): created OpenGLContext."
"validateGL(): obtained QOpenGLFunctions."
"validateGL(): detected OpenGL version 3.3."

Does any of this help Willem?

Thanks again ... Darrell (a.k.a. David  LOL)

Darrell Barabash

unread,
Jun 10, 2020, 1:34:27 PM6/10/20
to Subsurface Divelog
I just realized that I didn't respond correctly and missed getting some updated information out here. I'm a bit of a newbie here ... sorry.

UPDATE -- For sure it is not hardware. Last night I experimented on this AMD PC running MINT 19.3, Another Intel based PC running MINT 19.2. Two different laptops running MINT 19.1 and 19.3. Behavior is how I already described on every one.

Then, I did try some of the font experiments you mentioned. Maybe this result helps:
  • in Subsurface 4.9.4 binary the fonts (size and/or type) are not initialized properly on any MINT 19.x version. They are never updated unless they are changed in the Preferences screen and then saved or updated. If neither the font size nor the font style are changed, there is no update to the display.
  • in Subsurface 4.9.3 binary the fonts all work properly. Unfortunately the USB interface to my ScubaPro G2 doesn't seem to work in this version. Not sure if it matters but for me to be able to run 4.9.3 I did have to run under MINT 18.2. So, that is a potential difference I suppose.
  • I don't know how to force the loading of 4.9.3 on MINT 19.3. That would be one way to know for sure whether the difference here is 4.9.3 versus 4.9.4 or is it MINT 18.* versus MINT 19.*
I notice that the Preferences screen is 4.9.3 and 4.9.4 is very different. Maybe an error or unexpected change crept in during this change?

Darrell ...

Willem Ferguson

unread,
Jun 11, 2020, 3:36:26 AM6/11/20
to subsurfac...@googlegroups.com, Darrell Barabash
On 2020/06/10 19:34, Darrell Barabash wrote:
I just realized that I didn't respond correctly and missed getting some updated information out here. I'm a bit of a newbie here ... sorry.

UPDATE -- For sure it is not hardware. Last night I experimented on this AMD PC running MINT 19.3, Another Intel based PC running MINT 19.2. Two different laptops running MINT 19.1 and 19.3. Behavior is how I already described on every one.

Then, I did try some of the font experiments you mentioned. Maybe this result helps:
  • in Subsurface 4.9.4 binary the fonts (size and/or type) are not initialized properly on any MINT 19.x version. They are never updated unless they are changed in the Preferences screen and then saved or updated. If neither the font size nor the font style are changed, there is no update to the display.
  • in Subsurface 4.9.3 binary the fonts all work properly. Unfortunately the USB interface to my ScubaPro G2 doesn't seem to work in this version. Not sure if it matters but for me to be able to run 4.9.3 I did have to run under MINT 18.2. So, that is a potential difference I suppose.
  • I don't know how to force the loading of 4.9.3 on MINT 19.3. That would be one way to know for sure whether the difference here is 4.9.3 versus 4.9.4 or is it MINT 18.* versus MINT 19.*
I notice that the Preferences screen is 4.9.3 and 4.9.4 is very different. Maybe an error or unexpected change crept in during this change?

Darrell ...


Look at https://subsurface-divelog.org/downloads/ where a repository of all previous versions can be found. Unfortunately there are no Linux executables, only the whole source tree for each version. However, there are ApImages for most versions, including V4.9.3 and V4.9.4. Please compare the 2 AppImage versions?

Code is at: src/subsurface/desktop-widgets/preferences/preferences_cloud.

Kind regards,
willem

Willem Ferguson

unread,
Jun 11, 2020, 3:38:55 AM6/11/20
to subsurfac...@googlegroups.com, Darrell Barabash
On 2020/06/10 19:34, Darrell Barabash wrote:
I just realized that I didn't respond correctly and missed getting some updated information out here. I'm a bit of a newbie here ... sorry.

UPDATE -- For sure it is not hardware. Last night I experimented on this AMD PC running MINT 19.3, Another Intel based PC running MINT 19.2. Two different laptops running MINT 19.1 and 19.3. Behavior is how I already described on every one.

Then, I did try some of the font experiments you mentioned. Maybe this result helps:
  • in Subsurface 4.9.4 binary the fonts (size and/or type) are not initialized properly on any MINT 19.x version. They are never updated unless they are changed in the Preferences screen and then saved or updated. If neither the font size nor the font style are changed, there is no update to the display.
  • in Subsurface 4.9.3 binary the fonts all work properly. Unfortunately the USB interface to my ScubaPro G2 doesn't seem to work in this version. Not sure if it matters but for me to be able to run 4.9.3 I did have to run under MINT 18.2. So, that is a potential difference I suppose.
  • I don't know how to force the loading of 4.9.3 on MINT 19.3. That would be one way to know for sure whether the difference here is 4.9.3 versus 4.9.4 or is it MINT 18.* versus MINT 19.*
I notice that the Preferences screen is 4.9.3 and 4.9.4 is very different. Maybe an error or unexpected change crept in during this change?

Darrell ...

Apologies

src/subsurface/desktop-images/preferences/preferences-defaults

wf


Darrell Barabash

unread,
Jun 11, 2020, 12:48:53 PM6/11/20
to Subsurface Divelog
Appreciate the guidance Willem. I was able to try running the AppImages 4.9.3 and 4.9.4 on my MINT 19.3 system:
  • Fonts work properly with both. The only difference I can see is that MINT distribution uses Qt 5.9.5 whereas the AppImages use Qt 5.12.4. My understanding of an AppImage is that the Qt 5.12.4 version that is bundled with the image is what gets run, and not the version installed in the system. Given that the source code for both the binaries and the images would be the same maybe this points to the issue being some difference between Qt 5.9.5 (used by the binaries) versus Qt 5.12.4 (used by the AppImage)?

    I tried to update Qt on a different computer (so I don't trash this one) but gave up trying to do it. Seems to be much less than straight forward. :-(

  • I would love to use the AppImage in general (least amount of hassle) ... BUT ... the USB connection to Scubapro G2 computer always results in an error that appears to be coming from libdivecomputer:
    • AppImage Subsurface 4.9.4 with G2 CONNECTED TO USB
      • Starting download from  
      • downloading only new dives
      • [0.018306] ERROR: Failed to claim the usb interface (LIBUSB_ERROR_BUSY). [in /__w/subsurface/libdivecomputer/src/usbhid.c:607 (dc_usbhid_open)]
      • Finishing download thread: "Unable to open  Scubapro (G2)"
      • AppImage Subsurface 4.9.4 with G2 DISCONNECTED
        • Starting download from  
        • downloading only new dives
        • Finishing download thread: "Unable to open  Scubapro (G2)"
        • Binary Installation Subsurface 4.9.4 with G2 CONNECTED TO USB
          • Starting download from  
          • downloading only new dives
          • INFO: dc_device_open error value of 0
          • Finishing download thread: 29 dives downloaded
      Anyway ... I am hypothesizing that the font/display update problem is related to some difference between Qt 5.12.4 (bundled into AppImage) versus Qt 5.9.5 which is what MINT has by default.

      Unfortunately, I'm about at my skills limit here and unable to upgrade Qt. Do you happen to know if there is an AppImage that was ever built with Qt 5.9.5? If the hypothesis is correct, that image should should the font update issue. Hmmm ... I'm stumped.

      Best regards,
      Darrell ...
      Reply all
      Reply to author
      Forward
      0 new messages