Summary: | Powerdevil does not act (e.g. suspend, dim) when switching to battery mode | ||
---|---|---|---|
Product: | [Plasma] Powerdevil | Reporter: | Wilhelm Eger <wilhelm.eger> |
Component: | general | Assignee: | Plasma Development Mailing List <plasma-devel> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | kde |
Priority: | NOR | ||
Version: | 5.4.3 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/powerdevil/6b4ffe32367a6413d8c270480445a4955d63e71f | Version Fixed In: | 5.5.0 |
Sentry Crash Report: | |||
Attachments: | Patch to reenable the automatic brightness control due to mixed up absolute/relative values |
Description
Wilhelm Eger
2015-11-21 12:46:17 UTC
Can you kill kded5 and run it from console? PowerDevil should print a debug message when it's switching profiles or changes brightness. powerdevil: powerdevil: Can't contact ck powerdevil: We are now into activity "9324fd99-91a1-41e2-a00b-7c23f09aaa1e" powerdevil: () () powerdevil: () () powerdevil: Loading profile for unplugged AC powerdevil: Activity is not forcing a profile powerdevil: powerdevil: Loading timeouts with 120000 Created alarm 8388617 Created alarm 8388618 Created alarm 8388619 powerdevil: Profiles: "Battery" "AC" powerdevil: Screen brightness value: 9 powerdevil: Not changing brightness, the current one is lower and the profile is more conservative Created alarm 8388620 Created alarm 8388621 Created alarm 8388622 Created alarm 8388623 powerdevil: powerdevil: Can't contact ck powerdevil: We are now into activity "9324fd99-91a1-41e2-a00b-7c23f09aaa1e" powerdevil: () () powerdevil: () () powerdevil: Loading profile for plugged AC powerdevil: Activity is not forcing a profile powerdevil: powerdevil: Loading timeouts with 300000 Created alarm 8388624 Created alarm 8388625 Created alarm 8388626 powerdevil: Profiles: "AC" "Battery" powerdevil: Screen brightness value max: 9 powerdevil: set screen brightness value: 9 Created alarm 8388627 Created alarm 8388628 powerdevil: Udev device changed "/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/acpi_video0" "/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/acpi_video0" above was the laptop, this is the wetab powerdevil: powerdevil: Can't contact ck powerdevil: We are now into activity "87d6f93d-1ae5-4285-9be2-762865f86d8e" powerdevil: () () powerdevil: () () powerdevil: Loading profile for unplugged AC powerdevil: Activity is not forcing a profile powerdevil: powerdevil: Loading timeouts with 120000 Created alarm 8388618 Created alarm 8388619 Created alarm 8388620 Created alarm 8388621 Created alarm 8388622 powerdevil: Profiles: "Battery" "AC" powerdevil: Screen brightness value: 15 powerdevil: Not changing brightness, the current one is lower and the profile is more conservative Created alarm 8388623 Created alarm 8388624 powerdevil: powerdevil: Can't contact ck powerdevil: We are now into activity "87d6f93d-1ae5-4285-9be2-762865f86d8e" powerdevil: () () powerdevil: () () powerdevil: Loading profile for plugged AC powerdevil: Activity is not forcing a profile powerdevil: powerdevil: Loading timeouts with 300000 Created alarm 8388625 Created alarm 8388626 Created alarm 8388627 powerdevil: Profiles: "AC" "Battery" powerdevil: Screen brightness value max: 15 powerdevil: set screen brightness value: 15 Created alarm 8388628 Created alarm 8388629 powerdevil: Screen brightness value: 15 powerdevil: Brightness changed!! powerdevil: Screen brightness value: 15 powerdevil: Brightness changed!! OK so we can see that it switches profiles when plugging in/out the AC. I don't see anything particularly noteworthy broken in the output :/ powerdevil: Screen brightness value: 9 powerdevil: Not changing brightness, the current one is lower and the profile is more conservative My value for Battery Mode is 60 according to the config file. But 60 means 60 percent. Could it be that powerdevil tries to set 60 instead of 60 percent? In that case it would never be able to switch the brightness as the value is always lower (9<60). Maybe the calculation for the brightness level for the AC mode is correct, but for the battery mode is somehow weird and uses 60 as absolute value? I tried to set my battery brightness to 6 to see if it gets changed, but then the screen went black and i had to restart. Thought so too. Could be. I'll have a look. that doesn't explain broken auto suspend Created attachment 95654 [details]
Patch to reenable the automatic brightness control due to mixed up absolute/relative values
This patch should deal with the problem of absolute and relative values being compared.
Btw. autosuspend works for me on my laptop, so the bug on the wetab might be related to the kidletime library as you mentioned in the reply to the blog post above. I will have a look into this, too. Yes, we were right. Thanks for your help in investigating this! The code checks for if (m_defaultValue > brightness()) with m_defaultValue being the saved config value from 0-100 whereas brightness() is the absolute value from 0 to whatever the driver reports as maximum. I'll fix this. Please give a try to: https://git.reviewboard.kde.org/r/126138/ I cannot log in to the review board due to missing KDE credentials. Also, the patch does not apply to powerdevil 5.4.3, which version I am currently using. Thus I changed the 5.4.3 powerdevil accordingly and it works as expected. However, the keyboard brightness could not be verified as I do not have keyboard leds. You might consider changing absoluteBrightnessValue to keyboardabsoluteBrightnessValue for the keyboardbrightnesscontrol.cpp to keep the naming consistent. Git commit 6b4ffe32367a6413d8c270480445a4955d63e71f by Kai Uwe Broulik. Committed on 23/11/2015 at 14:02. Pushed by broulik into branch 'Plasma/5.5'. Use absolute brightness value in conservative check when loading profile There's a check that ensures the brightness isn't ramped up when we switch to a more conservative profile and then current brightness is lower. However, it compared the raw hardware value with the config percentage value. FIXED-IN: 5.5.0 REVIEW: 126138 M +7 -6 daemon/actions/bundled/brightnesscontrol.cpp M +6 -6 daemon/actions/bundled/keyboardbrightnesscontrol.cpp http://commits.kde.org/powerdevil/6b4ffe32367a6413d8c270480445a4955d63e71f *** Bug 355732 has been marked as a duplicate of this bug. *** |