fenrus75 / powertop

The Linux PowerTOP tool -- please post patches to the mailing list instead of using github pull requests
http://www.01.org/powertop
GNU General Public License v2.0
1.05k stars 131 forks source link

Calibration fails under wayland; dpms not supported #110

Open t-nil opened 2 years ago

t-nil commented 2 years ago

Hello,

I had the problem, that running powertop --calibrate just turns my brightness off and hangs. I assume this has to do with wayland not supporting dpms.

modprobe cpufreq_stats failed
Loaded 750 prior measurements
RAPL device for cpu 0
RAPL Using PowerCap Sysfs : Domain Mask d
RAPL device for cpu 0
RAPL Using PowerCap Sysfs : Domain Mask d
Devfreq not enabled
glob returned GLOB_ABORTED
Starting PowerTOP power estimate calibration 
Calibrating idle
server does not have extension for dpms option
/usr/bin/xset:  unknown option force

usage:  /usr/bin/xset [-display host:dpy] option ...
    To turn bell off:
    -b                b off               b 0
    To set bell volume, pitch and duration:
     b [vol [pitch [dur]]]          b on
    To disable bug compatibility mode:
    -bc
    To enable bug compatibility mode:
    bc
    To turn keyclick off:
    -c                c off               c 0
    To set keyclick volume:
     c [0-100]        c on
    To control Energy Star (DPMS) features:
    -dpms      Energy Star features off
    +dpms      Energy Star features on
     dpms [standby [suspend [off]]]     
          force standby 
          force suspend 
          force off 
          force on 
          (also implicitly enables DPMS features) 
          a timeout value of zero disables the mode 
    To set the font path:
     fp= path[,path...]
    To restore the default font path:
     fp default
    To have the server reread font databases:
     fp rehash
    To remove elements from font path:
    -fp path[,path...]  fp- path[,path...]
    To prepend or append elements to font path:
    +fp path[,path...]  fp+ path[,path...]
    To set LED states off or on:
    -led [1-32]         led off
     led [1-32]         led on
    -led named 'name'   led off
     led named 'name'   led on
    To set mouse acceleration and threshold:
     m [acc_mult[/acc_div] [thr]]    m default
    To set pixel colors:
     p pixel_value color_name
    To turn auto-repeat off or on:
    -r [keycode]        r off
     r [keycode]        r on
     r rate [delay [rate]]
    For screen-saver control:
     s [timeout [cycle]]  s default    s on
     s blank              s noblank    s off
     s expose             s noexpose
     s activate           s reset
    For status information:  q
    To print version: -version
System is not available
^C⏎  
rathann commented 4 months ago

On a related note, using xset makes no sense if a machine has no display and no X11 installed at all, so powertop should check if there are any displays connected before attempting to turn them off. Possibly by checking if any of /sys/class/drm/card?-*/status say connected.