8000 iio-sensor-proxy: rotation issue · Issue #18 · fstanis/chuwi-minibook · GitHub
[go: up one dir, main page]

Skip to content

iio-sensor-proxy: rotation issue #18

Closed

Description

@EgorMaryasov

If video=DSI-1:panel_orientation=right is enabled, auto-rotation maintains a 90-degree screen rotation where the bottom edge is on the right.
Without video=DSI-1:panel_orientation=right, auto-rotation almost always maintains the correct orientation, with one exception: when the laptop is opened to an angle between 180 and 270 degrees, the landscape orientation is flipped 180 degrees. For instance, it is impossible to open the laptop to 220 degrees, rest the edge of the keyboard half against your leg, and use it as a tablet, because the image appears upside down.

Basic information

tools/check-status.sh output:

--- device ---

dmi vendor              CHUWI Innovation And Technology(ShenZhen)co.,Ltd
dmi product             MiniBook X
cpu                     Intel(R) N150
microcode               0x21
bios                    DNN20A V2.51 04/16/2025
display                 card1-DSI-1 1200x1920
panel rotation          normal, no static rotation (laptop mode reports right-up)
sleep mode              S3 (hardware)

--- kernel cmdline ---

i915.vbt_firmware       vbt
i915.enable_psr         0 (disabled)

--- vbt ---

skipped (intel_vbt_decode not found)

--- prerequisites ---

dkms                    ok
clang                   ok
curl                    ok
patch                   ok
meson                   MISSING
ninja                   MISSING
kernel headers          ok

--- modules ---

goodix_ts               7.2.3-minibook1, loaded, boot
goodix firmware         ok
minibook_ec             1.0, loaded, boot
dptf_enabler            1.0, loaded, boot
i2c_designware_spklen   1.0, loaded, boot

--- services ---

thermald                2.5.11.minibook1, enabled, running
iio-sensor-proxy        3.9.minibook1, static, running
                        sensor polling active (client claimed)


tools/detect-hardware.sh output:

ID                         DRIVER             NAME
dmi:vendor                 <empty>            CHUWI Innovation And Technology(ShenZhen)co.,Ltd
dmi:product                <empty>            MiniBook X
dmi:bios                   <empty>            DNN20A V2.51 04/16/2025
cpu:0                      <empty>            Intel(R) N150
pci:8086:46d4              i915               Intel Corporation Alder Lake-N [Intel Graphics]
pci:8086:461d              proc_thermal_pci   Intel Corporation Alder Lake Innovation Platform Framework Processor Participant
pci:8086:54ed              xhci_hcd           Intel Corporation Alder Lake-N PCH USB 3.2 Gen 2x1 (10 Gb/s) xHCI Host Controller
pci:8086:54f0              iwlwifi            Intel Corporation Alder Lake-N PCH CNVi WiFi
pci:8086:54c4              sdhci-pci          Intel Corporation Alder Lake-N eMMC Controller
pci:8086:54c8              snd_hda_intel      Intel Corporation Alder Lake-N PCH High Definition Audio Controller
pci:1e4b:1202              nvme               MAXIO Technology (Hangzhou) Ltd. NVMe SSD Controller MAP1202 (DRAM-less) (rev 01)
usb:8087:0026              usb                <empty>
usb:1b0a:2bc9              usb                Hy-Usb2.0-1*MIC
usb:25a7:fa11              usb                2.4G Wireless Receiver
usb:258a:0016              usb                Usb Gaming Keyboard
usb:041e:3272              usb                Pebble V3
usb:2109:8817              usb                USB Billboard Device   
usb:2109:8822              usb                USB Billboard Device   
usb:0bda:8153              r8152-cfgselector  USB 10/100/1000 LAN
i2c:GDIX1002               Goodix-TS          Goodix Capacitive TouchScreen
i2c:MDA6655                mxc4005            <empty>
i2c:XXXX0000               i2c_hid_acpi       XXXX0000:05 0911:5288 Touchpad
acpi:ACPI0003              <empty>            <empty>
acpi:ACPI000C              <empty>            <empty>
acpi:ACPI000E              <empty>            <empty>
acpi:GDIX1002              <empty>            <empty>
acpi:INT33A1               <empty>            <empty>
acpi:INT33D3               <empty>            <empty>
acpi:INT340E               <empty>            <empty>
acpi:INTC1041              <empty>            <empty>
acpi:INTC1046              <empty>            Thermistor Ambient
acpi:INTC1049              <empty>            Intel PCH FIVR Participant
acpi:INTC1057              <empty>            <empty>
acpi:INTC1060              <empty>            Platform Power
acpi:INTC1061              <empty>            Battery 1 Participant
acpi:INTC1070              <empty>            <empty>
acpi:INTC1099              <empty>            <empty>
acpi:MDA6655               <empty>            <empty>
acpi:MSFT0001              <empty>            <empty>
acpi:MSFT0101              <empty>            TPM 2.0 Device
acpi:PNP0103               <empty>            <empty>
acpi:PNP0C02               <empty>            <empty>
acpi:PNP0C02               <empty>            <empty>
acpi:PNP0C02               <empty>            <empty>
acpi:PNP0C09               <empty>            <empty>
acpi:PNP0C0A               <empty>            <empty>
acpi:PNP0C0C               <empty>            <empty>
acpi:PNP0C0D               <empty>            <empty>
acpi:PNP0C0E               <empty>            <empty>
acpi:PRP00001              <empty>            <empty>
acpi:PRP00001              <empty>            <empty>
acpi:XXXX0000              <empty>            <empty>
blk:nvme0n1                driver             AirDisk 512GB SSD (476 GB)
drm:card1-DSI-1            <empty>            Internal panel 1200x1920
backlight:intel_backlight  <empty>            raw
hwmon:hwmon0               <empty>            ADP1
hwmon:hwmon1               <empty>            acpitz
hwmon:hwmon2               <empty>            BAT0
hwmon:hwmon3               <empty>            nvme
hwmon:hwmon4               <empty>            minibook_soc
hwmon:hwmon5               <empty>            minibook_charger
hwmon:hwmon6               <empty>            minibook_fan
hwmon:hwmon7               <empty>            coretemp
hwmon:hwmon8               <empty>            iwlwifi_1
tpm:tpm0                   <empty>            v2

