Bug 334525 - Gwenview hangs when switching from normal to full screen mode
Summary: Gwenview hangs when switching from normal to full screen mode
Status: RESOLVED FIXED
Alias: None
Product: frameworks-knotifications
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Martin Klapetek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-08 18:48 UTC by Tamir
Modified: 2015-12-29 20:54 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.18


Attachments
setting a default reason for disabling the screensaver in knotificationrestrictions.cpp (570 bytes, patch)
2015-05-14 19:30 UTC, Johannes Stefan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamir 2014-05-08 18:48:49 UTC
very long response programs in the transition from normal to full screen

Reproducible: Always

Steps to Reproduce:
1. Open the program in any directory with photos 
2.Attempt to translate the program from the normal mode to fullscreenBounce back
3.Bounce back
Actual Results:  
 Program "hangs"
Comment 1 Tamir 2014-05-09 12:39:09 UTC
appears regardless of the method rendering - software or OpenGL
Comment 2 Tamir 2014-05-09 12:55:04 UTC
The following screencast shows the bug “in action”:
http://www.youtube.com/watch?v=gpAsvUMOSfk&feature=youtu.be
Comment 3 Tamir 2014-05-10 05:35:35 UTC
Maybe it in the hardware or driver (open source)^
Machine: System: SAMSUNG product: 355V4C/356V4C/3445VC/3545VC version: P09AAN.031.CP
           Mobo: SAMSUNG model: NP355V5X-S01RU version: BOARD 00 Bios: American Megatrends version: P09AAN date: 07/04/2013
CPU: Dual core AMD A6-4400M APU with Radeon HD Graphics (-MCP-) cache: 2048 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 10780.6
           Clock Speeds: 1: 2400.00 MHz 2: 1400.00 MHz
Graphics: Card-1: Advanced Micro Devices [AMD/ATI] Trinity [Radeon HD 7520G] bus-ID: 00:01.0
           Card-2: Advanced Micro Devices [AMD/ATI] Thames [Radeon HD 7500M/7600M Series] bus-ID: 01:00.0
           X.Org: 1.15.0 drivers: ati,radeon (unloaded: fbdev,vesa) Resolution: 1366x768@60.1hz
           GLX Renderer: Gallium 0.4 on AMD ARUBA GLX Version: 3.0 Mesa 10.1.0 Direct Rendering: Yes
Comment 4 Andreas Klöckner 2014-06-14 06:32:05 UTC
I'm encountering this as well with Gnome 3.12. I think a common theme might be the non-KDE window manager...
Comment 5 prowendor 2014-09-14 10:34:37 UTC
My version of Gwenview is 4.13.1 using KDE development platform 4.13.3 running on Mint 17 64bit Cinnamon.
The same in Ubuntu

Using gwenview as a normal user and switching to fullscreen mode I get a delay of over half a minute.

But this is interesting.

Opening Gwenview in terminal as root and switching to fullscreen mode there is no delay.
Comment 6 prowendor 2014-09-18 10:40:56 UTC
I think Gwenview is not fully compatible with the Gnome 3 desktops and its derivates like Unity and Cinnamon. I have tried this out on three different multibooting computers.

This bug doesn't affect KDE desktops. like OpenSuse, Fedora and Aptosid.

But if you log out from KDE and into Gnome in OpenSuse or Fedora you will see this bug. 

So this bug affects following systems: 

Fedora 20 in Gnome and Cinnamon,  Gwenview version is 4.13.1

OpenSuse 13.1 in Gnome  Gwenview version is 4.11.4

In Zorin 8, Gwenview version 4.11.4

in Linux Mint 17 Cinnamon Gwenview version 4.13.1 

Ubuntu 14.04 with Unity Gwenview version 4.14.0 

In all these cases in fullscreen mode the menubuttons ”hide sidebar” and ”add filter” in the left downside corner are visible only when hovering the mouse over them and the others (folder, information, operations) in the sidebar are greyed out. 
But they are still operational. 

Gwenview is running fine on these distributions:

Linux Mint Maya Cinnamon, Gwenview version 2.8.5

Debian Stable in Gnome, Gwenview version 2.8.4

And in Linux Mint Debian Cinnamon Gwenview version 4.11.3 but here we have the problem with the menubar described above. 

There is no difference what driver you have, Nvidia, Nouveau orAti. 

It seems to me something happened with Gwenview in the versions above 4.11.3, but of course this menubar problem also exists in this version. 

I hope this help. 

If any one has this same bug, please confirm.
Comment 7 Johannes Stefan 2015-05-14 19:30:09 UTC
Created attachment 92599 [details]
setting a default reason for disabling the screensaver in knotificationrestrictions.cpp

This is a DBUS-communication failure which appears in combination with the Gnome Session Manager.

Gwenview wants to disable the screensaver when going into fullscreen mode by sending a DBUS-message. The Gnome Session Manager receives the message, raises an error but does not report it back to Gwenview which makes Gwenview wait (and halt) for 25 seconds before continuing.


