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

Not working on Yoga 2 13 (non-pro) #30

Open
ghost opened this issue Jan 6, 2015 · 47 comments
Open

Not working on Yoga 2 13 (non-pro) #30

ghost opened this issue Jan 6, 2015 · 47 comments

Comments

@ghost
Copy link

ghost commented Jan 6, 2015

Using generic_buffer -c 10 -n als will only output one result at a time when executing cat on in_intensity_both_raw. Same for generic_buffer -c 10 -n gyro3d. No matter how I am tilting my device I allways get the same values back. "lsusb" is not giving me any device with Id 2047:0855. Also I can't find a device with iManufacturer Invensense or iInterface HID Sensor
Interface.

@pfps
Copy link
Owner

pfps commented Jan 6, 2015

It looks as if you have a different sensor from the Yoga 2 Pro.

Some sensors have glitches that require patches in the kernel. The most modern kernels have the most patches so updating your kernel if possible is a good first step.

If that doesn't work, the next step would be to figure out which sensor hub you do have.

@ghost
Copy link
Author

ghost commented Jan 7, 2015

This is the output of lsusb for the sensor package:

Bus 002 Device 007: ID 048d:8350 Integrated Technology Express, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x048d Integrated Technology Express, Inc.
  idProduct          0x8350 
  bcdDevice           10.10
  iManufacturer           1 ITE Tech. Inc.
  iProduct                2 ITE Device(8350)
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength    2913
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)

It seems that this sensor is the same as in the ThinkPad 8. I installed mainline Kernel 3.18.1, but it still produces the same behaviour.

@pfps
Copy link
Owner

pfps commented Feb 8, 2015

To make this work someone with both the hardware and knowledge of what is going on is going to have to take a look.

@Swizz
Copy link

Swizz commented Jul 24, 2015

Hi.

Do we have always any solution for this trouble ?

