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

Dbus hooks #22

Open
jymbob opened this issue Oct 8, 2014 · 6 comments
Open

Dbus hooks #22

jymbob opened this issue Oct 8, 2014 · 6 comments

Comments

@jymbob
Copy link

jymbob commented Oct 8, 2014

More of a feature request than an issue: Would it be possible to compile with dbus hooks so that dbus-notify can be called upon rotation?
This could track orientation, or 'mode' as per Windows usage (Tablet, tent, stand, laptop)

@pfps
Copy link
Owner

pfps commented Oct 8, 2014

This is a good idea, but someone will need to do the work. :-)

However, I don't think that we would get tablet, ... indications out. That requires determining the hinge angle, which isn't yet being calculated.

It would be nice to know how Windows calculates this information, to be able to emulate the Windows behaviour. I have tried a bit to shame the information out of Lenovo, but no response.

@jymbob
Copy link
Author

jymbob commented Oct 15, 2014

It might be possible to fake a lot of it - pretty sure 'screen is upside-down' is the primary trigger for Tent Mode, for example.
I note you've found a magnetic sensor for Tablet Mode, so the only tricky distinction left is Stand vs Laptop mode...

If I knew more C I'd see if I could work something out, but unfortunately my skills there are severely limited. )o:

@pfps
Copy link
Owner

pfps commented Oct 15, 2014

I have found out that tablet mode is triggered by a magnetic sensor, but there does not appear to be any reporting back through ACPI to the OS. The newer embedded controller to OS interface may do better but I don't think that there is an implementation of that in Linux.

@Buri
Copy link
Contributor

Buri commented Oct 31, 2014

https://github.com/Buri/yoga-laptop

I have done notifiing via dbus, but only for screen rotation. Code is bit old, but it might just work. If not, it then needs to be merged with current pfps repository.

@pfps
Copy link
Owner

pfps commented Oct 31, 2014

I'm happy having someone else do this merging, as I don't have time to do anything in this area just now.

@jymbob
Copy link
Author

jymbob commented Nov 18, 2014

@Buri I've pulled your code, but can't quite work out how you're refactoring? Is everything supposed to be called through controller, or does orientation now trigger controller, which handles what to do?

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