Project

General

Profile

Bug #10902

HiDPI problem with darktable 2.0?

Added by Cyrille Bollu about 4 years ago. Updated over 3 years ago.

Status:
Incomplete
Priority:
Low
Assignee:
-
Category:
General
Target version:
-
Start date:
01/31/2016
Due date:
% Done:

20%

Estimated time:
Affected Version:
2.0.0
System:
Mac OS X
bitness:
64-bit
hardware architecture:
amd64/x86

Description

Hi,

I'm using darktable 2.0 on a Macbook Air (model A1466, 13,3", 1440x900, Intel Graphics 5000) and I've recently started to experience what seems to be a HiDPI-related bug in darktable.

In short: darktable is too large for my display and I can't reduce its width.

I've tried tuning the screen_dpi_overwrite and screen_ppd_overwrite settings but without success.

Here are the results of my experiments:

================================================

screen_dpi_overwrite=2.0
screen_ppd_overwrite=-1

MacBook-Air:~ cyr$ /Applications/darktable.app/Contents/MacOS/darktable -d control
[noiseprofile] loading noiseprofiles from `/Applications/darktable.app/Contents/Resources/share/darktable/noiseprofiles.json'

(darktable-bin:1806): GLib-GObject-WARNING **: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(darktable-bin:1806): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
[HiDPI] setting ppd to 1,000000
[screen resolution] setting the screen resolution to 2,000000 dpi as specified in the configuration file

=> No text at all... well, it makes sense....

=================================================

According to http://dpi.lv/ my display is supposed to be 128 dpi, so let's try 90

screen_dpi_overwrite=90.0
screen_ppd_overwrite=-1

[noiseprofile] loading noiseprofiles from `/Applications/darktable.app/Contents/Resources/share/darktable/noiseprofiles.json'

(darktable-bin:1832): GLib-GObject-WARNING **: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(darktable-bin:1832): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
[HiDPI] setting ppd to 1,000000
[screen resolution] setting the screen resolution to 90,000000 dpi as specified in the configuration file

=> Still too large, but better

=================================================

let's try 72

screen_dpi_overwrite=72.0
screen_ppd_overwrite=-1

MacBook-Air:~ cyr$ /Applications/darktable.app/Contents/MacOS/darktable -d control
[noiseprofile] loading noiseprofiles from `/Applications/darktable.app/Contents/Resources/share/darktable/noiseprofiles.json'

(darktable-bin:1855): GLib-GObject-WARNING **: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(darktable-bin:1855): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
[HiDPI] setting ppd to 1,000000
[screen resolution] setting the screen resolution to 72,000000 dpi as specified in the configuration file

=> Still too large and text begins to be very small (cfr screenshot)

=================================================

let's try 60

screen_dpi_overwrite=60.0
screen_ppd_overwrite=-1

MacBook-Air:~ cyr$ /Applications/darktable.app/Contents/MacOS/darktable -d control
[noiseprofile] loading noiseprofiles from `/Applications/darktable.app/Contents/Resources/share/darktable/noiseprofiles.json'

(darktable-bin:1891): GLib-GObject-WARNING **: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(darktable-bin:1891): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
[HiDPI] setting ppd to 1,000000
[screen resolution] setting the screen resolution to 60,000000 dpi as specified in the configuration file

=> Still too large and text is now almost unreadable.

===================================================

Well, tuning screen_dpi_overwrite is apparently not the way to go. And, I've no idea what to try next.

I must add that this problem started when I was still using DT 1.6.8 and I tried to display my screen on my HDTV, about 2 months ago. I was waiting for v2.0 with the hope it would solve it, but it didn't :-(

Do you have an idea how to fix this issue?

Best regards,

Cyrille

darktable_72dpi.tiff (653 KB) darktable_72dpi.tiff screenshot of darktable with screen_dpi_overwrite=72.0 Cyrille Bollu, 01/31/2016 11:16 PM

History

#1 Updated by Pedro Côrte-Real about 4 years ago

I've tried tuning the screen_dpi_overwrite and screen_ppd_overwrite settings but without success.

From your description you didn't try tuning screen_ppd_overwrite yet. Try setting that to 2. If I remember correctly the automatic detection of that setting doesn't work on OSX (gtk bug).

#2 Updated by Cyrille Bollu about 4 years ago

Hi Pedro,

thanks for your answer.

You're almost right: Though, I did try changing the screen_ppd_overwrite setting before writing this bug report, I didn't bother writing down formaly the results.

Though, I understand a clear and complete report is needed. So, here are the results of a changing this setting:

===========================================

screen_dpi_overwrite=-1.0
screen_ppd_overwrite=2.0

