You are not logged in.

#1 2025-08-08 22:02:17

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 139
Website

[SOLVED] Batsignal updating extremely slow on charging and discharging

Hi guys! I recently installed BATSIGNAL. but it is kind of hard to use as when I use the command

batsignal -f 100 -p -n BAT1 -P sigma

(ignore the sigma that's just for testing. no notification appears when discharging or charging, can someone tell me what I did wrong
Edit: Batsignal seems to be broken
Solution: set batsignal interval to 5 sec

Last edited by Omarz2012 (2025-08-11 22:52:44)

Offline

#2 2025-08-09 07:30:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,176

Re: [SOLVED] Batsignal updating extremely slow on charging and discharging

Do you run a notification daemon?

notify-send sigma

Online

#3 2025-08-09 14:55:19

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 139
Website

Re: [SOLVED] Batsignal updating extremely slow on charging and discharging

seth wrote:

Do you run a notification daemon?

notify-send sigma

yes I run dunst

Offline

#4 2025-08-09 14:57:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,176

Re: [SOLVED] Batsignal updating extremely slow on charging and discharging

The question is whetehr  notify-send shows you a notification out of the same context where batsignal does not.

Online

#5 2025-08-09 15:07:43

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 139
Website

Re: [SOLVED] Batsignal updating extremely slow on charging and discharging

seth wrote:

The question is whetehr  notify-send shows you a notification out of the same context where batsignal does not.

noitfy-send works without a problem and also when I was testing I got one notification from batsignal about discharging before it going back to being broken

Offline

#6 2025-08-10 02:07:34

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 139
Website

Re: [SOLVED] Batsignal updating extremely slow on charging and discharging

update, trying to compile from source gives the error

cc -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Os -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -O1   -c -o main.o main.c
main.c: In function ‘main’:
main.c:133:19: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
  133 |   signal(SIGTERM, signal_handler);
      |                   ^~~~~~~~~~~~~~
      |                   |
      |                   void (*)(void)
In file included from main.c:21:
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
main.c:85:6: note: ‘signal_handler’ declared here
   85 | void signal_handler()
      |      ^~~~~~~~~~~~~~
/usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
main.c:134:18: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
  134 |   signal(SIGINT, signal_handler);
      |                  ^~~~~~~~~~~~~~
      |                  |
      |                  void (*)(void)
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
main.c:85:6: note: ‘signal_handler’ declared here
   85 | void signal_handler()
      |      ^~~~~~~~~~~~~~
/usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
make: *** [<builtin>: main.o] Error 1

Offline

#7 2025-08-10 07:02:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,176

Re: [SOLVED] Batsignal updating extremely slow on charging and discharging

Do you actually trigger changes and does "acpi -i" reflect them?
Does "batsignal -o" work?
nb that apparently by default it polls the battery every 60s - did you wait that long?

Online

#8 2025-08-10 17:29:03

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 139
Website

Re: [SOLVED] Batsignal updating extremely slow on charging and discharging

seth wrote:

Do you actually trigger changes and does "acpi -i" reflect them?
Does "batsignal -o" work?
nb that apparently by default it polls the battery every 60s - did you wait that long?

yup that was the solution, although can I make it that a change in charging status sends SIGUSR1

Offline

#9 2025-08-10 19:13:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,176

Re: [SOLVED] Batsignal updating extremely slow on charging and discharging

yup that was the solution

your OP edit wrote:

Batsignal seems to be broken

Err… what?
What is broken and what was the solution??

Online

#10 2025-08-10 21:09:09

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 139
Website

Re: [SOLVED] Batsignal updating extremely slow on charging and discharging

seth wrote:

yup that was the solution

your OP edit wrote:

Batsignal seems to be broken

Err… what?
What is broken and what was the solution??

broken by source code not compiling and solution was the check time

Offline

#11 2025-08-10 21:30:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,176

Re: [SOLVED] Batsignal updating extremely slow on charging and discharging

Ah, ok.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

See https://github.com/electrickite/batsign … main.c#L85 ?
That needs to be "void signal_handler(int)" but there may be more problems: https://github.com/electrickite/batsignal/issues/43
This has nothing to do w/ the behavior, though - just some non-standard-compliant code patterns recent compilers will be picker about.
The arch package hasn't be rebuilt since a year (and back then likely still used older, more lenient versions of gcc)

Online

Board footer

Powered by FluxBB