Comments (7)
it does not stop at the error, but another one :)
i try your tool on a normal desktop without battery. But i have a wireless mouse and keyboard.
i would be interested in switching power configurations on desktop depending on temperature (later), specified running processes and the current workload (later)
i get the error:
Traceback (most recent call last):
File "/usr/bin/powerplan", line 10, in
import status
File "/opt/powerplan/src/status.py", line 9, in
import powersupply
File "/opt/powerplan/src/powersupply.py", line 123, in
CURRENT_NOW = BAT.with_name('current_now')
AttributeError: 'NoneType' object has no attribute 'with_name'
with your new powersupply branch i get:
Traceback (most recent call last):
File "/usr/bin/powerplan", line 10, in
import status
File "/opt/powerplan/src/status.py", line 9, in
import powersupply
File "/opt/powerplan/src/powersupply.py", line 313, in
AC, BAT = power_supply_detection()
File "/opt/powerplan/src/powersupply.py", line 266, in power_supply_detection
return ACAdapter(ac_path), Battery(bat_path)
File "/opt/powerplan/src/powersupply.py", line 42, in init
self.name = path.name
AttributeError: 'NoneType' object has no attribute 'name'
in /sys/class/power_supply/
are my wireless mouse/keyboard
hidpp_battery_0
hidpp_battery_1
content of hidpp_battery_0
==> /sys/class/power_supply/hidpp_battery_0/capacity_level <==
Full
==> /sys/class/power_supply/hidpp_battery_0/manufacturer <==
Logitech
==> /sys/class/power_supply/hidpp_battery_0/model_name <==
MX Keys Wireless Keyboard
==> /sys/class/power_supply/hidpp_battery_0/online <==
1
==> /sys/class/power_supply/hidpp_battery_0/scope <==
Device
==> /sys/class/power_supply/hidpp_battery_0/status <==
Discharging
==> /sys/class/power_supply/hidpp_battery_0/type <==
Battery
==> /sys/class/power_supply/hidpp_battery_0/uevent <==
POWER_SUPPLY_NAME=hidpp_battery_0
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_SCOPE=Device
POWER_SUPPLY_MODEL_NAME=MX Keys Wireless Keyboard
POWER_SUPPLY_MANUFACTURER=Logitech
POWER_SUPPLY_CAPACITY_LEVEL=Full
maybe /sys/class/power_supply/hidpp_battery_0/scope = Device ?
from powerplan.
This works well. :)
It switches profiles, if i use triggerapps.
from powerplan.
Thanks for reporting! It should be fixed now.
from powerplan.
Thanks for your detailed response! Your devices' batteries are filtered out by name, the issue lies in an oversight when creating some needed paths without a battery present. This problem won't exist with the changes in the powersupply branch but it is still work in progress and not ready for testing. In the meantime, I added a fix for this in the main branch.
from powerplan.
I thought it'd take longer, the powersupply branch should be ready for merging. I'd be grateful If you could test it 🤖
from powerplan.
i get:
Traceback (most recent call last):
File "/usr/bin/powerplan", line 10, in
import status
File "/opt/powerplan/src/status.py", line 24, in
Policies:\t\t{', '.join(CPU.policies)}
AttributeError: 'CPUSpec' object has no attribute 'policies'
from powerplan.
Thank you for being patient. You're not only the first person reporting issues on a desktop pc but also the first using a cpufreq driver. My only setup is literally the opposite, so you reporting this chain of problems is of great help! 🤗
The needed changes are implemented in the main branch now 👍
from powerplan.
Related Issues (10)
- Turb doesn't turn off after laptop unplugged from power HOT 31
- Module import issue after installing conda HOT 4
- There should be a "balanced" policy! HOT 5
- GUI HOT 13
- Issues with using arguments with powerplan HOT 12
- powerplan -s shows a different battery policy than what's set in powerplan.conf HOT 27
- switch between cpu power configurations depending on the current workload HOT 4
- AttributeError: 'Battery' object has no attribute 'charge_now' HOT 2
- Is it possible to integrate powerplan into KDE's panel and settings? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerplan.