Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smbios-battery-ctl can't change settings when a admin password is set #103

Open
flyingflo opened this issue Sep 6, 2021 · 5 comments
Open

Comments

@flyingflo
Copy link

Even with the --password option, the program returns sucessfully, but changes are not applied.
This is fedora 34 on a Dell XPS 13.

% sudo smbios-sys-info                                                                       :(
Libsmbios version:      2.4.3
Product Name:           XPS 13 9380
Vendor:                 Dell Inc.
BIOS Version:           1.15.0
[......]

For example, I'm trying to set the charging mode to standard. It works if no password is set in the BIOS setup program.

% sudo smbios-battery-ctl --get-charging-cfg
Charging mode: primarily_ac
flo@floprimesign ~ 
% sudo smbios-battery-ctl --set-charging-mode=standard --trace --password=${PASSWD}
ENTER TokenTable()
ENTER __init__(<libsmbios_c.smbios_token._TokenTable object at 0x7f053f41bf40>, 1, )
ENTER _errorOnNullPtrFN(<libsmbios_c.smbios_token.LP__TokenTable object at 0x7f053f2d81c0>, <_FuncPtr object at 0x7f053f3257c0>, (1,), )
RAN CTYPES FUNCTION: token_table_factory
LEAVE _errorOnNullPtrFN --> <libsmbios_c.smbios_token.LP__TokenTable object at 0x7f053f2d81c0>

LEAVE __init__ --> None

LEAVE TokenTable --> <libsmbios_c.smbios_token._TokenTable object at 0x7f053f41bf40>

ENTER __getitem__(<libsmbios_c.smbios_token._TokenTable object at 0x7f053f41bf40>, 838, )
LEAVE __getitem__ --> <libsmbios_c.Token ID 0x0346>

ENTER activate(<libsmbios_c.Token ID 0x0346>, )
ENTER _errorOnNegativeFN(0, <_FuncPtr object at 0x7f053f325dc0>, (<libsmbios_c.Token ID 0x0346>,), )
RAN CTYPES FUNCTION: token_obj_activate
LEAVE _errorOnNegativeFN --> 0

LEAVE activate --> 0

Charging mode has been set to: standard


% sudo smbios-battery-ctl --get-charging-cfg                                        
Charging mode: primarily_ac
@flyingflo
Copy link
Author

For comparison, that's the trace without a password:

% sudo smbios-battery-ctl --get-charging-cfg
Charging mode: primarily_ac

% sudo smbios-battery-ctl --set-charging-mode=standard --trace
ENTER TokenTable()
ENTER __init__(<libsmbios_c.smbios_token._TokenTable object at 0x7f8255a4af40>, 1, )
ENTER _errorOnNullPtrFN(<libsmbios_c.smbios_token.LP__TokenTable object at 0x7f82559081c0>, <_FuncPtr object at 0x7f82559547c0>, (1,), )
RAN CTYPES FUNCTION: token_table_factory
LEAVE _errorOnNullPtrFN --> <libsmbios_c.smbios_token.LP__TokenTable object at 0x7f82559081c0>

LEAVE __init__ --> None

LEAVE TokenTable --> <libsmbios_c.smbios_token._TokenTable object at 0x7f8255a4af40>

ENTER __getitem__(<libsmbios_c.smbios_token._TokenTable object at 0x7f8255a4af40>, 838, )
LEAVE __getitem__ --> <libsmbios_c.Token ID 0x0346>

ENTER activate(<libsmbios_c.Token ID 0x0346>, )
ENTER _errorOnNegativeFN(0, <_FuncPtr object at 0x7f8255954dc0>, (<libsmbios_c.Token ID 0x0346>,), )
RAN CTYPES FUNCTION: token_obj_activate
LEAVE _errorOnNegativeFN --> 0

LEAVE activate --> 0

Charging mode has been set to: standard

% sudo smbios-battery-ctl --get-charging-cfg             
Charging mode: standard

The only diff is the addresses..

@flyingflo
Copy link
Author

I wonder how I could help to resolve this issue?
Does anybody have an idea how to investigate this?
Found something interessting: Altough an admin password is set, smbios-passwd shows NOT installed:

smbios-passwd --info                 
User password
        Password stored as: ASCII
        Password MAX length: 32
        NOT installed
Admin password
        Password stored as: ASCII
        Password MAX length: 32
        NOT installed
Owner password
        Password stored as: ASCII
        Password MAX length: 32
        NOT installed

@cipollone
Copy link

Same output on a Dell XPS 9500, Debian.

@SirDogey
Copy link

Same on Dell Precision 7530, Pop OS

@NeuerUser
Copy link

Same here:
Libsmbios version: 2.4.3
Product Name: XPS 13 9343
Vendor: Dell Inc.
BIOS Version: A04
System ID: 0x0665

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

No branches or pull requests

4 participants