Problem with KDE power management (powerdevil)

Hello people, I installed Manjaro KDE in an old laptop I had with kubuntu and I am having an annoying issue with the power management.

First of all, these are my system specs

System:
  Host: arrakis Kernel: 4.19.1-1-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 8.2.1 Desktop: KDE Plasma 5.14.3 Distro: Manjaro Linux 
Machine:
  Type: Laptop System: ASUSTeK product: K53SD v: 1.0 serial: <root required> 
  Mobo: ASUSTeK model: K53SD v: 1.0 serial: <root required> 
  UEFI: American Megatrends v: K53SD.208 date: 08/10/2012 
Battery:
  ID-1: BAT0 charge: 40.1 Wh condition: 42.2/59.4 Wh (71%) 
  model: ASUSTek K53--54 status: Unknown 
CPU:
  Topology: Quad Core model: Intel Core i7-2670QM bits: 64 type: MT MCP 
  arch: Sandy Bridge rev: 7 L2 cache: 6144 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 35129 
  Speed: 798 MHz min/max: 800/3100 MHz Core speeds (MHz): 1: 798 2: 798 3: 798 
  4: 797 5: 798 6: 798 7: 798 8: 798 
Graphics:
  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics 
  vendor: ASUSTeK driver: i915 v: kernel bus ID: 00:02.0 
  Device-2: NVIDIA GF119M [GeForce 610M] driver: N/A bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.3 driver: intel resolution: 1366x768~60Hz 
  OpenGL: renderer: Mesa DRI Intel Sandybridge Mobile v: 3.3 Mesa 18.2.4 
  direct render: Yes 
Audio:
  Device-1: Intel 6 Series/C200 Series Family High Definition Audio 
  vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  Sound Server: ALSA v: k4.19.1-1-MANJARO 
Network:
  Device-1: Intel Centrino Wireless-N 100 driver: iwlwifi v: kernel port: e040 
  bus ID: 03:00.0 
  IF: wlp3s0 state: up mac: 78:92:9c:76:df:ae 
  Device-2: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet vendor: ASUSTeK 
  driver: atl1c v: 1.0.1.1-NAPI port: 9000 bus ID: 05:00.0 
  IF: enp5s0 state: down mac: 54:04:a6:4d:7a:31 
Drives:
  Local Storage: total: 298.09 GiB used: 134.10 GiB (45.0%) 
  ID-1: /dev/sda vendor: Hitachi model: HTS543232A7A384 size: 298.09 GiB 
Partition:
  ID-1: / size: 46.22 GiB used: 16.78 GiB (36.3%) fs: ext4 dev: /dev/sda3 
  ID-2: /home size: 238.84 GiB used: 117.31 GiB (49.1%) fs: ext4 
  dev: /dev/sda6 
  ID-3: swap-1 size: 7.63 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda5 
Sensors:
  System Temperatures: cpu: 55.0 C mobo: N/A 
  Fan Speeds (RPM): cpu: 2400 
Info:
  Processes: 228 Uptime: 26m Memory: 5.60 GiB used: 1.58 GiB (28.2%) 
  Init: systemd Compilers: gcc: 8.2.1 clang: 7.0.0 Shell: zsh v: 5.6.2 
  inxi: 3.0.27 

Now, I have a problem with the power settings daemon of KDE (powerdevil). No matter what I set as the time for darkening and turning off the screen I always get my screen darkened first at 5 min, then after 2.5 min the screen is darkened a little bit more, which puzzles me since there is no option like this in the KDE settings, and then after 2.5 more min the screen brightness goes to 0. I would like this to happen but in a larger span of time but I cannot manage to make it work. I have already seen other threads regarding this but already tried the solutions, which involve some settings through the xset command. If I check journalctl -f I get after the first 5 min the following output

nov 11 23:22:03 arrakis org_kde_powerdevil[1035]: powerdevil: Screen brightness value:  3299
nov 11 23:22:03 arrakis org_kde_powerdevil[1035]: powerdevil: Screen brightness value:  3299
nov 11 23:22:03 arrakis org_kde_powerdevil[1035]: powerdevil: Kbd backlight brightness value:  0
nov 11 23:22:03 arrakis org_kde_powerdevil[1035]: powerdevil: Can't contact ck
nov 11 23:22:03 arrakis org_kde_powerdevil[1035]: powerdevil: set screen brightness value:  1650
nov 11 23:22:03 arrakis org_kde_powerdevil[1035]: powerdevil: Screen brightness value:  3299
nov 11 23:22:03 arrakis kscreen_backend_launcher[916]: kscreen.xcb.helper: RRNotify_OutputProperty (ignored)
nov 11 23:22:03 arrakis kscreen_backend_launcher[916]: kscreen.xcb.helper:         Output:  66
nov 11 23:22:03 arrakis kscreen_backend_launcher[916]: kscreen.xcb.helper:         Property:  Backlight
nov 11 23:22:03 arrakis kscreen_backend_launcher[916]: kscreen.xcb.helper:         State (newValue, Deleted):  0

But with the part

nov 11 23:22:03 arrakis kscreen_backend_launcher[916]: kscreen.xcb.helper: RRNotify_OutputProperty (ignored)
nov 11 23:22:03 arrakis kscreen_backend_launcher[916]: kscreen.xcb.helper:         Output:  66
nov 11 23:22:03 arrakis kscreen_backend_launcher[916]: kscreen.xcb.helper:         Property:  Backlight
nov 11 23:22:03 arrakis kscreen_backend_launcher[916]: kscreen.xcb.helper:         State (newValue, Deleted):  0

Repeated several times. I get the same output in the second darkening.

Any help would be appreciated.

Also your CPU speeds seems to be locked at 798 ...
Did you try to replace/uninstall tlp and make use of laptop-mode-tools and pm-utils ?
Not sure, i'm just speculating.

I have uninstalled tlp and installed laptop-mode-tools and pm-utils but the problem persists with the same output in journalctl. Is there any configuration I should use with this packages?

should make use of acpid ...

acpid is already installed. How should I use it? What conflict could this have with KDE powerdevil?

none, but ... since the BIOS is

and seems to be the latest and also the last one as presented on their site.

I wonder if you don't need a kernel parameter for it. On an older arch linux forum they also mention the incorrect PStates for a CPU as on that ASUS you have:
https://bbs.archlinux.org/viewtopic.php?id=217991

Also your model is NOT in the arch wiki data base to have a better idea where to look.

I have tried to disable intel_pstate but the result is the same. I am not familiarized with kernel parameters so which one do you think I should modify/look for information?

That was mentioned in one of the links that will not work ... so, why would you do that? :slight_smile:
You have to make it use the p_states, so is not stuck at 798 MHz ...
There was also a link to this wiki
https://wiki.archlinux.org/index.php/CPU_frequency_scaling

Sorry, I understood from the post that there was a problem with intel pstate. As far as I can understand from https://wiki.archlinux.org/index.php/CPU_frequency_scaling intel pstate takes care of everything once is enable so should I choose a different module? If it's useful this is the output of cpupower frequency-info

analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 3.10 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 3.10 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 798 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    25500 MHz max turbo 4 active cores
    25500 MHz max turbo 3 active cores
    25500 MHz max turbo 2 active cores
    25500 MHz max turbo 1 active cores

Also, I have tried playing with the kde power management settings and when I set the darkening time to something less than 5 min it works but the moment I try to put more it gets stuck in 5 min.

Now i understand what you said by disable intel_pstate ...
Indeed on my end the driver: acpi-cpufreq while yours is using

but i'm on a desktop machine ... hmmm
also, on my end i have available cpufreq governors: performance schedutil while yours is

I will have to read a bit more about this.

According to arch wiki performance should have now a better power management than powersave but still the result of powerdevil is the same. Do you know if there is any way to see the logs of powerdevil?

journalctl | grep powerdevil should show you all the entries related to it ...

nov 13 18:02:31 arrakis ksmserver[1304]: org.kde.kf5.ksmserver: Starting autostart service  "/etc/xdg/autostart/powerdevil.desktop" ("/usr/lib/org_kde_powerdevil")
nov 13 18:02:31 arrakis dbus-daemon[609]: [session uid=1000 pid=609] Activating service name='org.kde.ActivityManager' requested by ':1.82' (uid=1000 pid=1377 comm="/usr/lib/org_kde_powerdevil ")
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Backend loaded, loading core
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Core loaded, initializing backend
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Using XRandR
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Screen brightness value:  3299
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Screen brightness value max:  4882
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: current screen brightness value:  3299
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Backend is ready, KDE Power Management system initialized
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Battery with UDI "/org/freedesktop/UPower/devices/battery_BAT0" was detected
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Session path: "/org/freedesktop/login1/session/_35"
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: ACTIVE SESSION PATH: "/org/freedesktop/login1/session/_35"
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Current session is now active
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: fd passing available: true
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: systemd powersave events handling inhibited, descriptor: 19
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: systemd support initialized
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Got a valid offer for  "DPMSControl"
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Core is ready, registering various services on the bus...
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Can't contact ck
nov 13 18:02:32 arrakis dbus-daemon[462]: [system] Activating service name='org.kde.powerdevil.discretegpuhelper' requested by ':1.186' (uid=1000 pid=1377 comm="/usr/lib/org_kde_powerdevil ") (using servicehelper)
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: We are now into activity  "2c6bdfa4-798f-4cad-b84f-0527c2de9b60"
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: () ()
nov 13 18:02:32 arrakis dbus-daemon[462]: [system] Successfully activated service 'org.kde.powerdevil.discretegpuhelper'
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: () ()
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Loading profile for plugged AC
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Activity is not forcing a profile
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil:
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Loading timeouts with  600000
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Handle button events action could not check for screen configuration
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Can't contact ck
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Screen brightness value:  3299
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Screen brightness value max:  4882
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Screen brightness value:  3299
nov 13 18:02:32 arrakis org_kde_powerdevil[1377]: powerdevil: Screen brightness value max:  4882