##### begin DBUS-log #####
method call sender=:1.223 -> dest=org.freedesktop.ScreenSaver serial=102 path=/ScreenSaver; interface=org.freedesktop.ScreenSaver; member=Inhibit
   string "Gwenview"
   string ""
method call sender=:1.6 -> dest=:1.3 serial=466 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Inhibit
   string "Gwenview"
   uint32 0
   string ""
   uint32 8
error sender=:1.3 -> dest=:1.6 error_name=org.gnome.SessionManager.GeneralError reply_serial=466
   string "Reason not specified"
##### end of DBUS-log #####


The reason for the error is, that Gwenview does not specify a *reason* for disabling the screensaver. knotificationrestrictions.cpp in the kdelibs does not allow this in general but leaves the reason variable blank (http://code.woboq.org/qt5/kf5/knotifications/src/knotificationrestrictions.cpp.html#KNotificationRestrictions::Private::reason) and appends the empty variable to the dbus-message (http://code.woboq.org/qt5/kf5/knotifications/src/knotificationrestrictions.cpp.html#113). The appended patch suggests to set the reason to "no_reason_specified" by default. Maybe a method to change the string from each application requesting to disable the screensaver could be added later (going_in_fullscreen_mode, viewing_slideshow, ...).

This is the piece of code which raises the error in the Gnome Session Manager: https://github.com/gcampax/gnome-session/blob/master/gnome-session/gsm-manager.c#L3269

With the applied patch to kdelibs, the DBUS-communication works as expected and the timeout does not occur anymore and Gwenview gets back the correct ID (1169992534 in this case) for disabling the screensaver.


##### begin DBUS-log #####
method call sender=:1.223 -> dest=org.freedesktop.ScreenSaver serial=56 path=/ScreenSaver; interface=org.freedesktop.ScreenSaver; member=Inhibit
   string "Gwenview"
   string "no_reason_specified"
method call sender=:1.6 -> dest=:1.3 serial=588 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Inhibit
   string "Gwenview"
   uint32 0
   string "no_reason_specified"
   uint32 8
signal sender=:1.3 -> dest=(null destination) serial=351 path=/org/gnome/SessionManager; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "org.gnome.SessionManager"
   array [
      dict entry(
         string "InhibitedActions"
         variant             uint32 8
      )
   ]
   array [
   ]
signal sender=:1.3 -> dest=(null destination) serial=352 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorAdded
   object path "/org/gnome/SessionManager/Inhibitor29"
method return sender=:1.3 -> dest=:1.6 reply_serial=588
   uint32 1169992534
method call sender=:1.4 -> dest=:1.21 serial=56 path=/org/gnome/Mutter/IdleMonitor/Core; interface=org.gnome.Mutter.IdleMonitor; member=RemoveWatch
   uint32 35
method call sender=:1.6 -> dest=org.freedesktop.DBus serial=589 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus',arg0=':1.223'"
method call sender=:1.6 -> dest=org.freedesktop.DBus serial=590 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
   string ":1.223"
method return sender=:1.6 -> dest=:1.223 reply_serial=56
   uint32 1169992534
method call sender=:1.6 -> dest=:1.21 serial=592 path=/org/gnome/Mutter/DisplayConfig; interface=org.freedesktop.DBus.Properties; member=Set
   string "org.gnome.Mutter.DisplayConfig"
   string "PowerSaveMode"
   variant       int32 0
method call sender=:1.21 -> dest=:1.3 serial=1073 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 16
method call sender=:1.21 -> dest=org.freedesktop.DBus serial=1074 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus',arg0=':1.4'"
method return sender=:1.21 -> dest=:1.4 reply_serial=56
method return sender=:1.3 -> dest=:1.21 reply_serial=1073
   boolean false
##### end of DBUS-log #####
Comment 8 Jose Gómez 2015-08-19 22:12:37 UTC
I am having this issue as well, using Ubuntu 15.04 with Cinnamon. Many other Ubuntu users have reported this too: https://bugs.launchpad.net/gwenview/+bug/1317616
Comment 9 Christoph Feck 2015-09-27 10:11:46 UTC
Thanks for the analysis Johannes. I suggest to submit the patch to https://git.reviewboard.kde.org/
Comment 10 Martin Klapetek 2015-12-29 20:54:36 UTC
Git commit 3f080d44af41d0158d7b5c51269449e78d5b128f by Martin Klapetek, on behalf of Johannes Stefan.
Committed on 29/12/2015 at 20:54.
Pushed by mklapetek into branch 'master'.

Set default non-empty reason for screen saver inhibition

Gnome Session Manager is unhappy when something tries to inhibit the
screensaver with no reason, so add a default reason to never inhibit
with an empty one.

This should fix Gwenview hanging when switching to fullscreen viewing in
non-Plasma DE's.

REVIEW: 125910
FIXED-IN: 5.18
CHANGELOG: Set default non-empty reason for screen saver inhibition;
should fix Gwenview hanging up when switching to fullscreen in non-
Plasma DE's

M  +1    -0    src/knotificationrestrictions.cpp

http://commits.kde.org/knotifications/3f080d44af41d0158d7b5c51269449e78d5b128f