This may be useful in cases where SetWifiDebugMode has failed to
check what the current state/setting is.
Though if SetWifiDebugMode has failed we may be in weird state
so logs of steamos-manager should be checked to see what failed.
Signed-off-by: Jeremy Whiting <jpwhiting@kde.org>
Differentiate Galileo devices from others by checking the
contents of /sys/class/drm/id/board_name.
Signed-off-by: Jeremy Whiting <jeremy.whiting@collabora.com>
Changed mode parameter from i32 to u32 as well.
Change from Result<bool, Box<dyn std::error::Error>> to
std::io::Result<bool>
Adjust the xml to add the new method.
Make all private api use Result<()> types so we can do error checking.
Signed-off-by: Jeremy Whiting <jeremy.whiting@collabora.com>
When wifi debug mode is started trace-cmd start is executed with
the given buffer_size parameter.
Later when wifi debug mode is stopped, trace-cmd stop is executed
as well as trace-cmd extract to write the data to a file on disk.
In this way the steam client (or any dbus users...) can decide how
long to run trace-cmd for.
Change to create_dir_all so we don't get errors if it exists.
Signed-off-by: Jeremy Whiting <jeremy.whiting@collabora.com>
Adds set_wifi_debug_mode to enable or disable wifi debug mode.
Parameters are
mode (0 for off, 1 for on for now, expandable in the
future if more modes are needed).
buffer_size: a size in kilobytes per cpu (so 16 on the deck)
for the ring buffer that debug messages will get written into.
For now just adds or removes a iwd debug mode override and restarts
iwd.
next will add some trace-cmd commands to write the debug messages
to a file on disk.
Signed-off-by: Jeremy Whiting <jeremy.whiting@collabora.com>
And this attempt works now. I guess this is adequate to release
as a throw away implementation to replace later with something better.
Also add strip="symbols" for release builds to get it down to a lean
3.2M size.
Use an enum of values for level:
0 - auto
1 - low
2 - high
3 - manual
4 - peak_performance
If any out of range are given, return an false. If unable to write
or open for writing, return false. May change to give an err type
instead later if that helps client side.
Will likely move api methods out to be more generic, but this
runs for now and gives true on success, false on failure, etc.
May also need to change from process.poll to wait for longer
running scripts. will do once tested more.
Much of this will change, but needed something to start with.
Based on notes at https://gitlab.steamos.cloud/jupiter/tasks/-/issues/894
Use objectserver to get introspection done for us.
Change to session bus for now since system bus will need
a config file to allow us to take the name. Will add later.
Implement one quick say_hello dbus method to start.
Add copyright headers.