Doesn't seem to be any wrong besides the Can't contact ck

Edit: I have also checked xsession-errors and I get the following entries for powerdevil

powerdevil: Backend loaded, loading core
powerdevil: Core loaded, initializing backend
powerdevil: No outputs have backlight property
powerdevil: Xrandr not supported, trying ddc, helper
powerdevil: [DDCutilBrightness] compiled without DDC/CI support
powerdevil: Falling back to helper to get brightness
powerdevil: current screen brightness value:  4882
powerdevil: Backend is ready, KDE Power Management system initialized
powerdevil: Battery with UDI "/org/freedesktop/UPower/devices/battery_BAT0" was detected
powerdevil: Session path: "/org/freedesktop/login1/session/_33"
powerdevil: ACTIVE SESSION PATH: "/org/freedesktop/login1/session/_33"
powerdevil: Current session is now active
powerdevil: fd passing available: true
powerdevil: systemd powersave events handling inhibited, descriptor: 19
powerdevil: systemd support initialized
powerdevil: Got a valid offer for  "DPMSControl"
powerdevil: Core is ready, registering various services on the bus...
powerdevil: Can't contact ck
powerdevil: We are now into activity  "2c6bdfa4-798f-4cad-b84f-0527c2de9b60"
powerdevil: () ()
powerdevil: () ()
powerdevil: Loading profile for plugged AC
powerdevil: Activity is not forcing a profile
powerdevil: 
powerdevil: Loading timeouts with  300000
powerdevil: Handle button events action could not check for screen configuration
powerdevil: Can't contact ck
powerdevil: Udev device changed "/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight" "/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight"
powerdevil: ("migration", "AC", "LowBattery", "Battery") ()
powerdevil: "Oscurecer la pantalla"  has a runtime requirement
powerdevil: "Red inalámbrica"  has a runtime requirement
powerdevil: "Ahorro de energía de la pantalla"  has a runtime requirement
powerdevil: "Brillo de la pantalla"  has a runtime requirement
powerdevil: "Luz trasera del teclado"  has a runtime requirement
powerdevil: The action  QVariant(QString, "KeyboardBrightnessControl")  appears not to be supported by the core.
powerdevil: "Gestión de eventos de botones"  has a runtime requirement
powerdevil: "Oscurecer la pantalla"  has a runtime requirement
powerdevil: "Red inalámbrica"  has a runtime requirement
powerdevil: "Ahorro de energía de la pantalla"  has a runtime requirement
powerdevil: "Brillo de la pantalla"  has a runtime requirement
powerdevil: "Luz trasera del teclado"  has a runtime requirement
powerdevil: The action  QVariant(QString, "KeyboardBrightnessControl")  appears not to be supported by the core.
powerdevil: "Gestión de eventos de botones"  has a runtime requirement
powerdevil: "Oscurecer la pantalla"  has a runtime requirement
powerdevil: "Red inalámbrica"  has a runtime requirement
powerdevil: "Ahorro de energía de la pantalla"  has a runtime requirement
powerdevil: "Brillo de la pantalla"  has a runtime requirement
powerdevil: "Luz trasera del teclado"  has a runtime requirement
powerdevil: The action  QVariant(QString, "KeyboardBrightnessControl")  appears not to be supported by the core.
powerdevil: "Gestión de eventos de botones"  has a runtime requirement
powerdevil: Loading routine called
powerdevil: ()
powerdevil: Ok, KConfigGroup ready ("icon")
powerdevil: ()
powerdevil: Ok, KConfigGroup ready ("icon")
powerdevil: ()
powerdevil: Ok, KConfigGroup ready ("icon")
KActivitiesStats( 0x55e2aea7e9f0 ) ResultModelPrivate::onResultScoreUpdated  result added: "kcm:powerdevilprofilesconfig.desktop" score: 0 last: 1540927491 first: 1540927491
powerdevil: Can't contact ck
powerdevil: We are now into activity  "2c6bdfa4-798f-4cad-b84f-0527c2de9b60"
powerdevil: () ()
powerdevil: () ()
powerdevil: Loading profile for plugged AC
powerdevil: Activity is not forcing a profile

And for sure is not about Calvin Klein :slight_smile:

Have you tried to use turbostat ?

Why use turbostat ? with intel pstate in performance mode my cpu is not locked anymore

ok, now this is odd, it seems that the power settings do not ignore completely my settings but they just use half the time I put in the power management settings...

Having this issue too. Turning off Screen Energy Saving still turns off the screen.

Forum kindly sponsored by