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

upower lid functions are deprecated and need to be replaced #340

Closed
paul-jewell opened this issue Feb 19, 2022 · 2 comments
Closed

upower lid functions are deprecated and need to be replaced #340

paul-jewell opened this issue Feb 19, 2022 · 2 comments

Comments

@paul-jewell
Copy link

paul-jewell commented Feb 19, 2022

When building version 2.4.7 with upower-0.99.15, the build fails with a deprecated function error:

src/thd_engine_adaptive.cpp: In member function ‘int cthd_engine_adaptive::evaluate_lid_condition(condition)’: src/thd_engine_adaptive.cpp:1002:61: error: ‘gboolean up_client_get_lid_is_closed(UpClient*)’ is deprecated [-Werror=deprecated-declarations] 1002 | bool lid_closed = up_client_get_lid_is_closed(upower_client);

This has been deprecated with the update of upower to 0.15. According to their merge, logind functionality should be used instead:
https://gitlab.freedesktop.org/upower/upower/-/merge_requests/5

I could try to make a pull request, but I am not a C++ expert, and also don't know my way around the thermald code, so I don't think it would be helpful. When I look at the pull request to update gnome settings daemon to overcome this issue, I wouldn't know how to make this change gnome-agnostic (which I assume it should be).
This issue is referenced in Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005478
(and also on other distributions)

EDIT: Looks like this is already in hand: https://github.com/intel/thermal_daemon/pull/338/commits/93c7d2783b28a4b5ec5ca5071881547b5ee65da3

@benzea
Copy link

benzea commented Feb 20, 2022

Yep, #338 includes a fix for this.

benzea pushed a commit to benzea/thermal_daemon that referenced this issue Feb 22, 2022
The UPower interface for the lid state is deprecated. As such, we should
be reading it directly from the input device. Making the switch is
straight forward, so just do it.

Closes: intel#340
@spandruvada
Copy link
Contributor

I will include this week.

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

3 participants