Jump to content

Lenovo IdeaPad Duet Chromebook (google-krane): Difference between revisions

From postmarketOS Wiki
Added instruction for auto-rotate fix
m fix the MR for HDMI out
 
(45 intermediate revisions by 16 users not shown)
Line 1: Line 1:
{{Infobox device
{{Infobox device
| manufacturer = Lenovo
| manufacturer = Lenovo
| name = IdeaPad Duet
| name = IdeaPad Duet Chromebook
| codename = google-krane
| codename = google-krane
| releaseyear = 2020
| releaseyear = 2020
| image = File:Lenovo-ideapad-duet.jpeg
| category = community
| imagecaption = Image of Lenovo IdeaPad Duet Chromebook
| image = File:KRANEKDE.jpg
| originalsoftware = ChromeOS on Linux 5.10
| imagecaption = Lenovo IdeaPad Duet Chromebook running postmarketOS
| originalsoftware = ChromeOS
| originalversion = ? (Linux 5.10)
<!-- Hardware -->
<!-- Hardware -->
| chipset = MediaTek Kompanio 500 (MT8183)
| chipset = MediaTek MT8183
| cpu = 4x 2.0 GHz ARM Cortex-A73, 4x 2.0 GHz ARM Cortex-A53
| cpu = 4x 2.0 GHz ARM Cortex-A73, 4x 2.0 GHz ARM Cortex-A53
| gpu = ARM Mali-G72 MP3 @ 800 MHz
| gpu = ARM Mali-G72 MP3 (Bifrost) @ 800 MHz
| display = 1920x1200 (16:10) IPS, 224 PPI
| display = 1920x1200 (16:10) IPS, 224 PPI
| storage = 64/128 GB eMMC
| storage = 64/128 GB eMMC
| memory = 4 GB LPDDR4X
| memory = 4 GB LPDDR4X
| architecture = aarch64
| architecture = aarch64
| type = tablet
| type = detachable
| whet_dhry = 4375.6
| whet_dhry = 4375.6
<!-- Features -->
<!-- Features -->
Line 28: Line 30:
| status_3d = Y
| status_3d = Y
| status_audio = Y
| status_audio = Y
| status_bluetooth = N
| status_bluetooth = Y
| status_camera = N
| status_camera = N
| status_gps = -
| status_gps = -
Line 38: Line 40:
<!-- Sensors -->
<!-- Sensors -->
| status_accel = Y
| status_accel = Y
| status_magnet = -
| status_magnet = Y
| status_light = Y
| status_light = Y
| status_proximity = -
| status_proximity = -
Line 45: Line 47:
| status_powersensor = -
| status_powersensor = -
<!-- Misc -->
<!-- Misc -->
| status_cameraflash = -
| status_keyboard = Y
| status_keyboard = Y
| status_touchpad = Y
| status_touchpad = Y
| status_usba = -
| status_usba = -
| status_hdmidp = -
| status_hdmidp = Y
| status_stylus = Y
| status_irtx = -
| status_irtx = -
| status_irrx = -
| status_haptics = -
| status_ethernet = -
| status_trustzone = -
| status_trustzone = -
| status_fossbootloader = -
| status_fossbootloader = -
| status_emmc = Y
| status_sdcard = -
| status_dvb = -
<!-- Not visible -->
<!-- Not visible -->
| booting = yes
| booting = yes
|genericdevice=Google Kukui Chromebook (google-kukui)
}}
}}
== Contributors ==
* [[user:Bonfire|Bonfire]]
* [[user:Jenneron|Jenneron]]


== Users owning this device ==
== Users owning this device ==
{{Device owners}}
{{Device owners}}


== Preparation ==
== Screen ==
==== Enable developer mode ====
 
Screen rotation works via accelerometer but is stuck +/- 90 degrees.
 
You might be able to offset it, by creating an udev rule (<code>/etc/udev/rules.d/61-cros-ec-accel.rules</code>).
To get it working properly, you have to swap the x and y values, as well as inverting the x-axis:
 
Create the following file:
<syntaxhighlight lang="shell-session">
# nano /etc/udev/rules.d/61-cros-ec-accel.rules
</syntaxhighlight>
 
