! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-power-manager - notifications timeout is hardcoded / not managed by xfc...
Status:
RESOLVED: MOVED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Devuan 2019-05-25 23:48:36 CEST
Notifications time out values are hard coded into the code when this should be (?) handled by the 'dissapear after' value setting in xfce4-notifyd. 

See:

https://git.xfce.org/xfce/xfce4-power-manager/tree/src/xfpm-battery.c#n189

[code]
  xfpm_notify_show_notification (battery->priv->notify,
				   _("Power Manager"),
				   message,
				   xfpm_battery_get_icon_name (battery),
				   8000,
				   XFPM_NOTIFY_NORMAL);
[/code]

and:

[code]
https://git.xfce.org/xfce/xfce4-power-manager/tree/src/xfpm-power.c#n354

    xfpm_notify_show_notification (power->priv->notify,
				   _("Power Manager"),
				   error,
				   icon_name,
				   10000,
				   XFPM_NOTIFY_CRITICAL);
[/code]

Pertinent data:

uname -a
Linux devuan 4.9.0-9-686-pae #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) i686 GNU/Linux

---

apt-cache policy xfce4-power-manager
xfce4-power-manager:
  Installed: 1.4.1-1+devuan1.1
  Candidate: 1.4.1-1+devuan1.1
  Version table:
 *** 1.4.1-1+devuan1.1 500
        500 http://deb.devuan.org/merged ascii/main i386 Packages
        100 /var/lib/dpkg/status

---

xfce4-power-manager -V
Xfce Power Manager 1.4.1

Part of the Xfce Goodies Project
http://goodies.xfce.org

Licensed under the GNU GPL.

---

xfce4-notifyd-config -V
xfce4-notifyd-config 0.3.4
Copyright (c) 2010 Brian Tarricone <bjt23@cornell.edu>
Copyright (c) 2010 Jérôme Guelfucci <jeromeg@xfce.org>
Copyright (c) 2016 Ali Abdallah <ali@xfce.org>code
Copyright (c) 2016 Simon Steinbeiß <simon@xfce.org>
Released under the terms of the GNU General Public License, version 2
Please report bugs to http://bugzilla.xfce.org/enter_bug.cgi?product=Xfce4-notifyd.

---

apt-cache policy xfce4-notifyd 
xfce4-notifyd:
  Installed: 0.3.4-1
  Candidate: 0.3.4-1
  Version table:
 *** 0.3.4-1 500
        500 http://deb.devuan.org/merged ascii/main i386 Packages
        100 /var/lib/dpkg/status

---

Thanks in advance.

D.
Comment 1 Simon Steinbeiss editbugs 2019-05-27 00:25:57 CEST
The hardcoded times in xfce4-power-manager should be irrelevant (and only seen as fallback), xfce4-notifyd ignores them and uses the timeout configured by the user instead for "normal" notifications and sets "critical" notifications to never expire.
Comment 2 ToZ editbugs 2019-05-29 03:01:21 CEST
Simon, unfortunately, this isn't what we are seeing with the power-manager. If we set the disappear value in xfce4-notifyd to 1 second, all but the power-manager honours this value. It continues to use 8 or 10 second disappear values.

As a test case:
1. Set "disappear after" in xfce4-notifyd-settings to 1 second
2. Test "notify-send test test". Note that the bubble disappears after 1 second
3. To test the power-manager bubble, I unplug (or plug) the laptop and get the notification about the laptop running on battery power or charging and it stays on the screen for 8 seconds.

I'm testing this on the latest builds from git, but have replicated it on Arch which uses a combination of 4.12 and 4.13 components.
Comment 3 ToZ editbugs 2019-05-29 03:05:14 CEST
Here is the debug output (though nothing specific to notifications):

TRACE[xfpm-dpms.c:72] xfpm_dpms_set_timeouts(): Settings dpms: standby=300 suspend=0 off=600

TRACE[xfpm-dpms.c:343] xfpm_dpms_set_on_battery(): dpms on battery TRUE
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 12, upower_icon battery-full-symbolic
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 20, upower_icon battery-full-charged-symbolic

(xfce4-power-manager:9661): GLib-CRITICAL **: 21:03:28.484: Source ID 54 was not found when attempting to remove it
TRACE[xfpm-dpms.c:72] xfpm_dpms_set_timeouts(): Settings dpms: standby=600 suspend=0 off=900

TRACE[xfpm-dpms.c:343] xfpm_dpms_set_on_battery(): dpms on battery FALSE
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Timeout: 10
Comment 4 ToZ editbugs 2019-05-29 03:14:47 CEST
In src/xfpm-notify.c, line 216, timeout value is evaluated and set from previous hardcoded value. Deleting this condition, the notification bubbles work as per xfce4-notifyd settings.

Will upload patch.
Comment 5 ToZ editbugs 2019-05-29 03:15:33 CEST
Created attachment 8593 
[PATCH] Make power-manager follow notifyd timeout settings
Comment 6 ToZ editbugs 2019-05-29 03:22:44 CEST
Created attachment 8594 
[PATCH] Make power-manager follow notifyd timeout settings Option2

An optional patch that does not delete the set_timeout code but rather sets all timeout calls to 0 which are ignored by the conditional.
Comment 7 Git Bot editbugs 2020-05-27 01:46:00 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org'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.xfce.org/xfce/xfce4-power-manager/-/issues/57.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #15470

Reported by:
Devuan
Reported on: 2019-05-25
Last modified on: 2020-05-27

People

Assignee:
Ali Abdallah
CC List:
4 users

Version

Attachments

Additional information