Add information about existence of discrete GPU
ClosedPublic

Authored by jgrulich on Nov 22 2016, 11:17 AM.

Details

Summary

This patch adds a kauth helper class which just checks existence of /sys/kernel/debug/vgaswitcheroo/switch file, which means the user has dual gpu in case of existence. The value we get using that helper class is exposed over DBus so it can be used outside as well.

Diff Detail

Repository
R122 Powerdevil
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jgrulich updated this revision to Diff 8392.Nov 22 2016, 11:17 AM
jgrulich retitled this revision from to Add information about existence of discrete GPU.
jgrulich updated this object.
jgrulich edited the test plan for this revision. (Show Details)
jgrulich added reviewers: broulik, Plasma.
jgrulich set the repository for this revision to R122 Powerdevil.
Restricted Application added a project: Plasma. · View Herald TranscriptNov 22 2016, 11:17 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik added inline comments.Nov 22 2016, 11:27 AM
daemon/backends/upower/discretegpu_helper_actions.actions
4

You can drop all those localized ones, this will be (should be?) taken care of by scripty

daemon/backends/upower/discretegpuhelper.h
33

explicit

daemon/powerdevilbackendinterface.cpp
33 ↗(On Diff #8392)

Why do we have it both in Core and the backendinterface?

jgrulich updated this revision to Diff 8394.Nov 22 2016, 11:35 AM

Fixes mentioned issues

broulik accepted this revision.Nov 22 2016, 7:30 PM
broulik edited edge metadata.

Thanks a ton! :)

This revision is now accepted and ready to land.Nov 22 2016, 7:30 PM
This revision was automatically updated to reflect the committed changes.