mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
fix for wakeup count excessive.
This commit is contained in:
parent
76610709bd
commit
42b2f08398
13
pinxi
13
pinxi
|
@ -50,8 +50,8 @@ use POSIX qw(ceil uname strftime ttyname);
|
|||
## INXI INFO ##
|
||||
my $self_name='pinxi';
|
||||
my $self_version='3.3.30';
|
||||
my $self_date='2023-09-25';
|
||||
my $self_patch='01';
|
||||
my $self_date='2023-09-27';
|
||||
my $self_patch='02';
|
||||
## END INXI INFO ##
|
||||
|
||||
my ($b_pledge,@pledges);
|
||||
|
@ -36041,12 +36041,17 @@ sub process_power {
|
|||
}
|
||||
}
|
||||
|
||||
# note: seen instance in android where reading file hangs endlessly!!!
|
||||
# note: seen android instance where reading file wakeup_count hangs endlessly.
|
||||
# Some systems also report > 1 wakeup events per wakeup with
|
||||
# /sys/power/wakeup_count, thus, we are using /sys/power/suspend_stats/success
|
||||
# which does not appear to have that issue.
|
||||
sub get_wakeups {
|
||||
eval $start if $b_log;
|
||||
return if %risc;
|
||||
my ($wakeups);
|
||||
my $path = '/sys/power/wakeup_count';
|
||||
# this increments on suspend, but since you can't see it until wake, numbers
|
||||
# work.
|
||||
my $path = '/sys/power/suspend_stats/success';
|
||||
$wakeups = reader($path,'strip',0) if -r $path;
|
||||
eval $end if $b_log;
|
||||
return $wakeups;
|
||||
|
|
Loading…
Reference in a new issue