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

install orientation program #16

Closed
rwijtvliet opened this issue Aug 5, 2014 · 11 comments
Closed

install orientation program #16

rwijtvliet opened this issue Aug 5, 2014 · 11 comments

Comments

@rwijtvliet
Copy link

At the end of the README file you write, concerning the orientation and light sensor programs:

To compile and install (after first compiling and installing the sensor drivers if necessary): make programs sudo make programs-install

which I cannot get to work. Could you provide more detailed instructions please?

Many thanks.

@pfps
Copy link
Owner

pfps commented Aug 5, 2014

Well, that is all that you should have to do unless something has gone wrong. You should even be able to
make programs
if nothing else has been installed.

Please include the output when you
make programs
and then
sudo make programs-install
so that I can try to see what is going wrong.

@rwijtvliet
Copy link
Author

Thanks for coming back to me.
No rule to make target 'programs'. Stop.
I tried running it from all subdirectories. I'm running ubuntu unity

@pfps
Copy link
Owner

pfps commented Aug 5, 2014

Aah.

This should be done in the main directory, i.e., the one that has sensors and
yoga_laptop as subdirectories. There should be a Makefile in that directory
that has programs as a target.

peter

On 08/05/2014 07:42 AM, rwijtvliet wrote:

Thanks for coming back to me.
|No rule to make target 'programs'. Stop.|
I tried running it from all subdirectories. I'm running ubuntu unity


Reply to this email directly or view it on GitHub
#16 (comment).

@rwijtvliet
Copy link
Author

A bit better, but not quite yet:

~/Software/yoga-laptop-master$ make programs
cd sensors && make all
make[1]: Entering directory `/home/user/Software/yoga-laptop-master/sensors'
cc orientation.c -o orientation
In file included from orientation.c:29:0:
libs/common.h:32:35: fatal error: X11/extensions/Xrandr.h: No such file or directory
 #include <X11/extensions/Xrandr.h>
                                   ^
compilation terminated.
make[1]: *** [orientation] Error 1
make[1]: Leaving directory `/home/user/Software/yoga-laptop-master/sensors'
make: *** [programs] Error 2

I tried installing the package you mentioned was necessary, but couldn't find it:

~/Software/yoga-laptop-master$ sudo apt-get install libXrandr-devel 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libXrandr-devel

@Hnasar
Copy link

Hnasar commented Aug 5, 2014

@rwijtvliet libXrandr-devel may be the Fedora package name
to find what package you need in Debian, do apt-file search Xrandr.h, and you'll see that the package name is libxrandr-dev.

@rwijtvliet
Copy link
Author

After installing libxrandr-dev and glib-2.0:

yoga-laptop-master$ make programs
cd sensors && make all
make[1]: Entering directory `/home/ruud/Software/yoga-laptop-master/sensors'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/ruud/Software/yoga-laptop-master/sensors'

... I'm not sure if things got installed before, but the screen isn't rotating and the mouse pad remains active when putting into tablet mode...

any further suggestions? Thanks again

@pfps
Copy link
Owner

pfps commented Aug 7, 2014

You have to run the orientation program, no daemons are set up.

When you run the orientation program, it should output some stuff saying whether it is working. If it is silent after some initial messages then something has gone wrong. Here is what I see:
yoga-laptop> orientation
iio device number being used is 4
iio trigger number being used is 4
Orientation 1, x: -19, y: -933, z: -298
Orientation at 0.0 is normal
Orientation 1, x: -13, y: -937, z: -312
Orientation at 1.0 is normal
ROTATE to normal
Orientation 1, x: -9, y: -939, z: -313
Orientation at 2.0 is normal
Orientation 1, x: -6, y: -938, z: -319
Orientation at 3.0 is normal
Orientation 1, x: -5, y: -939, z: -314
Orientation at 4.0 is normal
Orientation 1, x: -9, y: -939, z: -320

@marfnk
Copy link

marfnk commented Sep 2, 2014

So I have to run the orientation program on startup in background (eg. via the "Startup Applications" settings in Ubuntu)? Isn't that a bit inperformant?
What about a service that listens to changes?

@pfps
Copy link
Owner

pfps commented Sep 2, 2014

Certainly a service setup would be nice. However someone has to do the coding.

@soerengrunewald
Copy link

If you what to install the program as system service, the display needs to be set correctly.
I have a few patches which allows to pass the display, but I have to rebase them first. I also have a systemd service file for F20.

@jymbob
Copy link

jymbob commented Oct 8, 2014

+1 for running as a service, but many congrats on getting it working.

@pfps pfps closed this as completed Feb 8, 2015
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

6 participants