MacBook-Air:~ cyr$ /Applications/darktable.app/Contents/MacOS/darktable -d control
[noiseprofile] loading noiseprofiles from `/Applications/darktable.app/Contents/Resources/share/darktable/noiseprofiles.json'

(darktable-bin:360): GLib-GObject-WARNING **: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(darktable-bin:360): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
[HiDPI] setting ppd to 2,000000 as specified in the configuration file
[screen resolution] setting the screen resolution to 126,278512 dpi

=> No apparent changes

===========================================

screen_dpi_overwrite=-1.0
screen_ppd_overwrite=3.0

MacBook-Air:~ cyr$ /Applications/darktable.app/Contents/MacOS/darktable -d control
[noiseprofile] loading noiseprofiles from `/Applications/darktable.app/Contents/Resources/share/darktable/noiseprofiles.json'

(darktable-bin:389): GLib-GObject-WARNING **: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(darktable-bin:389): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
[HiDPI] setting ppd to 3,000000 as specified in the configuration file
[screen resolution] setting the screen resolution to 126,278512 dpi

=> No apparent changes, but seems slower to render

===========================================

Let's try something very large

screen_dpi_overwrite=-1.0
screen_ppd_overwrite=50.0

MacBook-Air:~ cyr$ /Applications/darktable.app/Contents/MacOS/darktable -d control
[noiseprofile] loading noiseprofiles from `/Applications/darktable.app/Contents/Resources/share/darktable/noiseprofiles.json'

(darktable-bin:431): GLib-GObject-WARNING **: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(darktable-bin:431): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
[HiDPI] setting ppd to 50,000000 as specified in the configuration file
[screen resolution] setting the screen resolution to 126,278512 dpi

wait time 0,599209s
[run_job-] 02 163747784,087552 load image 567 mip 7 | queue: 1 | priority: 4
[run_job+] 02 163747784,087593 load image 459 mip 7 | queue: 1 | priority: 4
Magick: abort due to signal 11 (SIGSEGV) "Segmentation Fault"...
Abort trap: 6

=> DT fails to render its main window and crashes

===========================================

Let's go back to a more reasonable setting

screen_dpi_overwrite=-1.0
screen_ppd_overwrite=10.0

MacBook-Air:~ cyr$ /Applications/darktable.app/Contents/MacOS/darktable -d control
[noiseprofile] loading noiseprofiles from `/Applications/darktable.app/Contents/Resources/share/darktable/noiseprofiles.json'

(darktable-bin:408): GLib-GObject-WARNING **: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(darktable-bin:408): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
[HiDPI] setting ppd to 10,000000 as specified in the configuration file
[screen resolution] setting the screen resolution to 126,278512 dpi

=> DT's main window looks normal again (but takes a lot more longer to render than usual)

===========================================

Let's try 20, just in case:

screen_dpi_overwrite=-1.0
screen_ppd_overwrite=20.0

