GNOME Bugzilla – Bug 772930
Wrong scaling of PDF in presentation mode on hi-dpi screen
Last modified: 2018-05-22 16:50:13 UTC
Created attachment 337714 [details] screenshot of ‘evince --presentation file.pdf’ Opening any PDF file in presentation mode in version 3.22.0 (‘evince --presentation file.pdf’) only shows the top left quarter of each slide, when the Window scaling is set to 2 in gnome-tweak-tool. Setting it to 1, or starting evince with any explicitly set value for GDK_SCALE, e.g. with ‘GDK_SCALE=1 evince --presentation file.pdf’, appears to fix the issue (but scale the UI incorrectly, obviously). Both commands produce the same output on stderr: (evince:28581): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed (evince:28581): Gtk-WARNING **: Allocating size to EvSidebar 0x5594adc98520 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate? The failed assertion message appears when entering the presentation mode, or going to the next slide in presentation mode. Attached is the screenshot of a slide that appears when running ‘evince --presentation file.pdf’.
I have the same bug, but only with wayland. When using x11 then everything works just fine.
Updating gdk-pixbuf2 to version 2.36.2 seems to resolved the issue.
On my Arch Linux the gdk-pixbuf2 package just updated to 2.36.2 but I can't see any improvement on evince presentation mode under wayland.
For me libgdk-pixbuf2.0.0 of version 2.36.2-1 appears to make no difference. Not sure when that happened, but setting GDK_SCALE does not do anything at all now.
I have to appoligize, it was not the update that made it working. But my laptop is normally starting with wayland, but now I realized it sometimes randomly starting with x11 (couldn't figure out yet why though...). GDK_BACKEND=x11 pdfpc -S pdfpc-demo.pdf works for me. But GDK_BACKEND=wayland pdfpc -S pdfpc-demo.pdf doesn't.
I can confirm this bug. This happens consistently under Wayland, and never under X. I tried downgrading Evince, which did not help. The bug was present already at least in Evince 3.18.12, and it is still present in 3.22.1. Here’s another pdf that is affected: http://web.mit.edu/rsi/www/pdfs/beamer-tutorial.pdf. The issue does not affect all pdfs; when I open a pdf with A4-sized pages in presentation mode, it will show the top half of the page over the full width of the screen, just like it should. I tried pdfs with 4:3 and 16:9 page aspect ratios, and in both cases this bug did manifest itself. Only the top-left quarter of the page was shown.
Looks like this is a duplicate of 756825.
In my previous comment I obviously meant: GDK_BACKEND=x11 evince --presentation pdfpc-demo.pdf GDK_BACKEND=wayland evince --presentation pdfpc-demo.pdf But pdfpc has the same problem, see: https://github.com/pdfpc/pdfpc/issues/178
It looks that Mutter 3.26.2 has a fix for the wrong scale using HiDPI monitors: https://git.gnome.org/browse/mutter/commit/?h=3.26.2 The fullscreen view has proper dimensions for me using Gnome 3.26.2 under Arch Linux. There is just another issue: using side-by-side monitors (no mirror), the presentation view (key F5) is shown just on one screen. I used evince as presentation tool in class with the external beamer (now I use pdfpc): now it is unusable.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/717.