Commit Graph

150 Commits

Author SHA1 Message Date
Carsten Haitzler 977cbc59b8 cpufreq - fix up some ugly bugs in a move to powersave
not setting right governor from menu, not updating the state after a
change ....

@fix
2021-03-03 13:58:11 +00:00
Carsten Haitzler 9da59955a6 cpufreq - remove useless type check for event handler 2021-01-02 15:24:58 +00:00
Carsten Haitzler e5bf0d66eb powersave - document som things and add screen blank override for pwrsv
add a screen power save mode than overrides regular powersave (bug is
subordinat to forced power save).
2020-11-12 15:28:54 +00:00
Carsten Haitzler 6ed8873a48 cpufreq - add support for older pre-pstate but post-freqs cpus
@fix
2020-11-06 15:42:51 +00:00
Alastair Poole 721380cb1e cpufreq: fix a VERY misleading comment. 2020-09-07 16:36:10 +01:00
Carsten Haitzler 65a9a6615b icons - fix icons used in code to be better 2020-08-17 18:22:12 +01:00
Alastair Poole e820efd81d cpufreq: FreeBSD et al.
Fix CPU frequency setting on FreeBSD/DragonFlyBSD. Also fix the
display of the dial so it behaves identically to the Linux
gadget.
2020-07-11 22:46:00 +01:00
Elyes HAOUAS 0a9e0003d8 tree-wide: get rid of trailing whitespace (part 8)
Remove trailing whitespaces

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11828
2020-05-14 14:17:10 +02:00
Carsten Haitzler 678103c73b cpufreq - handle multiple instances right....
don't double free...

@fix
2020-05-04 22:27:27 +01:00
Carsten Haitzler 8dd052e6e3 cpufreq - fix ifdefs for unused fucn on bsd 2020-01-15 19:06:24 +01:00
Carsten Haitzler 7aaf8f4feb cpufreq - move to use the new e_system cpufreq support from own suid exe 2020-01-15 11:33:55 +00:00
Carsten Haitzler a2c1e59cb5 cpufreq - pstate - support incr of 5 percent to allow for better control
some intel cpu's only go down to 20%, some down to 10% min state....
so let's do this in lots of 5% to allow for some future cpu's. now
it's not just 0, 25, 50, 75, 100 it's worth making it a real loop to
save on code too. this allows me to actually control the cpu's i see
at the detail level i see they can be controlled at.
2019-08-11 22:47:28 +01:00
Stephen 'Okra' Houston 20a96271ca Update netstatus in/out in the same file read. Fix cpufreq to use powersave again. 2017-09-12 12:10:38 -05:00
Mike Blumenkrantz c31cb51499 replace <br> with <ps/> for all text 2017-08-21 10:16:35 -04:00
Carsten Haitzler 03aeb1d463 fix fallthrough warnings 2017-08-04 12:35:27 +09:00
Mike Blumenkrantz a0619c5481 partially revert "add new powersave features for supporting a live sleep mode"
ref 7caf5c8ff4

this makes the cpufreq gadget consume >100% cpu at all times when anything above
normal polling speed is selected
2017-07-28 15:44:55 -04:00
Al 'netstar' Poole d7538011ec Modules: Fix compilation and remove warnings for BSD 2017-07-15 21:32:11 -05:00
Carsten Haitzler 7caf5c8ff4 add new powersave features for supporting a live sleep mode
so new laptops now seem to no longer support S3 sleep. sleeping is
done basically by going as idle as possible. you can ask the kernel to
freeze execution BUT this seems to use about the same power as staying
alive in my tests. to support this add 2 things:

1. a FREEZE powersave mode which implies we're alive but want to
really stay as idle as absolutely possible.
2. powersave aware sleep functions that replace the usleeps in threads
so they can switch from being super sleepy when in freeze mode to
normal.
2017-07-10 10:18:50 +09:00
Carsten Haitzler 8ea03a039f e cpufreq - stop checking status nullness - silence coverity
status is a msg from the child thread. it's never null. checks before
sending should guarantee that.