None value of sensors have been updated for :
tail -n +1 /sys/bus/iio/devices/iio:device*/*raw

@bagage
Copy link
Contributor

bagage commented Oct 4, 2015

Bumping this: I do have the hardware but not knowledge, would it be enough? :)

Sensors values are moving for rotation at least on Kernel 4.2.0-1 in /sys/bus/iio/devices/iio:device3/in_rot_quaternion_raw according to current rotation (device name is dev_rotation if it matters).
However orientation binary fails to detect rotations, I am not sure how to proceed here. Any hint @pfps ?

Thanks!

@Swizz
Copy link

Swizz commented Oct 4, 2015

For me, the quaternion worked fine at the 4.1 but not on the 4.2

At this day, none iio:device is working.

The value stay the same, and are updated only at boot.

@guilhem
Copy link

guilhem commented Oct 4, 2015

I patched kernel 4.3 to support yoga 3 14 and yoga 2 11.
It may work for yoga 2 13, have a look to rc1/2 ;)

@rickysarraf
Copy link

@guilhem Thx for your initial patch. The Yoga 2 13 has a different USB ID. At least, on my box it is different.

Bus 002 Device 006: ID 048d:8350 Integrated Technology Express, Inc.

So I added another quirk and tested. Works perfect now. :-)
FYI, for folks looking for automatic orientation changes, please look at iio-sensor-proxy project.

I've submitted the patch upstream. Meanwhile, if more people want try, following is the patch.

From 78466e63250f12f4ed006dff75c23248320e4cf0 Mon Sep 17 00:00:00 2001
From: Ritesh Raj Sarraf <[email protected]>
Date: Sun, 4 Oct 2015 22:39:35 +0530
Subject: [PATCH] Add quirk for Lenovo Yoga 2 with ITE Chips

Signed-off-by: Ritesh Raj Sarraf <[email protected]>
---
 drivers/hid/hid-ids.h        | 1 +
 drivers/hid/hid-sensor-hub.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index f769208..127c777 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -510,6 +510,7 @@

 #define USB_VENDOR_ID_ITE               0x048d
 #define USB_DEVICE_ID_ITE_LENOVO_YOGA   0x8386
+#define USB_DEVICE_ID_ITE_LENOVO_YOGA2  0x8350

 #define USB_VENDOR_ID_JABRA        0x0b0e
 #define USB_DEVICE_ID_JABRA_SPEAK_410  0x0412
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index a76eb2a..05afa25 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -777,6 +777,9 @@ static const struct hid_device_id sensor_hub_devices[] = {
    { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_ITE,
            USB_DEVICE_ID_ITE_LENOVO_YOGA),
            .driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
+   { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_ITE,
+           USB_DEVICE_ID_ITE_LENOVO_YOGA2),
+           .driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
    { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, HID_ANY_ID,
             HID_ANY_ID) },
    { }
-- 
2.5.3

@pfps
Copy link
Owner

pfps commented Oct 5, 2015

@bagage
I'm assuming you mean the 'orientation' program.
What you want to look at is the values for in_accel_[xyz]_raw in /sys/bus/iio/devices/iio:deviceX for the X that gets you the accelerometer.

If you are in /sys/bus/iio/devices you can just do
ls -l iio:device_/_accel*
to find the right device, or
cat iio:device
/__accel*raw
to see the three values. You should see something like

idefix devices> sudo cat iio:device_/__accel*raw
1
64821
64822

If you tilt your screen and try again you should see different values. If you don't, then something has gone wrong. The mostly likely culprit is a missing quirk.

@bagage
Copy link
Contributor

bagage commented Oct 5, 2015

@rickysarraf I tried your patch by recompiling kernel 4.3.0 rc2, but unfortunately it does not change anything on my Yoga 2 13 (same usb id) - are you using this kernel as well? If so, which config did you use to generate it? Could you provide it to me?

@pfps Thanks for these informations! I know what must be done now, hopefully @rickysarraf 's patch will solve soon. Great work here 👍 .

@rickysarraf
Copy link

The patch should be applied on top of Guilhem's patch, which is already
in 4.3 RC4. FYI, Jiri (Upstream maintainer) has queued my patch for
4.3. Hopefully, it may make to 4.3 final.
I tried it on 4.3 RC4 and then backported it to my 4.2 Stable kernel.
It works perfect in both of them.
When you say, "does not change anything", what do you mean ?
you need some tool to tap onto those data and act. For me, I'm using
iio-sensor-proxy.
On Mon, 2015-10-05 at 12:38 -0700, Gautier Pelloux-Prayer wrote:

@rickysarraf I tried your patch by recompiling kernel 4.3.0 rc2, but
unfortunately it does not change anything on my Yoga 2 13 (same usb
id) - are you using this kernel as well? If so, which config did you
use to generate it? Could you provide it to me?
@pfps Thanks for these informations! I know what must be done now,
hopefully @rickysarraf 's patch will solve soon. Great work here  .

Reply to this email directly or view it on GitHub.

Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

@rickysarraf
Copy link

@bagage
Copy link
Contributor

bagage commented Oct 6, 2015

@rickysarraf thanks for sharing your config, orientation is now working on 4.3.0-rc4 for me as well! I am not sure though if the config is responsible for this, or if this is because I patched rc4 instead of rc3.
It would be very great if Jiri could integrate your patch for final 4.3 kernel! :).

@rickysarraf
Copy link

@bagage Good to know that it worked for you too.

Since you have the same variant of the machine, could you please help me with some of the other issues that I've run through. Perhaps you may run through my blog post and let me know if you ran into those problems, and if so, if you've worked around it?

http://www.researchut.com/blog/lenovo-yoga-2-13-debian

@rickysarraf
Copy link

To everyone else on this bug report:

The Yoga 2 13 also has a variant with a rotational drive. Now that the sensors can feed the data, how about feeding this data into hdapsd, to park the head ?

I looked into hdapsd source and thought of feeding the same. The only catch is hdapsd, on what thresholds it uses to decide parking the head.

THe WD Rotational drive that comes with this variant by default has a very aggressive head parking algorithm. In summary, it parks the head at 4 seconds idle time, which can lead to very aggressive Load Cycle Count. But given the use case of this hybrid laptop, it does make sense to use an aggressive head parking logic.

I think the ideal override would be to increase the head park time to something like 15 secs, and instead let the sensors feed in the data, to park the head.

Sorry, if I'm hijacking this issue.

@bagage
Copy link
Contributor

bagage commented Oct 8, 2015

@rickysarraf: I read your blog, nice summary of yoga 2 13" issues ;). I personally only had to fix wifi issue as you stated using options rtl8723be fwlps=N ips=N.
I changed the initial harddrive with a SSD but did not ran any test on it - it just works :).

@evlas
Copy link

evlas commented Oct 31, 2015

Hi,
I have installed kubuntu 15.10, with 4.2.0-17 linux kernel, on my yoga 2 with 048d:8350 Integrated Technology Express chipset.
I have downloaded and patched 4.3-rc6 linux kernel. I have compiled the /driver/hid modules with "make -C /usr/src/linux-headers-uname -r M=pwd modules" command and installed, but the sensors don't work.
Can you help me?

@rickysarraf
Copy link

On Sat, 2015-10-31 at 08:38 -0700, Vito Ammirata wrote:

Hi,
I have installed kubuntu 15.10, with 4.2.0-17 linux kernel, on my
yoga 2 with 048d:8350 Integrated Technology Express chipset.
I have downloaded and patched 4.3-rc6 linux kernel. I have compiled
the /driver/hid modules with "make -C /usr/src/linux-headers-uname -r
M=pwd modules" command and installed, but the sensors don't work.
Can you help me?

THe hope was that it'll make into 4.3. But it did not (it went late).
That means now all users need to wait until 4.4.

It is queued, for 4.4.

Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

@evlas
Copy link

evlas commented Oct 31, 2015

I know it, but the same steps in Kubuntu 15.04 with 4.2 linux kernel work fine. Why it don't works in 15.10?
I tried the 4.3-rc6 kernel with yoga 2 patch, but it don't work even.

@rickysarraf
Copy link

On Sat, 2015-10-31 at 10:48 -0700, Vito Ammirata wrote:

I know it, but the same steps in Kubuntu 15.04 with 4.2 linux kernel
work fine. Why it don't works in 15.10?
I tried the 4.3-rc6 kernel with yoga 2 patch, but it don't work even.

I don't know what to answer, let alone the fact that both the patches
for ITE device were added only during the 4.3 dev cycle.

Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

@rickysarraf
Copy link

On Mon, 2015-11-02 at 23:15 +0530, Ritesh Raj Sarraf wrote:

On Sat, 2015-10-31 at 10:48 -0700, Vito Ammirata wrote:

I know it, but the same steps in Kubuntu 15.04 with 4.2 linux
kernel
work fine. Why it don't works in 15.10?
I tried the 4.3-rc6 kernel with yoga 2 patch, but it don't work
even.

I don't know what to answer, let alone the fact that both the patches
for ITE device were added only during the 4.3 dev cycle.

There may be some more changes that rolled up in 4.3 which has
inhibited the sensor data.

Last I had checked was, when preparing the patch, on 4.3 rc4, where it
worked fine. But now, with the final 4.3 release, it is not working.
And you mentioned to have tried it on RC6. So something broken in
between RC4 and RC6. That'll be a good place to start bisecting at.

For now, I'm back to 4.2.5, but will look at it when time permits.

Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

@rickysarraf
Copy link

@guilhem Does 4.3 final release work for you? Looks like something got broken in between ?

@rickysarraf
Copy link

Sorry for the noise. The issue was with a stale build. Linux kernel 4.3 works perfect with the patches.

@evlas
Copy link

evlas commented Nov 7, 2015

Can you post the kernel config file for Linux kernel 4.3?
I want try with another kernel config file.

What is your linux distribution?

@rickysarraf
Copy link

Here you go: https://gist.github.com/rickysarraf/f5137c57585eb3d7ce83

Distro is Debian. But kernel is obviously rolled by me.

@evlas
Copy link

evlas commented Nov 8, 2015

thanks you,
I try your config file.

@rickysarraf
Copy link

JFTR: the patches are now completely part of Linux 4.4, which means with 4.4 you will not have to patch anything.

@gevasiliou
Copy link

Hi,
Do you have any idea why kernel 4.4.0.22 that came up with Ubuntu 16.04, is not supporting automatic screen rotation in my Toshiba Radius 11 L10WC10C convertible netbook...?
PS: Also the yesterday update to 4.4.0.23 is not also providing auto screen rotation.

In my system lsusb reports exactly the same ITE 8350 as in people above with Yoga.

idVendor 0x048d Integrated Technology Express, Inc.
idProduct 0x8350
bcdDevice 10.17
iManufacturer 1 ITE Tech. Inc.
iProduct 2 ITE Device(8350)

Any ideas....? Should i patch the recent 4.4.0.23 kernel to try...?

@pfps
Copy link
Owner

pfps commented Jun 2, 2016

Hmm. I don't know why it isn't working on Ubuntu. I haven't been having
problems. It is more likely that something is going wrong with the "output"
side, i.e., your screen looks somehow different to the system.

I don't think that patching is necessary any more, but I run Fedora so I don't
know if the situation is different with Ubuntu.

peter

On 06/02/2016 07:15 AM, gevasiliou wrote:

Hi,
Do you have any idea why kernel 4.4.0.22 that came up with Ubuntu 16.04, is
not supporting automatic screen rotation in my Toshiba Radius 11 L10WC10C
convertible netbook...?
PS: Also the yesterday update to 4.4.0.23 is not also providing auto screen
rotation.

In my system lsusb reports exactly the same ITE 8350 as in people above with Yoga.

idVendor 0x048d Integrated Technology Express, Inc.
idProduct 0x8350
bcdDevice 10.17
iManufacturer 1 ITE Tech. Inc.
iProduct 2 ITE Device(8350)

Any ideas....? Should i patch the recent 4.4.0.23 kernel to try...?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#30 (comment), or
mute the thread
https://github.com/notifications/unsubscribe/AGT8e76R836JzP9iXyV9U6w74IgWQwwSks5qHuV1gaJpZM4DPDbh.

@rickysarraf
Copy link

@gevasiliou It depends on how Ubuntu has implemented it. On Debian, under GNOME, it works perfect.
There are other components that need to be enabled/supported to get it working. FYI, I use the iio-sensor-proxy + GNOME to sense and act on the rotation.

@gevasiliou
Copy link

gevasiliou commented Jun 3, 2016

Thank you guys for your feedback.
I installed iio-sensor-proxy (automatic installation by Ubuntu Software Center) but seems that is not my lucky day. I have to look a little bit for mismatch of sensor-proxy to my system.

Maybe i have to try another DE (i.e to replace built in Unity with Gnome) to see how it will go or could swtich distro to Debian + Gnome.

From my side (in case that anyone with Ubuntu 16.04 , kernel 4.4.0.23.41 & Unity is following) i can confirm that accelerator raw data in "/sys/bus/iio/devices/iio:device0/in_accel_x_raw" come and refresh (probably) correctly (ITE 8350 is either assigned to device0 or device1 - changes after every reboot), i can see my ITE 8350 device with $lsusb, i can see the corresponding hid modules with $lsmod and $modinfo, i can see with $dmesg that this device is recognized, so theoritically everything is there and should be working!
But it does not.

@rickysarraf
Copy link

On Fri, 2016-06-03 at 04:08 -0700, gevasiliou wrote:

Maybe i have to try another DE (i.e to replace built in Unity with Gnome) to
see how it will go or could swtich distro to Debian + Gnome.
From my side (in case the anyone with Ubuntu + Unity is following) i can
confirm that accelerator raw data in
"/sys/bus/iio/devices/iio:device0/in_accel_x_raw" come and refresh (probably)
correctly, (ITE 8350 is either assigned to device0 or device1 - changes after
every reboot), i can see my ITE 8350 with $lsusb, i can see the corresponding
hid modules with $lsmod and $modinfo, so theoritically everything is there and
should be working! 
But it does not.

GNOME added the support in 3.18, under Xorg. Maybe Ubuntu's Unity doesn't have
that functionality implemented. 

Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

@gevasiliou
Copy link

gevasiliou commented Jun 3, 2016

GNOME added the support in 3.18, under Xorg. Maybe Ubuntu's Unity doesn't have
that functionality implemented.

I will try to remove Unity and install Gnome 3.18, but as i can see around, this could be a headache , leading to instability.... Maybe fresh install is better.

@rickysarraf
Copy link

On Fri, 2016-06-03 at 08:28 -0700, gevasiliou wrote:

I will try to remove Unity and install Gnome 3.18, but as i can see around,
this sounds like a headache.

Since you intend to go through the pain, why not try it on something others have
reported working on. And then you can go work with your favorite distro.

For me, Debian + GNOME works

For Peter, Fedora works. I'm guessing he too is on GNOME.

So you could try either ones. Just make sure to use the latest Fedora (24) or
Debian (Unstable/Sid).

Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

@pfps
Copy link
Owner

pfps commented Jun 3, 2016

I'm on Fedora with XFCE (not XKCD which I initially typed).

peter

On 06/03/2016 09:13 AM, Ritesh Raj Sarraf wrote:

On Fri, 2016-06-03 at 08:28 -0700, gevasiliou wrote:

I will try to remove Unity and install Gnome 3.18, but as i can see around,
this sounds like a headache.

Since you intend to go through the pain, why not try it on something others have
reported working on. And then you can go work with your favorite distro.

For me, Debian + GNOME works

For Peter, Fedora works. I'm guessing he too is on GNOME.

So you could try either ones. Just make sure to use the latest Fedora (24) or
Debian (Unstable/Sid).

Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#30 (comment), or
mute the thread
https://github.com/notifications/unsubscribe/AGT8e49969VyhaInDbkcuSd9RGQdMokVks5qIFK1gaJpZM4DPDbh.

@gevasiliou
Copy link

Yeah, why not... Pain is my middle name! LoL :-)

@gevasiliou
Copy link

gevasiliou commented Jun 7, 2016

Hello,
Test Update: Tested with Ubuntu 16.04 + Gnome 3.18 and runs like a charm.
Auto screen rotation works fine, iio-sensor-proxy is included by default in a fresh UbuntuGnome instalation.

PS1: By the way, rest Gnome features needed to work my laptop as a tablet, seems not to function as well as did Unity (i.e gnome screen keyboard sucks, touchscreen click response is moderate, etc - still working on these issues). But in any case, screen rotation works perfectly with Gnome 3.18.

PS2: I was not able to install Debian 8.4 + Gnome... For some reason, my usb stick was not "auto booting" when equipped with Debian 8.4 iso image. The same usb stick boot correctly with Ubuntu + Gnome iso image (in both cases, Rufus was used).

@rickysarraf
Copy link

On Tue, 2016-06-07 at 01:27 -0700, gevasiliou wrote:

Hello,
Test Update: Tested with Ubuntu 16.04 + Gnome 3.18 and it runs as a charm. 
Auto screen rotation works fine, iio-sensor-proxy is included by default in a
fresh UbuntuGnome instalation.
PS1: By the way, rest Gnome features needed to work my laptop as a tablet,
seems not to function as well as did Unity (i.e gnome screen keyboard sucks,
touchscreen click response is moderate, etc - still working on these issues).
But in any case, screen rotation works perfectly with Gnome 3.18.

I am glad it worked for you. I'm curious about Unity because it is not available
anywhere else than Ubuntu. Does touch support work well in Unity? What about in
comparison to GNOME 3.18+ ?

On the keyboard front, Yes, I have to agree. That's why I use onboard. It should
be well supported on Ubuntu too.

https://launchpad.net/onboard

PS2: I was not able to install Debian 8.4 + Gnome... For some reason, my usb
stick was not "auto booting" when equipped with Debian 8.4 iso image. The same
usb stick boot correctly with Ubuntu + Gnome iso image (in both cases, Rufus

was used).

Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

@gevasiliou
Copy link

As a general idea, touch events work great in Unity.
If Unity was capable to support auto screen rotation most probably i would stuck there.

On the other hand I have to admit that Gnome3 is an impressive DE and is quite customizable with the gnome extensions.

In any case i suppose as long as i go further with Gnome3 i will find pros and cons.

FireFox sucks in both cases (touch support is terrible - no zoom in / zoom out, no scrolling).

Chromium on Gnome for some reason doesn't support onboard keyboard (!) and this is problem.
On Unity with Chrome & OnBoard evertything worked perfect.

Application switching in Unity seems a bit easier than Gnome (one click actions = one touch actions), but Gnome Dash and Overview is a great nice looking tool and combined with the dash to dock extension makes the whole experience much better.

In any case, i will keep testing and customizing...

@gevasiliou
Copy link

Hello,
Any idea why iio-sensor-proxy / automatic screen rotation is not working on a new Debian jessie with latest XFCE...?

@rickysarraf
Copy link

The automatic screen rotation is done by the wm. In case of gnome, mutter
does it. Not sure about xfce. iio-sensory is only the proxy to the sensors.

sent fr0m a $martph0nè, excuse typ0s
On 04-Jul-2016 01:42, "gevasiliou" [email protected] wrote:

Hello,
Any idea why iio-sensor-proxy / automatic screen rotation is not working on
a new Debian jessie with latest XFCE...?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#30 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAD_yCdJoDAUFtMQsBA1g52PXH1b6I4Oks5qSEjJgaJpZM4DPDbh
.

@gevasiliou
Copy link

gevasiliou commented Jul 4, 2016

Hm.... This is interesting.
I hadn't realize that Window Manager is responsible for the auto screen rotation. According to XFCE web site, the default is xfwm4 for xfce4.12, but i'm not sure if i'm using this xfwm4 or the previously installed openbox (i installed xfce4.12 over a Debian Jessie distro that came out with OpenBox pre-installed).
I have to check and -why not - to try a different wm. We know that mutter works. In any case i will raise a question to the proxy sensor programmer.

PS: I'm just curious Peter (pfps) who confirmed that iio-sensor-proxy works ok for him under Fedora + XFCE, which WM is using.

@rickysarraf
Copy link

On Mon, 2016-07-04 at 03:30 -0700, gevasiliou wrote:

Hm.... This is interesting. 
I hadn't realize that Window Manager is responsible for the auto screen
rotation. According to XFCE web site, the default is xfwm4 for xfce4.12, but
i'm not sure if i'm using this xfwm4 or the previously installed openbox (i
installed xfce4.12 over a Debian Jessie distro that came out with OpenBox pre-
installed).
I have to check and -why not - to try a different wm. We know that mutter
works. In any case i will raise a question to the proxy sensor programmer

The good news is that Mutter will now support it under Wayland too. :-)
https://bugzilla.gnome.org/show_bug.cgi?id=745079
https://git.gnome.org/browse/mutter//commit/?id=efef0c993b7e45c1a5d06afffdf302c3
0ba441a0&utm_source=anzwix

Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

@gevasiliou
Copy link

As expected, iio-sensor-proxy programmer replied that if sensor proxy doesn't work under xfce then it is an xfce problem since they do not make use of the provided sensor proxy api. Makes sense.
On the other hand i'm getting more and more curious how Peter did the trick on Fedora - XFCE.....

@pfps
Copy link
Owner

pfps commented Jul 4, 2016

I don't see that the WM would matter here.

There are three main causes of failure. First, the sensor interface might not
be working. There is no WM involvement here are at, as far as I can tell.
Second, the screen rotation might not be working. As the code uses xrandr to
rotate the screen, there is only minimal involvement from the WM. Third,
there is finding the screen and touchscreen.

Running the program with --debug 4 should help to find out what is going on.
If you see messages that show the sensor values then the sensor interface is
working. If you don't, then there is something wrong in this part. If you
see messages about rotating the screen but nothing happens, then something is
preventing screen rotation. If you see error messages from xrandr or a
message about being unable to find the touchscreen then there is a problem
with the connection to the screen or touchscreen.

You can run xrandr and xinput directly to see if they work.

peter

On 07/04/2016 04:13 AM, gevasiliou wrote:

As expected, iio-sensor-proxy programmer replied that if sensor proxy doesn't
work under xfce then it is an xfce problem since they do not make use of the
provided sensor proxy api. Makes sense.
On the other hand i'm getting more and more curious how Peter did the trick on
Fedora - XFCE.....


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#30 (comment), or
mute the thread
https://github.com/notifications/unsubscribe/AGT8e4BbmPwePAzYwJWx9EIF3EW7e9XSks5qSOrygaJpZM4DPDbh.

@gevasiliou
Copy link

Thanks Peter for the reply.
I will try manual xrandr rotation and i will also try --debug.
As far i as i have followed iio-sensor-proxy instructions, it seems that sensors are detected and working ok, like in Ubuntu - Gnome installation (is the same machine).

iio-sensor-proxy.service is loaded (i also tried systemctl stop and start in sequence), output of the #monitor-sensor is correct.

I tend to believe that it could be just xfce who is not making use of this sensor-proxy api as sensor-proxy programmer advised.

Theoritically, somebody has to look at iio-sensor-proxy api, and rotate the screen.
This "somebody" could be your DE , your WM or even your distro.
In my case Ubuntu + Unity didn't worked. Ubuntu+Gnome works, Debian + XFCE seems not to work.

In your case maybe Fedora takes care for screen rotation.
In any case, i will try testing and will see.

@gevasiliou
Copy link

gevasiliou commented Jul 5, 2016

Hello,
During yesterday evening testing, it is true that I do use xfwm and not openbox.
About screen rotation i can rotate screen manually using xrandr --rotate, but xfce keeps refusing to auto rotate the screen. Although i didn't try the debug options, but i don't expect any surprises since #monitor-sensor works fine on my set up.

I have raised a question to xfce people to see if this issue is familiar to them.

By the way i was capable to achieve auto rotation under xfce by modifying this script which is based on iio-sensor-proxy: http://linuxappfinder.com/blog/auto_screen_rotation_in_ubuntu

But i'm curious to know if screen auto rotation is natively supported on xfce , like in Gnome 3.18

PS: I just noticed that Qt5.7 also supports iio-sensor-proxy, but i'm not sure what Qt5 it is (a DE or a WM or both).

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

7 participants