Insert the following text:
<syntaxhighlight lang="text">
ACTION=="remove", GOTO="sensor_end"
SUBSYSTEM=="iio", KERNEL=="iio*", SUBSYSTEMS=="platform",
  ATTRS{modalias}=="platform:cros-ec-accel",
  ENV{ACCEL_MOUNT_MATRIX}="0, 1, 0; -1, 0, 0; 0, 0, -1",
  GOTO="sensor_end"
 
LABEL="sensor_end"
</syntaxhighlight>
 
 
=== HDMI out ===
HDMI out is being tested with {{MR|6358|pmaports}} and an USB-C to HDMI adapter as many USB-C dock devices offer is required.
 
One thing to note about external display is the SoC's display bandwidth is limited, so the highest display mode supported is 1080p@30. Most displays do not support 30Hz, so the resolution will be limited instead.
 
 
 
== Touchpad ==
 
The touchpad may require a large amount of pressure in order to detect cursor movement. To increase its sensitivity, you can add the following libinput quirk:
 
Create the following file:
<syntaxhighlight lang="shell-session">
# mkdir /etc/libinput
# cd /etc/libinput/
# nano local-overrides.quirks
</syntaxhighlight>
 
Insert the following text:
<syntaxhighlight lang="ini">
[Touchpad pressure override]
MatchUdevType=touchpad
MatchName=Google Inc. Hammer
AttrPressureRange=20:10
</syntaxhighlight>
 
== Cameras ==
 
Cameras are currently non-functional, due to lack of MTK DIP driver in mainline.
 
They do get detected with few devicetree patches (along with lens actuator and EEPROMs), but patch from MediaTek hasn't been merged, as they couldn't agree on creating DMA buffers.
 
Getting it to work would require significant effort, as it would have to be re-written accordingly to current kernel ABI.
 
https://lwn.net/ml/linux-media/7f8cb8c7-cbf2-40c9-ac8f-c3c9b97919d7@molgen.mpg.de/
 


# Press {{Button|Volume Down}} and {{Button|Volume Up}} buttons at the same time and boot the device.
== USI-pen ==
# You should see prompt saying '''Please insert a recovery USB stick''' with a helpful image showing USB port that doesn't exist on Duet.
# Press {{Button|Volume Up}} button, now you should see a menu with options like "Show Debug Info", "Cancel", "Power Off", and "Language".
# Press {{Button|Volume Up}} and {{Button|Volume Down}} buttons at the same time. Option "Show Debug Info" will be replaced with "Confirm Disabling OS Verification".
# Select this option by using volume buttons and confirm by pressing {{Button|Power}}.
# The device now should boot up in Developer Mode saying that it is INSECURE.


==== Enable booting from USB ====
=== Gnome ===


