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

com.system76.PowerDaemon.Keyboard dbus API #190

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Sep 4, 2020

The keyboard-backlight repository has code using this. The API can be used with the code there to add a brightness/color setting in Gnome Control Center, and can later be used for the Keyboard Configurator.

This is rather more complicated than my previous attempt at an API for this (#177), but the general design is hopefully fairly robust and can be extended for more functionality we may need.

The `ffidisp` module is described as "the legacy design used up to
0.6.x. It is not recommended for new development."

This also uses `SyncConnection` in the server, rather than `Connection`,
so it can be shared between threads.
This defines a new dbus interface `com.system76.PowerDaemon.Keyboard`.
This wraps the sysfs API without requiring root access.

This is handled in a seperate thread that monitors brightness and color
changes with inotify.

The API might later be extended to support things like setting keymaps.
@ids1024 ids1024 requested review from a team September 4, 2020 16:06
@ids1024
Copy link
Member Author

ids1024 commented Sep 9, 2020

This doesn't quite expose all the functionality needed for the design in pop-os/gnome-control-center#102. That will also require the EC to persist settings, handle the color change key (instead of the kernel driver handling it), and support changing the list of colors that are switched better.

And of course the Keyboard Configurator will need a few more things, mainly support for changing the keymap.

Copy link
Member

@leviport leviport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't figure out how to test the keyboard-backlight app, but this PR causes no regressions, so I'm satisfied with it.

@ids1024
Copy link
Member Author

ids1024 commented Sep 11, 2020

@jackpot51 Thoughts on this?

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.

None yet

2 participants