MacBook-Air:~ cyr$ /Applications/darktable.app/Contents/MacOS/darktable -d control
[noiseprofile] loading noiseprofiles from `/Applications/darktable.app/Contents/Resources/share/darktable/noiseprofiles.json'

(darktable-bin:453): GLib-GObject-WARNING **: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(darktable-bin:453): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
[HiDPI] setting ppd to 20,000000 as specified in the configuration file
[screen resolution] setting the screen resolution to 126,278512 dpi

=> No apparent changes (except that it is still slower)

==============================================

It seems this setting doesn't do anything except to slow the application down.

Is there anything else we can try?

If needed, I might be able to compile DT (though, I don't usually compile on Mac).

Best regards,

Cyrille

#3 Updated by Pedro Côrte-Real about 4 years ago

The screen PPD is how much we need to "overrender" because the screen has been reduced from for example 3200x1800 to 1600x900 equivalent resolution. Setting it to anything but -1 or 2 doesn't make much sense with current screens. What's your side panel width setting? You may need to reduce that. If that's not the solution it's probably an OSX specific bug where I can't really be of much help.

#4 Updated by Igor Kuzmin about 4 years ago

Did you try changing language to English?

#5 Updated by Tobias Ellinghaus about 4 years ago

  • % Done changed from 0 to 20
  • Status changed from New to Incomplete

Could you please show a screenshot with default settings (i.e., everything at -1)? I am not sure what we are talking about here.

#6 Updated by Cyrille Bollu about 4 years ago

Hi all,

thanks for your help and answers.

Tobias,

You're right, my screenshot in comment #1 is shit. Sorry for that.

I'll not post a new screenshot because I solved my problem (see below), but the issue should be quite simple to understand: "darktable window's minimum width is too large for my display and I can't (errata: couldn't) reduce its width".

For example, my screenshot's width in comment #1 is 1562 pixels though my screen's width is 1440 pixels. And, there was no way to shrink DT's window's width. Even, maximizing the window or making it full screen would not change its 1562 pixels width.

Igor,

I've finally managed to change DT's locale. And, by doing so I finally could solve my problem.

But it was not an easy way at all :-)

================================================================

Here's how I solved my issue:

1) Following Igor 'suggestion, I changed DT's language (ui_last/gui_language=C) => Not solved.
2) Then I made the window full screen, and... Thatam! The problem is solved: The window is no more cropped on its right side.
3) I go back to a normal window (ie: not full-screen, nor maximized), and... Too bad, the window is cropped again :-(
4) I maximize the window by clicking on its title bar, and.... Thatam! Window isn't cropped anymore
5) I go back to normal window, and.... Thatam! Window's width stays good: Window isn't cropped

No, no I didn't use any black magic :-)

Ok, so now that the problem is fixed with "C" locale, how is going with "fr"

1) Switching back to "fr" (ui_last/gui_language=), and... Too bad, window is still cropped on its right side :-(
2) But... wait... It seems to fit better; Window seems less cropped
3) Let's try to make it full-screen, and... Hmmmm, still cropped. But, again, it seems to be less cropped.
4) Let's go back to a normal window, and... still cropped. But, definitively, things seem to go better.
5) Let's try to set screen_ppi_overwrite to 110, and... still cropped. But, again, it seems a little bit better
6) Let's make the window full screen, and.... Thatam! Solved! Everything fits in a 1440 pixels width window!! woooottt!!!
7) Let's go back to a normal window, and... Damned! It's cropped again. But, not by a big amount
8) Let's maximize the window by clicking on its title bar, and... Thatam! Solved!
9) Let's go back to a normal window, and... Thatam! Still solved!

Ok, I have no idea what's going on under the hood. But, my problem is now solved with my default locale.

Jez, it was not an easy path...

===================================================================

Conclusion:

As I said at the beginning, things started to go wrong when I tried to display DT on my HDTV (connected in HDMI with my Mac). So, I guess there's some wrong calculation in that use case, and that the results somehow get sticked into DT aftyerward.

You can do what you want with this bug: For me it's solved. But, if you want to spend some time on it, I'm up for helping (eg: trying to resimulate by connecting my Mac to my HDTV again).

Best regards,

Cyrille

#7 Updated by Luke ArchWalker over 3 years ago

Hi Everyone,

First of all:
Thanks to you all guys, developpers of this wonderful soft :)
And thanks to you all for your returns :)

As I solved my problem thanks to your remarks and a bit of mix up with this differently, I would like to offer the DT's developpers a return of experiences to help them (at least I hope so) adjust some parameters for High DPI computers, and help users configure their High DPI machines.

Second, I'm running Darktable 2.0.5 on an Archlinux(in fact Manjaro Linux exactly) 64 Bits OS, and on a Lenovo Yoga 900-13Isk computer, which has a a 3200x1800 definition (Intel HD 520). I have thus configured my Archlinux Desktop Environment (XFCE) to have DPI=250.

I was experiencing problems with the main window horizontal size, which was not resizable AND which had the darktable modes texts (lighttable | darkroom | tetherin | map | slideshow | print) WERE VERY HUGE (all other texts were OK) which provoked the main window NOT to fit on my screen horizontally, and I could not resize the windows horizontally mainly because this VERY HUGE text was taking all the horizontal space inside the main window.

I tried the English gui_language hack proposed by Igor (my Darktable was in french), but this did NOT solve the problem for me (and I did NOT need to modify/play with this parameter to solve my problem)

===================================================================

Hence, here is what I did to solve my problem:

1°) I copied and pasted the darktable.css file (initially) from /usr/share/darktable/darktable.css to (my user's more specific location) ~/.config/darktable/darktable.css (to overwrite the default one in /usr/share/darktable)
2°) On line 154/606, corresponding to the following css selectors:
#header_label,#darktable_label,#view_label,#view_dropdown * { ...
I modified the font-size: (initially) from 10pt to 3pt (my modificiation).
THIS SOLVED THE TEXT SIZE ISSUE RADICALLY AND PERMANENTLY.
3°) I also modified the screen_dpi_overwrite parameter in ~/.config/darktable/dartablerc, so that screen_dpi_overwrite=250

Just to participate...
Hope this helps you guys! at least for one person :)

Also available in: Atom PDF

Go to top