pfps / yoga-laptop

Systems and information to make Lenovo Yoga laptops work better
GNU General Public License v3.0
156 stars 30 forks source link

install orientation program #16

Closed rwijtvliet closed 9 years ago

rwijtvliet commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 https://github.com/pfps/yoga-laptop/issues/16#issuecomment-51206918.

rwijtvliet commented 10 years ago

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 commented 10 years ago

@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 commented 10 years ago

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 commented 10 years ago

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

marplx commented 10 years ago

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 commented 10 years ago

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

soerengrunewald commented 9 years ago

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 commented 9 years ago

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