fix CID 1365406
2017-05-11 17:14:28 +09:00
Al netstar Poole b6b143bf0c Make sysinfo gadgets work with BSD 2017-02-02 15:48:48 -06:00
Carsten Haitzler bdbd0f4753 e cpufreq - dont emit message for min/max/cur freq if they didnt change
saves some cpu when idile and polling cpu fre and finding nothing
changed.

@optimize
2016-12-04 22:42:47 +09:00
Stephen okra Houston 975366ba7b Cpufreq: Don't check for NULL then depend on the value not being NULL. Fixes CID 1365406 2016-11-23 09:59:29 -06:00
Carsten Haitzler d2104b23af cpufreq - move cpuinfo polling into thread to not block mainloop ever
on some devices asking the cpu for info like current frequency,
governors etc. seems to be expensive and if done in the mainloop can
block for multiple ms causing framerate hiccups, so move it to a
thread...
2016-11-03 10:21:22 +09:00
Carsten Haitzler 1b73bedd4d e mod: cpufreq - handle the case where cpu has zero freqs - dont crash
it can be that if you remove setuid bits on cpufreq binary we can end
up with zero freqs on bsd. this causes a crash.

@fix
2016-03-24 12:17:35 +09:00
Mike Blumenkrantz d6802e9c42 use uint instead of int for eina_list_count() return in cpufreq (trivial)
CID 1267212
2016-02-29 10:43:02 -05:00
Mike Blumenkrantz 82a320404c enforce pstate's extremely-confusing no_turbo option in cpufreq
fix T2411
2015-06-29 16:38:17 -04:00
Chris Michael 0a94e8ba71 enlightenment: Make E build again with EFL from git
sed -i 's/EAPI/E_API/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 15:13:10 -04:00
Mike Blumenkrantz 471dcb24cb __UNUSED__ -> EINA_UNUSED
this has been bugging me forever. __UNUSED__ is no longer a valid macro here.
2015-03-18 18:09:09 -04:00
Mike Blumenkrantz 09ec213a31 remove e_util_zone_current_get() usage 2015-03-13 17:58:45 -04:00
Takeshi Banse 6601c09f82 cpufreq: teach cpuinfo_{min,max}_freq as available frequencies
Summary:
The intel_pstate scaling driver exposes the `scaling_cur_freq` since
kernel 3.17 [*], it would be fine that the min and max frequencies
are known even without the `scaling_available_frequencie`.

This commit teaches to use the cpuinfo_{min,max}_freq as fallback in
case the `scaling_available_frequencies` is not available within
intel pstate.

[*] https://lkml.org/lkml/2014/11/11/1060

Signed-off-by: Takeshi Banse <takebi@laafc.net>

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1686
2014-11-29 16:39:42 +09:00
Mike Blumenkrantz 99589eb5af remove E_Win+e_canvas, convert all internal wins to use elm_win
known issues:

* keybindings for efm windows (eg. ctrl+w) are broken until the rest of the conversion is completed
2014-11-20 15:26:21 -05:00
Chris Michael 5bbedc3013 cpufreq: Fix duplicate structure name when including EGL headers
When we include support (in the wayland compositor) for compiling with
EGL, the inclusion of the EGL headers cause a conflict with the
Status structure name in this module, so lets rename it.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-06-25 09:42:07 -04:00
Mike Blumenkrantz 86656e4df9 compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.

* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.

** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes

** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects

** protocol-specific window management and compositor functionality is now kept exclusively in backend files

** e_pixmap api provides generic client finding and rendering api

** screen/xinerama screens are now provided directly by compositor on startup and re-set on change

** e_comp_render_update finally replaced with eina_tiler

** wayland compositor no longer creates X windows

** compositor e_layout removed entirely

* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra

* e_manager is just for screensaver and keybind stuff now, possibly remove later?

* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor

** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.

*** do NOT set interceptors on a client's comp_object. seriously.

* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor

* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get

* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas

* deskmirror is (more) broken for now

* illume is totally fucked

* Ecore_X_Window replaced with Ecore_Window in most cases

* edge binding XWindows replaced with regular canvas objects

* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result

comp files and descriptions:

e_comp.c - overall compositor functions, rendering/update loop, shape cutting

e_comp_x.c - X window management and compositor functionality

e_comp_wl.c - Wayland surface management and compositor functionality

e_comp_canvas.c - general compositor canvas functions and utilities

e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems

additional authors: ivan.briano@intel.com

feature: new compositor

removal: e_border, e_container, e_popup
2014-01-14 20:22:02 -05:00
Carsten Haitzler 83e7883ec9 allow cpufreq config to be accessed without a gadget - pstate necessity 2013-08-24 19:22:39 +09:00
Carsten Haitzler d73e6036c9 oops - remove fprintf debug from cpufreq. 2013-05-23 21:19:17 +09:00
Chris Michael 3e487fb2c8 Actually, lets add a newline at the end also (since 'buf' does not
contain one).

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-22 17:31:31 +01:00
Chris Michael 51db96e202 Fix "warning: format not a string literal and no format arguments
[-Wformat-security]" compiler warning.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-22 17:30:36 +01:00
Carsten Haitzler 6b532aadad add intel pstate support in cpufreq for kernel 3.9 and newer. 2013-05-21 22:07:06 +09:00
Carsten Haitzler 4752435fe1 handle trailing newline from cpu governors so they get listed right. 2013-05-21 01:25:19 +09:00
Mike Blumenkrantz a069797887 fix cpufreq gadget menu popdown 2013-03-13 07:46:56 +00:00
Maxime Villard 4a52c46268 From: Maxime Villard <rustyBSD@gmx.fr>
Subject: [E-devel] [e][PATCH] Optimizations v2
Date: Fri, 21 Dec 2012 22:17:32 +0100

Hi,
same patch as before: removed useless nullchecks and
switched some free()'s to E_FREE().



SVN revision: 81592
2012-12-21 21:31:13 +00:00
Massimo Maiurana 60a8c29681 typo
SVN revision: 80978
2012-12-14 17:40:12 +00:00
Carsten Haitzler 47e53b259e provide some help for when pkgers mess up suid bits on freqset.
SVN revision: 80801
2012-12-13 09:02:20 +00:00
Carsten Haitzler 846a80bf77 and if the governer is not known.... give its raw string as fallback.
SVN revision: 80400
2012-12-06 22:22:01 +00:00
Carsten Haitzler b2a6b20336 ooh.. a new cpufreq governor i found! :) add it to a known list.
SVN revision: 80399
2012-12-06 22:13:15 +00:00
Mike Blumenkrantz 3eebf58116 from rustyBSD:
Hi,
 here is a patch for e/src/modules/cpufreq/e_mod_main.c

 I. _cpufreq_status_check_available() always returns 1,
    so moved to void.

 II. Don't need to 'buf[sizeof(buf) - 1] = 0;', as it's
     already done by snprintf.

 III. Stuff for OpenBSD.

 IV. Fixed files descriptors leaks, and removed useless
     code.

 thanks


SVN revision: 79203
2012-11-13 07:54:03 +00:00
Sebastian Dransfeld 427b6c34df e: Cleanup
Removes unused variables, drops duplicate return or break
     statements and drops unnecessary checks.

Patch by Igor Murzov

SVN revision: 77490
2012-10-04 23:26:48 +00:00
Vincent Torri 4e95bf3f20 E17: OpenBSD support of the cpufreq module
Patch by Maxime Villard (rustyBSD)


SVN revision: 77276
2012-10-01 17:40:43 +00:00
Mike Blumenkrantz 2434f5adbe more PATH_MAX cleanups
SVN revision: 75520
2012-08-22 07:32:12 +00:00
Mike Blumenkrantz 94e2fc5257 clean up gadget right click menus to stop leaking
SVN revision: 75285
2012-08-15 07:22:04 +00:00