Skip to content

Fixes and improvements#1

Open
ptr1337 wants to merge 17 commits intocachyosfrom
cachyos-rebase
Open

Fixes and improvements#1
ptr1337 wants to merge 17 commits intocachyosfrom
cachyos-rebase

Conversation

@ptr1337
Copy link
Copy Markdown
Member

@ptr1337 ptr1337 commented Apr 11, 2026

No description provided.

maciejwieczorretman and others added 17 commits April 10, 2026 09:36
cgroup isolation mode doesn't work in LPMD because when writing
'isolated' to cpuset.cpus.partition file the expectation is that
cpuset.cpus will be a subset of cpuset.cpus.exclusive of that cgroup.

The simple fix is to write the same content to cpuset.cpus and
cpuset.cpus.exclusive when switching into the isolated mode.

However a problem can appear if there are any other cgroups on the
system that have exclusive cpus claimed. For one LPMD will just shut
down if it can't set affinity into any cpu it wants during core type
discovery phase. Aside from that using this simple version of the fix
will later result in creating an invalid cgroup partition.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
…val writes

When WLT proxy is enabled it's supposed to set it's own polling timeout.
The problem is in the state machine an early return happens - that
disables polling timeout - when the non-proxy polling is disabled. Given
that it has nothing to do with the proxy polling it should not interfere
in the proxy setting it's own timeouts.

Change order of the early returns so that it happens after the WLT proxy
check - thereby not overwriting the interval assigned by the proxy code.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
If one profile, let's say the balanced one, is set to enable AUTO LPMD,
and another one like the performance one, has LPMD OFF, then a deadlock
might happen when using the wlt proxy system. Basically when going into
the OFF state, polling gets disabled and there is no specific code flow
to get it enabled again after switching back to an AUTO state.

This only affects the wlt proxy as other polling and non-polling systems
seem to be able to get themselves back up again.

Reinitialize the polling interval when switching power profiles.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
ITMT became broken when the enabling file was moved to the debugfs. The
data in the file also changed from printing out 0 or 1 to printing out N
or Y characters. However 0 and 1 are still accepted for writing.

Change the file that's being accesses to the debugfs and add helpers for
the Y/N format.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
The cpu name in the config file is described as having 16 cores while
the specific tags in the config file try to enable higher core indices
than 16.

Correct the indices.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Get the readme source to a readable format for editing.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Make clear how to start the program to avoid confusion around the
default behavior.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Update the main man page with new informations about LPMD. Mention what
are the expectation towards the user, clear up intel_lpmd_control
section since it has it's own man page and add how to enable the system
service persistently in the examples section.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Cleanup the long lines and link in the config man page at the end.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Cleanup some topics that expanded since they were written. Make general
cleanups and small corrections to typos or style.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Some options are not currently doing anything. Move them out of the
proper part of the man page to avoid confusing users.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Expose the current daemon state (OFF/ON/AUTO/FREEZE/TERMINATE) via a new
GetState D-Bus method and a STATUS command in intel_lpmd_control, so
clients can query the active mode without having to track it externally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Peter Jung <admin@ptr1337.dev>
Copy-paste bug: the SliderDC log line was using balance_slider_ac
instead of balance_slider_dc, making DC slider state invisible in
debug output.
Add offset_dst bounds check to prevent out-of-bounds write when the
destination index reaches the buffer size. Guard trailing space removal
with offset_dst > 0 to prevent underflow on empty or all-space input.
Signed-off-by: Peter Jung <admin@ptr1337.dev>
- lpmd_helpers: fix off-by-one in lpmd_read_str null termination.
  str[ret-1] unconditionally overwrote the last data byte. Now properly
  null-terminates at str[ret] and strips trailing newline separately.

- lpmd_config: add XML_PARSE_NONET flag to xmlReadFile to prevent
  XXE attacks from resolving external entities over the network.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants