Notify-send not showing notifications

Hi
I experienced a problem with notify-send: it doesn't show any notification, not even with -t option or -u critical, like some in other forums suggested.
So i searched through the arch forum and arch wiki, but no luck at solving the problem.
I tried those steps to fix, but non of them seem working:

  • Executed DISPLAY=:0 notify-send "Hello"
  • Reinstalled libnotify: sudo pacman -Rnsd --nodeps libnotify && sudo pacman -S libnotify.
  • Installed notification-daemon
  • Tried to manually start the daemon, but it stops immmediatly:
/usr/lib/notification-daemon-1.0/notification-daemon start
/usr/lib/notification-daemon-1.0/notification-daemon
[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib/notification-daemon-1.0/notification-daemon
  • Installed notify-osd and started through /usr/lib/notify-osd/notify-osd
  • Changed kernel from linux-zen to linux-lts

I rebooted the system after every of those steps.

Immediatly after i executed the notify-send command i checked the output of journalctl -S -1m, but it does not seem to contain anything related to it

Here the output of garuda-inxi

System:
  Kernel: 5.18.16-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=beeac810-6fa9-439b-b319-67b3fabf4870 rw rootflags=subvol=@
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
    ibt=off
  Desktop: KDE Plasma v: 5.25.4 tk: Qt v: 5.15.5 info: latte-dock
    wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: HP product: HP Laptop 15-dw0xxx
    v: Type1ProductConfigId serial: <superuser required> Chassis: type: 10
    serial: <superuser required>
  Mobo: HP model: 85F0 v: 36.35 serial: <superuser required> UEFI: Insyde
    v: F.20 date: 11/25/2019
Battery:
  ID-1: BAT1 charge: 19.6 Wh (64.5%) condition: 30.4/41.9 Wh (72.4%)
    volts: 12.8 min: 11.6 model: Hewlett-Packard PABAS0241231 type: Li-ion
    serial: <filter> status: charging
CPU:
  Info: model: Intel Core i5-8265U bits: 64 type: MT MCP
    arch: Comet/Whiskey Lake note: check gen: core 8 built: 2018
    process: Intel 14nm family: 6 model-id: 0x8E (142) stepping: 0xC (12)
    microcode: 0xF0
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 816 high: 897 min/max: 400/3900 scaling:
    driver: intel_pstate governor: powersave cores: 1: 800 2: 833 3: 897 4: 805
    5: 801 6: 798 7: 800 8: 800 bogomips: 28800
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB
    filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel WhiskeyLake-U GT2 [UHD Graphics 620]
    vendor: Hewlett-Packard driver: i915 v: kernel arch: Gen-9.5
    process: Intel 14nm built: 2016-20 ports: active: eDP-1
    empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:3ea0
    class-ID: 0300
  Device-2: NVIDIA GM108M [GeForce MX110] vendor: Hewlett-Packard
    driver: nvidia v: 515.65.01 alternate: nouveau,nvidia_drm non-free: 515.xx+
    status: current (as of 2022-07) arch: Maxwell code: GMxxx
    process: TSMC 28nm built: 2014-19 pcie: gen: 1 speed: 2.5 GT/s lanes: 4
    link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.0 chip-ID: 10de:174e
    class-ID: 0302
  Device-3: Quanta HP TrueVision HD Camera type: USB driver: uvcvideo
    bus-ID: 1-5:3 chip-ID: 0408:5365 class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia gpu: i915
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 model: AU Optronics 0x61ed built: 2018 res: 1920x1080
    hz: 60 dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64")
    diag: 395mm (15.5") ratio: 16:9 modes: 1920x1080
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (WHL GT2) v: 4.6 Mesa
    22.1.4 direct render: Yes
Audio:
  Device-1: Intel Cannon Point-LP High Definition Audio
    vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
    chip-ID: 8086:9dc8 class-ID: 0403
  Sound Server-1: ALSA v: k5.18.16-zen1-1-zen running: yes
  Sound Server-2: PulseAudio v: 16.1 running: no
  Sound Server-3: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: speed: Unknown
    lanes: 63 link-max: gen: 6 speed: 64 GT/s port: 4000 bus-ID: 02:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter
    vendor: Hewlett-Packard driver: rtw_8821ce v: N/A modules: rtw88_8821ce
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 03:00.0
    chip-ID: 10ec:c821 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
    v: 3.0 port: 6060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A
    class-ID: 0104
Drives:
  Local Storage: total: 476.94 GiB used: 71.41 GiB (15.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel model: SSDPEKNW512G8H
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: HPS0
    temp: 36.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 140 GiB size: 140 GiB (100.00%) used: 71.33 GiB (51.0%)
    fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 76.3 MiB
    (29.8%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 140 GiB size: 140 GiB (100.00%) used: 71.33 GiB
    (51.0%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-4: /var/log raw-size: 140 GiB size: 140 GiB (100.00%) used: 71.33 GiB
    (51.0%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-5: /var/tmp raw-size: 140 GiB size: 140 GiB (100.00%) used: 71.33 GiB
    (51.0%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 7.65 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 52.0 C pch: 51.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 258 Uptime: 37m wakeups: 1 Memory: 7.65 GiB used: 4.12 GiB
  (53.8%) Init: systemd v: 251 default: graphical tool: systemctl
  Compilers: gcc: 12.1.1 clang: 14.0.6 Packages: pacman: 1616 lib: 396
  flatpak: 0 Shell: fish v: 3.5.1 default: Bash v: 5.1.16 running-in: yakuake
  inxi: 3.3.20
e[1;34mGaruda (2.6.5-1):e[0m
e[1;34m  System install date:e[0m     2022-02-06
e[1;34m  Last full system update:e[0m 2022-08-08 e[1;31m↻
e[1;34m  Is partially upgraded:  e[0m No
e[1;34m  Relevant software:      e[0m tlp NetworkManager
e[1;34m  Windows dual boot:      e[0m Probably (Run as root to verify)
e[1;34m  Snapshots:              e[0m Timeshift
e[1;34m  Failed units:           e[0m bluetooth-autoconnect.service 

If i missed something let me know

Icon is missing, IDK, did not find where this “icons” are placed (/?).

image

I tried to run the same command as you did, but the notification does not appear :confused:
It's like i've never run the command


I change to KDE now, moment. :slight_smile:

Work, include Icon.

1 Like

You have obviously done some system modifications, that broke notifications.
We should probably start from this.
What have you done? :laughing:

Notifications, especially in major DEs, work OOTB perfectly fine.

In your troubleshooting, it seems you messed up the system worse… adding more conflicting dbus services, also adding a custom one.

Read this first.

I think a symlink might be a workaround.
To fix properly, you should find the conflict.

Please, answer the 1st question, before the rest.

1 Like

Thank you.
Those are the changes:

  • Rollbacked xampp in a non-standard manner (5 months ago):
    Basically with a new version of xampp i had a problem, so, in order to avoid to rollback everything (i noticed the bug 2 weeks later, just wanted to avoid breaking the system) i picked up the old xampp folder from timeshift and replaced it with the existing one.
    Then went to /var/lib/pacman/local/xampp-8.1.4-1/ and rename it /var/lib/pacman/local/xampp-8.1.2-1/. In the end changed the version of xampp displayed by pacman by editing the line %VERSION% in /var/lib/pacman/local/xampp-8.1.2-1/desc

  • Modified the file in /home/dadezana/netbeans-12.6/netbeans/etc/netbeans.conf because netbeans wasn't finding the jdk

  • Edited kvantum config file

  • Uninstalled some packages installed with pip and reinstalled them with pacman to avoid conflict when upgrading the system (pacman found an alread existing file not installed by itself (pip did), and refused to substitute with the new one)

  • Edited the force shutdown time in a grub file from 90sec to 6sec

I think that's it, i don't remember anything else now. If someone pops into my mind I'll write it.

I uninstalled all the packages installed during the troubleshooting except notification-daemon.
Then i read the link you sent me and tried to do like the wiki said:

Those are my notification handlers plus the last boot logs about notifications:

Unfortunatelynotify-send still doesn't work.

I also tried to write a python script that show notifications, but non of the library works.
Same applies to kdialog's passive pop ups. They does not show. Other options work fine (--msgbox, --password etc..).

The funny thing is that libnotify is required by discord, and it's able to send me notifications. I assume it uses notify-send too, right?

Of all modifications, the only relevant, on which you give no other detail. Already feeling guilty? :rofl:

Which packages?

Check service info:

busctl --user status org.freedesktop.Notifications
2 Likes

Packages installed with pacman instead of pip:

python-aiohttp 3.8.1-4
python-awesometkinter 2021.11.8-1
python-beautifulsoup4 4.11.1-1
python-cffi 1.15.1-1
python-docopt 0.6.2-11
python-easygui 0.98.1-8
python-notify2 0.3.1-7
python-pip 22.2.2-1
python-pyaudio 0.2.11-8
python-pycryptodome 3.15.0-1
python-pygments 2.12.0-1
python-qrcode 7.3.1-1
python-sympy 1.10.1-1
python-websockets 10.3-1
python-yaml
$ busctl --user status org.freedesktop.Notifications

PID=2066
PPID=1427
TTY=n/a
UID=1000
EUID=1000
SUID=1000
FSUID=1000
OwnerUID=1000
GID=1000
EGID=1000
SGID=1000
FSGID=1000
SupplementaryGIDs=108 973 985 991 994 998 1000 1003
Comm=latte-dock
Exe=/usr/bin/latte-dock
CommandLine=/usr/bin/latte-dock
CGroup=/user.slice/user-1000.slice/[email protected]/app.slice/app-org.kde.latte\[email protected]
[email protected]
Slice=user-1000.slice
UserUnit=app-org.kde.latte\[email protected]
UserSlice=app.slice
Session=n/a
AuditLoginUID=1000
AuditSessionID=3
UniqueName=:1.43
EffectiveCapabilities=
PermittedCapabilities=
InheritableCapabilities=
BoundingCapabilities=cap_chown cap_dac_override cap_dac_read_search 
        cap_fowner cap_fsetid cap_kill cap_setgid 
        cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service 
        cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock 
        cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot 
        cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot 
        cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config 
        cap_mknod cap_lease cap_audit_write cap_audit_control 
        cap_setfcap cap_mac_override cap_mac_admin cap_syslog 
        cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon 
        cap_bpf cap_checkpoint_restore

$ systemctl --user status org.freedesktop.Notifications
Unit org.freedesktop.Notifications.service could not be found.

Just trying to avoid messing up things more :joy:

Now i’ll try to restore the oldest snapshot taken with timeshift to check if notify-send works.
If not, i can try reinstalling kde. Or it’s better to reinstall only some packages of kde? (such as libevent, knotifications, knotifyconfig, libnotify , startup-notification )

I have no idea how Latte, or any dock would be appointed as Notifications client. Maybe because of included applets?..
In any case, it seems wrong, until someone more knowledgeable explains.

?? :person_shrugging:

Edit:
Maybe link notification service to kde equivalent, instead of that you did?

/usr/share/dbus-1/services/org.kde.plasma.Notifications.service
1 Like

Update: tried to restore snapshot with timeshift

and reinstalled all the application
Does not work
Maybe, later in time, i’ll reinstall the os.

Do you mean copying org.kde.plasma.Notifications.service and change its name to org.freedesktop.Notifications.service?

org.kde.plasma.Notifications.service content:

[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/bin/plasma_waitforname org.freedesktop.Notifications

this might be a stupid question, but its just because i am out of ideas:

You do have the notification widget on the system tray or anywhere else, right?

as the dbus-service, you should remove it. the /usr/share/dbus-1/services/org.kde.plasma.Notifications.service is the proper plasma notification service, and its owned by the plasma-workspace package.

what you should do, case you want to select another notification daemon, is link the proper notification service file into ~/.local/share/dbus-1/services.

2 Likes

If you mean this, yes
notification_widget
Otherwise, i don’t have any other notification widget

Can’t remove that

ln -s /usr/lib/notification-daemon-1.0/notification-daemon org.freedesktop.Notifications.service
however the problem seems to be the activation of that daemon, it always fail.

Thanks for help, i think i’ll just reinstall the os and everything will be good again. Next time i’ll check if notify-send works after i install some applications or change something into the system.
If not, i’ll ask to reopen this thread and i’ll write down what i did to not make it working (so if someone has the same problem can maybe fix it)

1 Like

Linking is not the same, so I mean what I said.
This:

Or just delete the existing local link, if it exists (in ~/.local/share/dbus-1/services).

This is a panic solution for such a small problem.
Why don’t you just check if it happens to every user? Create a new user account and login to it. Does the same happen?
What is this saying?:

ls -l .local/share/dbus-1/services
1 Like

I checked the org.kde.plasma.Notifications.service file, and i noticed its name is org.freedesktop.Notifications

[D-BUS Service]
Name=org.freedesktop.Notifications
...

So i createad a file named org.custom.Notifications.service in .local/share/dbus-1/services/:

[D-BUS Service]
Name=org.custom.Notifications
Exec=/usr/lib/notification-daemon-1.0/notification-daemon

It does not seem to be active, and busctl status org.custom.Notifications give this error:

Failed to get credentials: No such device or address

Same if i put the file in /usr/share/dbus-1/services/ o link ln -s /usr/lib/notification-daemon-1.0/notification-daemon in those directories
Maybe am i doing something wrong

I also noticed this in system logs:

ago 14 19:08:30 dadezana-garuda dbus-daemon[1542]: [session uid=1000 pid=1542] Activating service name='org.freedesktop.Notifications' requested by ':1.29' (uid=1000 pid=2058 comm="/usr/lib/kdeconnectd")
ago 14 19:08:30 dadezana-garuda dbus-daemon[1542]: [session uid=1000 pid=1542] Activated service 'org.freedesktop.Notifications' failed: Failed to execute program org.freedesktop.Notifications: Exec format error
ago 14 19:08:30 dadezana-garuda kdeconnectd[2058]: kdeconnect.core: Could not query capabilities from notifications server
ago 14 19:08:30 dadezana-garuda dbus-daemon[619]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service' requested by ':1.61' (uid=1000 pid=2087 comm="/usr/lib/DiscoverNotifier")
ago 14 19:08:30 dadezana-garuda dbus-daemon[1542]: [session uid=1000 pid=1542] Activating service name='org.freedesktop.Notifications' requested by ':1.34' (uid=1000 pid=2056 comm="/usr/bin/flameshot")
ago 14 19:08:30 dadezana-garuda dbus-daemon[1542]: [session uid=1000 pid=1542] Activated service 'org.freedesktop.Notifications' failed: Failed to execute program org.freedesktop.Notifications: Exec format error

Idk if the problem is into the service file (the one already there) or in those 2 application (flameshot and kdeconnectd), but kdeconnect app just sent me one notification.
Running busctl --user status org.freedesktop.Notifications it seems active:

PID=2059
PPID=1429
TTY=n/a
UID=1000
EUID=1000
SUID=1000
FSUID=1000
OwnerUID=1000
GID=1000
EGID=1000
SGID=1000
FSGID=1000
SupplementaryGIDs=108 973 985 991 994 998 1000 1003
Comm=latte-dock
Exe=/usr/bin/latte-dock
CommandLine=/usr/bin/latte-dock
CGroup=/user.slice/user-1000.slice/[email protected]/app.slice/app-org.kde.latte\[email protected]
[email protected]
Slice=user-1000.slice
UserUnit=app-org.kde.latte\[email protected]
UserSlice=app.slice
Session=n/a
AuditLoginUID=1000
AuditSessionID=3
UniqueName=:1.42
EffectiveCapabilities=
PermittedCapabilities=
InheritableCapabilities=
BoundingCapabilities=cap_chown cap_dac_override cap_dac_read_search
cap_fowner cap_fsetid cap_kill cap_setgid
cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service
cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock
cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot
cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot
cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config
cap_mknod cap_lease cap_audit_write cap_audit_control
cap_setfcap cap_mac_override cap_mac_admin cap_syslog
cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon
cap_bpf cap_checkpoint_restore

Dirs dbus-1/ and dbus-1/services does not exist on both users

Tested on another user i have, not working. Since i created it 4/5 months ago i created a new one: it works!
Meanwhile I try to apply some changes to make it similar to other users and see what happen. Even because idk what files to look for :sweat_smile:

1 Like

This is proof you are actually destroying notifications yourself, or a program you use does it.

Changing system settings randomly, is a great way to learn by mistake.
I have been doing it all the time.
I wish you luck with your gaining knowledge journey!

Tell us what was finally the problem, so we share knowledge :wink:

3 Likes

Thank you very much! :pray:

i really appreciate your help and your patience :muscle:

Of course! I’ll continue trying to modify things in order to find it out

1 Like

I found the error!
It was something really stupid...

I went to Settings -> Notifications -> Other Applications
Show popups was unflagged and this prevented notifications from showing up

3 Likes

Post that as text, please.

1 Like

Do you mean remove the image and instead explaining the steps?

Deleting the image does nothing now.
A text as a solution is more helpful in search engines.

3 Likes