Boot into Chrome OS and follow [[Chrome_OS_devices#Enable_booting_from_external_storage]].
The cursor position is correctly displayed only in portrait orientation. To make the USI-pen work correctly in any orientation, do the following ([https://github.com/hexdump0815/imagebuilder/issues/53#issuecomment-1837517427 source]):


== Installation ==
Create the following file:
See [[Chrome_OS_devices#Installation]].
<syntaxhighlight lang="shell-session">
# mkdir /etc/libwacom
# nano /etc/libwacom/google-krane.tablet
</syntaxhighlight>


== Screen ==
Insert the following text:
<syntaxhighlight lang="ini">
[Device]
Name=hid-over-i2c 27C6:0E30 Stylus
ModelName=
DeviceMatch=i2c:27c6:0e30
Class=ISDV4
Width=5.35433
Height=8.54331
IntegratedIn=Display;System
Styli=@generic-no-eraser
 
[Features]
Stylus=true
Touch=false
</syntaxhighlight>
 
And also supplement or create a file:
<syntaxhighlight lang="shell-session">
# nano /etc/libinput/local-overrides.quirks
</syntaxhighlight>
 
<syntaxhighlight lang="ini">
[Google Chromebook Krane Stylus Digitizer]
MatchUdevType=tablet
MatchDeviceTree=*krane*
MatchBus=i2c
ModelChromebook=1
AttrPressureRange=1100:1000
</syntaxhighlight>
 
After all this is done, execute this and reboot:
<syntaxhighlight lang="shell-session">
# libwacom-update-db
</syntaxhighlight>
 
After that, the digitizer should take into account the screen rotation, and also, the digitizer settings menu will appear in the Gnome settings.
 
== Screen tweaks ==
 
=== Phosh ===
 
If you don't want to set the screen orientation and the scale new, after every reboot:
<syntaxhighlight lang="shell-session">
# cd /usr/share/phosh/
# nano phoc.ini
</syntaxhighlight>
 
Insert the following text:
<syntaxhighlight lang="ini">
[output:DSI-1]
rotate = 270
scale = 1.5
 
</syntaxhighlight>
 
Reboot.


Screen rotation works via accelerometer but is stuck +/- 90 degrees.
=== Gnome ===


You might be able to offset it, by creating an udev rule (<code>/etc/udev/rules.d/61-cros-ec-accel.rules</code>), as seen [https://github.com/systemd/systemd/pull/24276#issuecomment-1217901909 here].
In the latest versions of Gnome there is no option to select other display scales than 100% and 200%. You can enable intermediate options that are multiples of 25%, do so:
To get it working properly, you have to swap the x and y values, as well as inverting the x-axis:


# /etc/udev/rules.d/61-cros-ec-accel.rules
<syntaxhighlight lang="shell-session">
ACTION=="remove", GOTO="sensor_end"
$ gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
</syntaxhighlight>
SUBSYSTEM=="iio", KERNEL=="iio*", SUBSYSTEMS=="platform", \
  ATTRS{modalias}=="platform:cros-ec-accel", ATTR{location}=="base", \
  ENV{ACCEL_MOUNT_MATRIX}="0, -1, 0; -1, 0, 0; 0, 0, 1", \
  ENV{ACCEL_LOCATION}="base", \
  GOTO="sensor_end"
SUBSYSTEM=="iio", KERNEL=="iio*", SUBSYSTEMS=="platform", \
  ATTRS{modalias}=="platform:cros-ec-accel", ATTR{location}=="lid", \
  ENV{ACCEL_MOUNT_MATRIX}="0, 1, 0; -1, 0, 0; 0, 0, -1", \
  ENV{ACCEL_LOCATION}="display", \
  GOTO="sensor_end"
LABEL="sensor_end"


== FDE ==
=== pbsplash at boot ===


Use <code>pmbootstrap install --sdcard /dev/sdX --fde --add unl0kr</code>.
The pbsplash works in portrait mode during boot, regardless of the actual orientation of the device. If you are confused by this, you can switch to the option of showing the boot log, which happens in landscape mode ([https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/2239#note_1644222158 source]):
<syntaxhighlight lang="shell-session">
# nano /etc/deviceinfo
</syntaxhighlight>


== Bluetooth ==
Edit the appropriate line, preserving your parameters if they exist:
<syntaxhighlight lang="ini">
deviceinfo_kernel_cmdline_append=" PMOS_NOSPLASH console=tty1"
</syntaxhighlight>


Currently Bluetooth doesn't work and prints the following in <code>dmesg</code> on <code>Linux lenovo-duet 5.18.0-mt8183 #2-postmarketos-mediatek-mt8183 SMP PREEMPT Sat Nov 26 13:30:28  aarch64 GNU/Linux</code>:
And rebuild the boot kernel image:
<syntaxhighlight lang="shell-session">
# mkinitfs
</syntaxhighlight>


[  26.620104] Bluetooth: hci0: setting up ROME/QCA6390
== Desktop Environment ==
[  29.213184] Bluetooth: hci0: command 0xfc00 tx timeout
[  31.713082] vaux18: disabling
[  31.713126] vio28: disabling
[  37.340698] Bluetooth: hci0: Reading QCA version information failed (-110)
[  37.340740] Bluetooth: hci0: Retry BT power ON:0
[  71.197015] Bluetooth: hci0: command 0xfc00 tx timeout
[  79.166243] Bluetooth: hci0: Reading QCA version information failed (-110)
[  79.166288] Bluetooth: hci0: Retry BT power ON:1
[  111.998154] Bluetooth: hci0: command 0xfc00 tx timeout
[  120.126210] Bluetooth: hci0: Reading QCA version information failed (-110)
[  120.126254] Bluetooth: hci0: Retry BT power ON:2
[  152.958115] Bluetooth: hci0: command 0xfc00 tx timeout
[  161.086173] Bluetooth: hci0: Reading QCA version information failed (-110)


Similar errors have also been reported on https://wiki.archlinux.org/title/Talk:Dell_XPS_13_(9310)#Bluetooth so it looks like the chip drivers are crappy in general...
=== Phosh ===


Fwiw stock CrOS seemed to run a <code>5.10.142-19743-gd301e86c39f7 #1 SMP PREEMPT Mon Nov 7 21:22:34 PST 2022 aarch64</code> kernel.
When the keyboard is connected, you can switch between "Docked" and "Undocked" from the quick settings.
When you disconnect the keyboard, phosh automatically transitions into "Undocked" mode, automatically maximizing all of your windows.
To allow free form windows, you can run the following command:
<syntaxhighlight lang="shell-session">
$ gsettings set sm.puri.phoc auto-maximize false
</syntaxhighlight>
To switch back to auto-maximized windows run:
<syntaxhighlight lang="shell-session">
$ gsettings set sm.puri.phoc auto-maximize true
</syntaxhighlight>


== See also ==
== See also ==

Latest revision as of 13:19, 29 March 2025

Note This device is supported as part of a generic port. Refer to Google Kukui Chromebook (google-kukui) for installation instructions and more information.
Lenovo IdeaPad Duet Chromebook
Lenovo IdeaPad Duet Chromebook running postmarketOS
Lenovo IdeaPad Duet Chromebook running postmarketOS
Manufacturer Lenovo
Name IdeaPad Duet Chromebook
Codename google-krane
Released 2020
Type detachable
Hardware
Chipset MediaTek MT8183
CPU 4x 2.0 GHz ARM Cortex-A73, 4x 2.0 GHz ARM Cortex-A53
GPU ARM Mali-G72 MP3 (Bifrost) @ 800 MHz
Display 1920x1200 (16:10) IPS, 224 PPI
Storage 64/128 GB eMMC
Memory 4 GB LPDDR4X
Architecture aarch64
Software
Original software ChromeOS
Original version ? (Linux 5.10)
postmarketOS
Category community
Pre-built images yes
Unixbench Whet/Dhry score 4375.6
Generic port Google Kukui Chromebook (google-kukui)
Features
Internal storage
Works
Battery
Works
Screen
Works
Touchscreen
Works
Keyboard
Works
Touchpad
Works
Stylus
Works
Multimedia
3D Acceleration
Works
Audio
Works
Camera
Broken
Connectivity
WiFi
Works
Bluetooth
Works
Miscellaneous
FDE
Works
SATA/eSATA
No data
USB OTG
Works
HDMI/DP
Works
Sensors
Accelerometer
Works
Magnetometer
Works
Ambient Light
Works


Users owning this device

  • AlleM43 (Notes: Intermittent work on getting mainline Coreboot running)
  • Bonfire
  • Comcloudway (Notes: SKU176, 64GB eMMC)
  • Deathmist (Notes: SKU176, 128 GB eMMC, fake digitizer w/ 1 touchpoint max)
  • EspiDev (Notes: SKU0, 64 GB eMMC, Plasma Mobile)
  • Fann (Notes: CT-X636F 4/128 - GNOME, battery life is on par with ChromeOS, KDE and GNOME are laggy, phosh not)
  • JulianGro (Notes: Plasma Mobile, main device used for school, USI-pen)
  • JustinSUF (Notes: SKU176, 128 GB eMMC)
  • KenOokamiHoro
  • LongnoseRob (Notes: 1x 64G & 1x 128G model, pmOS (edge), UI: gnome)
  • Medusa (Notes: Borrowed from one of our contributors, working on u-boot/mainline)
  • Neko (Notes: Running Ultramarine with KDE)
  • Pomoke (Notes: 64GB eMMC)
  • WeirdTreeThing (Notes: SKU176, 128GB eMMC, no keyboard.)


Screen

Screen rotation works via accelerometer but is stuck +/- 90 degrees.

You might be able to offset it, by creating an udev rule (/etc/udev/rules.d/61-cros-ec-accel.rules). To get it working properly, you have to swap the x and y values, as well as inverting the x-axis:

Create the following file:

# nano /etc/udev/rules.d/61-cros-ec-accel.rules

Insert the following text:

ACTION=="remove", GOTO="sensor_end"
 
SUBSYSTEM=="iio", KERNEL=="iio*", SUBSYSTEMS=="platform", 
  ATTRS{modalias}=="platform:cros-ec-accel", 
  ENV{ACCEL_MOUNT_MATRIX}="0, 1, 0; -1, 0, 0; 0, 0, -1", 
  GOTO="sensor_end"

LABEL="sensor_end"


HDMI out

HDMI out is being tested with pmaports!6358 and an USB-C to HDMI adapter as many USB-C dock devices offer is required.

One thing to note about external display is the SoC's display bandwidth is limited, so the highest display mode supported is 1080p@30. Most displays do not support 30Hz, so the resolution will be limited instead.


Touchpad

The touchpad may require a large amount of pressure in order to detect cursor movement. To increase its sensitivity, you can add the following libinput quirk:

Create the following file:

# mkdir /etc/libinput
# cd /etc/libinput/
# nano local-overrides.quirks

Insert the following text:

[Touchpad pressure override]
MatchUdevType=touchpad
MatchName=Google Inc. Hammer
AttrPressureRange=20:10

Cameras

Cameras are currently non-functional, due to lack of MTK DIP driver in mainline.

They do get detected with few devicetree patches (along with lens actuator and EEPROMs), but patch from MediaTek hasn't been merged, as they couldn't agree on creating DMA buffers.

Getting it to work would require significant effort, as it would have to be re-written accordingly to current kernel ABI.

https://lwn.net/ml/linux-media/7f8cb8c7-cbf2-40c9-ac8f-c3c9b97919d7@molgen.mpg.de/


USI-pen

Gnome

The cursor position is correctly displayed only in portrait orientation. To make the USI-pen work correctly in any orientation, do the following (source):

Create the following file:

# mkdir /etc/libwacom
# nano /etc/libwacom/google-krane.tablet

Insert the following text:

[Device]
Name=hid-over-i2c 27C6:0E30 Stylus
ModelName=
DeviceMatch=i2c:27c6:0e30
Class=ISDV4
Width=5.35433
Height=8.54331
IntegratedIn=Display;System
Styli=@generic-no-eraser

[Features]
Stylus=true
Touch=false

And also supplement or create a file:

# nano /etc/libinput/local-overrides.quirks
[Google Chromebook Krane Stylus Digitizer]
MatchUdevType=tablet
MatchDeviceTree=*krane*
MatchBus=i2c
ModelChromebook=1
AttrPressureRange=1100:1000

After all this is done, execute this and reboot:

# libwacom-update-db

After that, the digitizer should take into account the screen rotation, and also, the digitizer settings menu will appear in the Gnome settings.

Screen tweaks

Phosh

If you don't want to set the screen orientation and the scale new, after every reboot:

# cd /usr/share/phosh/
# nano phoc.ini

Insert the following text:

[output:DSI-1]
rotate = 270
scale = 1.5

Reboot.

Gnome

In the latest versions of Gnome there is no option to select other display scales than 100% and 200%. You can enable intermediate options that are multiples of 25%, do so:

$ gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

pbsplash at boot

The pbsplash works in portrait mode during boot, regardless of the actual orientation of the device. If you are confused by this, you can switch to the option of showing the boot log, which happens in landscape mode (source):

# nano /etc/deviceinfo

Edit the appropriate line, preserving your parameters if they exist:

deviceinfo_kernel_cmdline_append=" PMOS_NOSPLASH console=tty1"

And rebuild the boot kernel image:

# mkinitfs

Desktop Environment

Phosh

When the keyboard is connected, you can switch between "Docked" and "Undocked" from the quick settings. When you disconnect the keyboard, phosh automatically transitions into "Undocked" mode, automatically maximizing all of your windows. To allow free form windows, you can run the following command:

$ gsettings set sm.puri.phoc auto-maximize false

To switch back to auto-maximized windows run:

$ gsettings set sm.puri.phoc auto-maximize true

See also