Activity

  1. karachungen commented on Sep 8, 2026

    @karachungen

    i have same issue, i had to remove video=DSI-1:panel_orientation=right in kernel settings

  2. fstanis commented on Sep 13, 2026

    @fstanis
    Owner

    If video=DSI-1:panel_orientation=right is enabled, auto-rotation maintains a 90-degree screen rotation where the bottom edge is on the right.

    This part is a known issue / deliberate, since it's not possible to reliably detect these bootloader settings. I mention it in the guide:

    chuwi-minibook/GUIDE.md

    Lines 184 to 187 in 62d00c2

    The patched proxy reports `right-up` whenever the device is in laptop mode, so
    the compositor applies the 270° portrait correction dynamically and switches to
    live accelerometer rotation in tablet mode. Do **not** combine this with a
    static rotation (kernel cmdline, VBT patch, xrandr script) - they will stack.

    So ideally, you don't want to use that alongside iio-sensor-proxy. That said, I just made #20 which would let you override this, if you prefer to use both. With that patch, you'd set MINIBOOK_PANEL_ORIENTATION to match your panel_orientation, in this case right_side_up. I haven't tested this, so I'd appreciate it if you could try it before I merge?

    BTW I just recently learned that video=DSI-1:panel_orientation=right_side_up is actually correct, rather than video=DSI-1:panel_orientation=right. Both work since the driver matches by first substring, but I corrected the docs just now.

    Without video=DSI-1:panel_orientation=right, auto-rotation almost always maintains the correct orientation, with one exception: when the laptop is opened to an angle between 180 and 270 degrees, the landscape orientation is flipped 180 degrees. For instance, it is impossible to open the laptop to 220 degrees, rest the edge of the keyboard half against your leg, and use it as a tablet, because the image appears upside down.

    This is also on purpose: between 180 and 270, you'd use the laptop in "tent mode" so that it can freely stand on a desk without holding it, kind of like a smart display.

  3. 4leite commented on Sep 15, 2026

    @4leite
    Collaborator

    I have been testing both #20 and #21 with vbt patched rotation
    Running Nixos on CHUWI MiniBook X n150

    If you're open to adding Nixos support, I can contrib a flake that applies the changes in this repo (equivalent to a bootstrap script).

    Regarding this issue:

    My testing shows that the current display orientation describes using the display sensor, but is actually using the base sensor. That works for tablet mode because they are married together, however in tent mode results in the 'upside down' display issue.

    This is also on purpose: between 180 and 270, you'd use the laptop in "tent mode" so that it can freely stand on a desk without holding it, kind of like a smart display.

    This doesn't follow logically. If the display is reporting it's orientation correctly then tent mode and "upside down tent mode on lap" ("cheese wedge mode"?) should both work correctly.

    I will raise a PR with more detailed evidence in the next few days when I get a chance.

    Thanks heaps for your work on this btw.

  4. EgorMaryasov commented on Sep 16, 2026

    @EgorMaryasov
    Author

    The laptop weighs nearly 1 kg. A hinge angle of 180–270 degrees would be very convenient—not just for tent mode, but also for tablet mode—so you wouldn't have to hold the device up in the air.

    Image Image
  5. EgorMaryasov commented on Sep 16, 2026

    @EgorMaryasov
    Author

    Sorry, I'm currently on vacation. I'll try #20 in the coming days.

  6. 4leite commented on Sep 16, 2026

    @4leite
    Collaborator

    Ok I have a tested working configuration with the patched vbt rotation pr #20 plus my newly raised #24 which adds an env variable to change the sensor used for calculating orientation. This gives me both tent modes working. The vbt rotation is not required to resolve this issue.

  7. fstanis commented on Sep 17, 2026

    @fstanis
    Owner

    This doesn't follow logically. If the display is reporting it's orientation correctly then tent mode and "upside down tent mode on lap" ("cheese wedge mode"?) should both work correctly.

    You're right, I didn't think this through at all. 🤦

    I think this was an incorrect bandaid that I applied in c775d13. I see you're already fixing this in #24, but just wanted to acknowledge my previous comment on "tent mode" being special was complete nonsense.

  8. fstanis commented on Nov 11, 2026

    @fstanis
    Owner

    Based on my investigation that was part of #33, I don't think there's a way to make iio-sensor-proxy work together with video=DSI-1:panel_orientation=.... This is due to the consumers such as iio-niri needing to take into account DRM, which they don't seem to, and it's beyond the scope of this project to patch all of them.

    That said, #33 should hopefully have fixed the outstanding issues with rotation, so sensors should be very smooth now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0