laptop_mode gets executed twice on (un)plug events
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
laptop-mode-tools (Ubuntu) |
New
|
Low
|
Unassigned |
Bug Description
I have just install laptop-mode-tools, and noticed that `/usr/sbin/
gets executed twice when (un)plugging the laptop:
Aug 27 04:29:05 host laptop-mode: Determining power state from /sys/class/
Aug 27 04:29:05 host laptop-mode: Determining power state from /sys/class/
Aug 27 04:29:05 host laptop-mode: Not trying other options, already found a power supply.
Aug 27 04:29:05 host laptop-mode: Not trying other options, already found a power supply.
Aug 27 04:29:05 host laptop-mode: Battery level polling is disabled.
Aug 27 04:29:05 host laptop-mode: Battery level polling is disabled.
Aug 27 04:29:05 host laptop-mode: Prelim lock acquisition on descriptor 8 with pid 21553
Aug 27 04:29:05 host laptop-mode: Couldn't acquire prelim lock on descriptor 8 with pid 21554
Aug 27 04:29:05 host laptop-mode: Prelim lock acquisition on descriptor 9 with pid 21553
Aug 27 04:29:05 host laptop-mode: Couldn't acquire prelim lock on descriptor 9 with pid 21554
That's not really a problem, since the second instance will then recognize that
nothing needs to get changed in the end:
Aug 27 04:29:06 host laptop-mode: Laptop mode
Aug 27 04:29:06 host laptop-mode: Checking if desired state is different from current state.
Aug 27 04:29:06 host laptop-mode: enabled, not active [unchanged]
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: laptop-mode-tools 1.64-1ubuntu1
ProcVersionSign
Uname: Linux 3.13.0-34-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.3
Architecture: amd64
CurrentDesktop: GNOME
Date: Wed Aug 27 04:33:12 2014
InstallationDate: Installed on 2012-05-28 (820 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
PackageArchitec
SourcePackage: laptop-mode-tools
UpgradeStatus: Upgraded to trusty on 2014-05-01 (117 days ago)
mtime.conffile.
On Wednesday 27 August 2014 08:07 AM, Daniel Hahler wrote: laptop_ mode` power_supply/ AC/online. power_supply/ AC/online.
> I have just install laptop-mode-tools, and noticed that `/usr/sbin/
> gets executed twice when (un)plugging the laptop:
>
> Aug 27 04:29:05 host laptop-mode: Determining power state from /sys/class/
> Aug 27 04:29:05 host laptop-mode: Determining power state from /sys/class/
> Aug 27 04:29:05 host laptop-mode: Not trying other options, already found a power supply.
> Aug 27 04:29:05 host laptop-mode: Not trying other options, already found a power supply.
> Aug 27 04:29:05 host laptop-mode: Battery level polling is disabled.
> Aug 27 04:29:05 host laptop-mode: Battery level polling is disabled.
> Aug 27 04:29:05 host laptop-mode: Prelim lock acquisition on descriptor 8 with pid 21553
> Aug 27 04:29:05 host laptop-mode: Couldn't acquire prelim lock on descriptor 8 with pid 21554
> Aug 27 04:29:05 host laptop-mode: Prelim lock acquisition on descriptor 9 with pid 21553
> Aug 27 04:29:05 host laptop-mode: Couldn't acquire prelim lock on descriptor 9 with pid 21554
>
> That's not really a problem, since the second instance will then recognize that
> nothing needs to get changed in the end:
>
> Aug 27 04:29:06 host laptop-mode: Laptop mode
> Aug 27 04:29:06 host laptop-mode: Checking if desired state is different from current state.
> Aug 27 04:29:06 host laptop-mode: enabled, not active [unchanged]
This must be something else, given the fact that the timestamps are
same. Perhaps there are 2 logging services logging at the same time.
For LMT, Only 1 invocation of laptop-mode-tools is allowed. All further
invocations will find the lock acquired and just be ignored until the
previous acquisition of the lock is released.
-- www.researchut. com
Ritesh Raj Sarraf
RESEARCHUT - http://
"Necessity is the mother of invention."