• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Linux Mint 18.3 for Lenovo Yoga Book YB1-X91F - ISO & Request for Help

Search This thread

jimnarey

New member
Apr 26, 2018
4
3
Hi,

Firstly, installing desktop OS's of whatever sort on the Android version (YB1-X90F), insofar as anyone has managed it, is a completely different process and none of what follows is likely to be relevant.

Secondly, it should go without saying that any use of the linked ISO or the information in this post is entirely at your own risk.

There are several threads on xda and elsewhere dealing with attempts to install Linux on the Windows version of the Yoga Book (YB1-X91F). They're pretty consistent in terms of results, both with each other and my own attempts. I have tried the latest and previous LTS or main releases Debian, Ubuntu (all flavours), Mint and Fedora.

Between mine and others' attempts, most distros have the following working, using a Live ISO flashed to USB:

- Boot to desktop and successful install to eMMC
- Display
- Graphics pad responds to touches, but not aligned with screen rotation and probably in need of other calibration.
- USB, including ethernet-to-USB adapter

Some distros/versions additionally have:
- Touchscreen (only newer kernels, I think 4.13 onwards but definitely 4.15 onwards)
- Sound via HDMI
- Not sure about Bluetooth - possibly

The following didn't work with any distos/versions:
- A lot of the ACPI subsystem, meaning that some ICs (e.g. SD Card) don't receive power.
- Wifi
- SD Card
- Sound via headphones or speakers
- Halo Keyboard
- Touchscreen multitouch
- Battery gauge
- OS control of battery charger IC, though the IC sits in autonomous mode so the device still charges
- Display brightness adjustment (always set to max)
- Display auto-rotate

The Mint ISO linked at the end of this post has WiFi, the SD Card, two-finger right click and brightness adjustment working in addition to the OOTB functionality. I've made a lot of progress on the sound - the driver and codec load but it needs some configuration. I have read elsewhere that configuring this incorrectly can blow your speakers which is why I haven't tackled it yet.

The Halo keyboard doesn't work yet, so the Yoga Book can't be used in laptop mode for now. The only real barrier to using it in tablet mode is the lack of a functioning battery gauge. More on this below.

Instructions:

You will need a USB flash drive of at least 2GB, a USB keyboard and mouse and therefore a USB hub as well as a way of attaching it to the micro-usb port. I use an OTG adapter which came with a Samsung phone.

The touchscreen does not work when the Live ISO boots but it does work after installation.

Once Linux is installed on the eMMC, the firmware will boot to GRUB by default rather than Windows. To boot into Windows you have to enter the firmware menu. This should be easy to fix/reconfigure but I haven't got round to it yet. I need to get the volume and power keys working in GRUB first.

- Download the ISO from the link below and flash to USB. I use Etcher on MacOS which flashes in a dd-like manner (other tools make their own changes to the target drive to make it bootable - this isn't needed or desirable).
- Turn off hibernate, fast boot and secure boot in Windows. There are easily found guides on how to do this. It ought to be possible to retain secure boot but I have found doing so a real headache on other systems so didn't try in this case.
- Turn off any secure boot settings in the device firmware (access the menu by powering on with the volume up button pressed down).
- Using the firmware menu, boot from the flashed USB drive. When the desktop boots, use GParted to shrink the Windows partition, leaving at least 11GB (Mint says it needs 10.7GB). I've been messing around with Linux for months now on the YB and have found 11 enough.
- Run the desktop installer. At the partitioning menu, choose 'Something else'.
- Create a new Ext4 partition using all of the free space created previously and map it to '/'.
- Ignore any warnings about a swap partition. If you get stuck on a dialog about forcing a UEFI install, open a terminal and run 'killall ubiquity' then run the installer again with the network connection turned off. If the install doesn't work, you may have to risk the default 'Install Mint alongside Windows....' option. I have never had a problem with this, but I don't quite trust it, or indeed the installer in general.
- If you fail at the point of GRUB install, go back and start again with networking disabled.
- Just reboot as normal.

Changes from Stock ISO (probably not exhaustive)

- New ISO using 18.3 Cinnamon as a base using Cubic
- Updated, inc dist-upgrade as of 6 Sept 18
- Missing Broadcom firmware (for WiFi) added.
- Additions to /etc/skel/.config to put Mint into HiDPI mode
- Florence on screen keyboard added and loads on start
- Touchegg, which enables two-finger right click added and loads on start.
- LightDM settings changed to enable Florence and HiDPI
- Most importantly, a custom kernel (4.18.5) which is responsible for most of the above-OOTB functionality. Some of this is just about enabling the correct Atom ACPI ICs, other bits relate to load order (to get past the lack of brightness control).

Help!

- I really need some help with the battery gauge IC. For now, dmesg is the best bet but I'll follow up with another post with more detail.
- There are other things which need doing, e.g. the keyboard and finishing off the sound but these are relatively straightforward by comparison. The gauge/charger setup is the last low level thing not working.

Custom ISO:

This is my first post. I can't post links! Remove the spaces and ..... :

drive.google.com/ .... open? .... id=1-5vtnKAVpERmzTFIR3TGXe1DgvoFvehc
 
  • Like
Reactions: nan0s7

jimnarey

New member
Apr 26, 2018
4
3
Help Needed - Battery Gauge/Charger

The issue

The following can be seen by running 'dmesg' after boot using the ISO in my first post, which uses a 4.18 kernel customised for the hardware in the Yoga Book.

The kernel attempts to load the driver for the TI bq24190 battery charger IC. I'm not yet able to post links so search for 'bq24190_charger.c' in the Linux kernel Github repo. The driver throws an error on boot when it hits this code at line 1640. It's expecting a 6 and it gets a 4, the value of BQ24190_REG_VPRS_PN_24190.

bq24190_charger.c
Code:
	if (v != BQ24190_REG_VPRS_PN_24190 &&
	    v != BQ24190_REG_VPRS_PN_24192I) {
		dev_err(bdi->dev, "Error unknown model: 0x%02x\n", v);
		return -ENODEV;
	}

If I remove this check altogether and re-compile the module then the driver proceeds to load but reports zeroes for all status values. It's not clear whether it is, in fact, the right chip and isn't talking to the rest of the hardware or it's simply the wrong driver.

However, at least removing this check allows the Whiskey Cove ACPI IC driver to get a bit further along. Search for 'intel_cht_int33fe.c' in the kernel source. Comments in this file (line 124) confirm that this IC is expected to be paired with a bq24190.

By adding in dmesg warnings and re-compiling the int33fe module I could see that when an unmodified bq24190 driver is used, i.e. the check above takes place and is failed, the int33fe driver fails its own check at line 138:

intel_cht_int33fe.c
Code:
regulator = regulator_get_optional(dev, "cht_wc_usb_typec_vbus");
	if (IS_ERR(regulator)) {
		ret = PTR_ERR(regulator);
		return (ret == -ENODEV) ? -EPROBE_DEFER : ret;
	}
	regulator_put(regulator);

When I remove the check, it fails at the next check starting at line 145:

Code:
	/* The FUSB302 uses the irq at index 1 and is the only irq user */
	fusb302_irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 1);
	if (fusb302_irq < 0) {
		if (fusb302_irq != -EPROBE_DEFER)
			dev_err(dev, "Error getting FUSB302 irq\n");
		return fusb302_irq;
	}

I have tried various combinations of including the FUSB driver and dependencies as modules/built in but the result is the same. I also tried moving the FUSB check to after the code which tries to link up with the max17047 battery gauge IC, but this fails also.

Some owners of the Android version of the Yoga Book have posted files/screenshots on Telegram which indicate that a different charger, the bq25892 is used. As far as I know i2c devices are simply identified by the fact that they occupy a certain address on the bus. You can see in the datasheet for the bq24190 (sorry, no links!) on page 3 that it uses i2c address 6BH. The datasheet for the bq25890/2 shows on page 5 that the bq25892 also uses 6BH.

I don't know enough about i2c to know whether this is the issue, or how to point Linux to a different driver in the way that you might using a VID:pID for a USB or PCI device? It would be really helpful if anybody could definitively confirm which chip we are dealing with.

Some final ACPI errors crop up towards the end of the dmesg output (I've cleared all the others) and I suspect that sorting this will clear them, as well as making the Yoga Book with Mint usable in Tablet mode.

Other things which need fixing:

- There are sound errors in the dmesg output but it also shows that the drivers and codec are loading properly. I can see all the devices which should be visible in amixer from the command line. Because getting the config wrong can blow speakers I've resisted tackling this until I've done further research but if anyone has a solution please let me know.
- Halo Keyboard. This needs either a kernel module to be written or a software layer which runs at least under X. I don't expect this to be hugely difficult - Linux can see the Halo as a wacom graphics pad and take input, albeit not deal with it properly yet. There's also a mystery, generic HID device which by process of elimination must be the button/backlight. However, the generic HID driver loads so it shouldn't be too hard to work out how to talk to it.
- I re-built the ISO using Cubic. When I have tried to make ISOs which use my custom kernel to boot the ISO itself, they don't work. I get garbled graphics and the boot stalls. This is why the touchscreen doesn't work when you live boot (which uses 4.10) but does when you install (because it uses 4.18). This ought not to be insurmountable but I haven't cracked it yet. I've tried doing it manually and using the Debian live-boot commands for both Debian/Ubuntu. Still no luck.
- Until I can get a custom ISO to boot from a custom kernel it won't be possible to install on the SD Card. Otherwise, there's no reason this shouldn't be possible.
- It should be possible to install to another USB device now, but I haven't tried yet. Make sure to use the disable MMC script on the desktop if you don't want to install Grub EFI on the eMMC. Ubuntu and derivatives ignore whatever you choose for this and just use the fist EFI partition they find. Amazingly this bug has been there since 2014!
- It ought to be possible to map the hardware buttons (volume, power) to specific keys in Grub, possibly using a locale. This would allow selections to be made without a keyboard.
 
  • Like
Reactions: nan0s7

intense.feel

New member
Feb 24, 2017
2
3
android install

This might be related as I was just installing windows on Android version and now reverted back (https://forum.xda-developers.com/showpost.php?p=77556606&postcount=44), couple of observations that might help you: On android reinstall back it required to activate halo keyboard to get it working again, there was a phone code entered into the search bar to get it activated which triggered something called easyimage app. In android stock image you can actually find easyimage.zip which I guess is this "fake android update" to install the halo keyboard. Inside the zip are *.so libraries and some files related to halo keyboard and ink pen so you could try to play with those to get it working under classic Linux.

DNX mode allows to boot EFI via a USB cable &*fastboot (I guess windows version have also this as I activated it somewhere in BIOS?) so this can be also alternative version of booting an OS. IMHO Grub can also chainload iso image directly (I did it in past on normal PC, it was a couple of years ago so I can't find the guide to do it now) so in theory you can just place the Linux ISO image as a normal iso file on disk and tell GRUB to chainload that directly. Since it's possible to revert the Windows installation back to Android it might even be possible to dualboot. Android bootloader is also EFI based (kernelflinger) so you could also play with that. TWRP recovery image have full touch support for screen so that might be also a help when digging for configuration or extracting it from the sources.
 
  • Like
Reactions: nan0s7

jimnarey

New member
Apr 26, 2018
4
3
...you can actually find easyimage.zip which I guess is this "fake android update" to install the halo keyboard. Inside the zip are *.so libraries and some files related to halo keyboard and ink pen so you could try to play with those to get it working under classic Linux.

This is really helpful, thank you. I'll have a look at what's there.

Still no progress with the battery gauge...
 
  • Like
Reactions: nan0s7

thipok17

Senior Member
Mar 9, 2014
91
17
18
Trang
tinlethax.wordpress.com
This might be related as I was just installing windows on Android version and now reverted back (https://forum.xda-developers.com/showpost.php?p=77556606&postcount=44), couple of observations that might help you: On android reinstall back it required to activate halo keyboard to get it working again, there was a phone code entered into the search bar to get it activated which triggered something called easyimage app. In android stock image you can actually find easyimage.zip which I guess is this "fake android update" to install the halo keyboard. Inside the zip are *.so libraries and some files related to halo keyboard and ink pen so you could try to play with those to get it working under classic Linux.

DNX mode allows to boot EFI via a USB cable &*fastboot (I guess windows version have also this as I activated it somewhere in BIOS?) so this can be also alternative version of booting an OS. IMHO Grub can also chainload iso image directly (I did it in past on normal PC, it was a couple of years ago so I can't find the guide to do it now) so in theory you can just place the Linux ISO image as a normal iso file on disk and tell GRUB to chainload that directly. Since it's possible to revert the Windows installation back to Android it might even be possible to dualboot. Android bootloader is also EFI based (kernelflinger) so you could also play with that. TWRP recovery image have full touch support for screen so that might be also a help when digging for configuration or extracting it from the sources.

I'm currently doing on that without the Hardware. my plan is to find the small / light weight linux kernel and port the driver of the HALO. I call this Project HALO port (not on github cuz I just gathering everything until I ready). right now I'm learning to compile the kernel because I never do that (3 years on linux xD). I hope soon I can figure out the protocol it did uses for the HALO (My guess is I2C/SMBus).
 
  • Like
Reactions: nan0s7

nan0s7

Senior Member
Feb 10, 2017
169
73
<-- in 'straya
Woah this is amazing progress! I haven't been on the forums for a while; been working mostly on messing with Windows to make it more efficient and responsive lol.
 

nan0s7

Senior Member
Feb 10, 2017
169
73
<-- in 'straya
The issue

The following can be seen by running 'dmesg' after boot using the ISO in my first post, which uses a 4.18 kernel customised for the hardware in the Yoga Book.

The kernel attempts to load the driver for the TI bq24190 battery charger IC. I'm not yet able to post links so search for 'bq24190_charger.c' in the Linux kernel Github repo. The driver throws an error on boot when it hits this code at line 1640. It's expecting a 6 and it gets a 4, the value of BQ24190_REG_VPRS_PN_24190.

bq24190_charger.c
Code:
	if (v != BQ24190_REG_VPRS_PN_24190 &&
	    v != BQ24190_REG_VPRS_PN_24192I) {
		dev_err(bdi->dev, "Error unknown model: 0x%02x\n", v);
		return -ENODEV;
	}

If I remove this check altogether and re-compile the module then the driver proceeds to load but reports zeroes for all status values. It's not clear whether it is, in fact, the right chip and isn't talking to the rest of the hardware or it's simply the wrong driver.

However, at least removing this check allows the Whiskey Cove ACPI IC driver to get a bit further along. Search for 'intel_cht_int33fe.c' in the kernel source. Comments in this file (line 124) confirm that this IC is expected to be paired with a bq24190.

By adding in dmesg warnings and re-compiling the int33fe module I could see that when an unmodified bq24190 driver is used, i.e. the check above takes place and is failed, the int33fe driver fails its own check at line 138:

intel_cht_int33fe.c
Code:
regulator = regulator_get_optional(dev, "cht_wc_usb_typec_vbus");
	if (IS_ERR(regulator)) {
		ret = PTR_ERR(regulator);
		return (ret == -ENODEV) ? -EPROBE_DEFER : ret;
	}
	regulator_put(regulator);

When I remove the check, it fails at the next check starting at line 145:

Code:
	/* The FUSB302 uses the irq at index 1 and is the only irq user */
	fusb302_irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 1);
	if (fusb302_irq < 0) {
		if (fusb302_irq != -EPROBE_DEFER)
			dev_err(dev, "Error getting FUSB302 irq\n");
		return fusb302_irq;
	}

I have tried various combinations of including the FUSB driver and dependencies as modules/built in but the result is the same. I also tried moving the FUSB check to after the code which tries to link up with the max17047 battery gauge IC, but this fails also.

Some owners of the Android version of the Yoga Book have posted files/screenshots on Telegram which indicate that a different charger, the bq25892 is used. As far as I know i2c devices are simply identified by the fact that they occupy a certain address on the bus. You can see in the datasheet for the bq24190 (sorry, no links!) on page 3 that it uses i2c address 6BH. The datasheet for the bq25890/2 shows on page 5 that the bq25892 also uses 6BH.

I don't know enough about i2c to know whether this is the issue, or how to point Linux to a different driver in the way that you might using a VID:pID for a USB or PCI device? It would be really helpful if anybody could definitively confirm which chip we are dealing with.

Some final ACPI errors crop up towards the end of the dmesg output (I've cleared all the others) and I suspect that sorting this will clear them, as well as making the Yoga Book with Mint usable in Tablet mode.

Other things which need fixing:

- There are sound errors in the dmesg output but it also shows that the drivers and codec are loading properly. I can see all the devices which should be visible in amixer from the command line. Because getting the config wrong can blow speakers I've resisted tackling this until I've done further research but if anyone has a solution please let me know.
- Halo Keyboard. This needs either a kernel module to be written or a software layer which runs at least under X. I don't expect this to be hugely difficult - Linux can see the Halo as a wacom graphics pad and take input, albeit not deal with it properly yet. There's also a mystery, generic HID device which by process of elimination must be the button/backlight. However, the generic HID driver loads so it shouldn't be too hard to work out how to talk to it.
- I re-built the ISO using Cubic. When I have tried to make ISOs which use my custom kernel to boot the ISO itself, they don't work. I get garbled graphics and the boot stalls. This is why the touchscreen doesn't work when you live boot (which uses 4.10) but does when you install (because it uses 4.18). This ought not to be insurmountable but I haven't cracked it yet. I've tried doing it manually and using the Debian live-boot commands for both Debian/Ubuntu. Still no luck.
- Until I can get a custom ISO to boot from a custom kernel it won't be possible to install on the SD Card. Otherwise, there's no reason this shouldn't be possible.
- It should be possible to install to another USB device now, but I haven't tried yet. Make sure to use the disable MMC script on the desktop if you don't want to install Grub EFI on the eMMC. Ubuntu and derivatives ignore whatever you choose for this and just use the fist EFI partition they find. Amazingly this bug has been there since 2014!
- It ought to be possible to map the hardware buttons (volume, power) to specific keys in Grub, possibly using a locale. This would allow selections to be made without a keyboard.

Not sure if you've seen, but this issue on the above GitHub project that has managed to get the battery gauge working says they're using the BQ27542.

https://github.com/jekhor/yogabook-linux-kernel/commit/f0b7662fa10f012410170c241a9fa91295f54dc1
 

jekhor

Member
Feb 28, 2018
26
7
Hi, I am the author of the repository mentioned above, https://github.com/jekhor/yogabook-linux. My linux porting efforts were focused at kernel, getting battery charger driver and halo keyboard working basically. So, this kernel supports the battery gauge, battery charger (with fast charging mode, yes!). For halo keyboard patch for the goodix touchscreen (touchpad really) kernel was needed, see the https://github.com/jekhor/yogabook-linux-kernel/commit/bd3a5953126fd87e4218550c5a31baafcdc60a38 commit. There is userspace keyboard driver in the Chromium OS which converts touchpad events into keypresses. Forked version suitable for build at GNU\Linux system is here: https://github.com/jekhor/chromiumos_touch_keyboard .

Some patches were accepted to the mainline Linux already:
0e116237aa42 extcon-intel-cht-wc: Make charger detection co-existing with OTG host mode (v5.1)
ff6cdfd71495 ACPI / x86: Make PWM2 device always present at Lenovo Yoga Book (v5.1)
236c765d6abc mfd: intel_soc_pmic_chtwc: Register LED child device (v5.2)
a72a1be0de71 extcon: intel-cht-wc: Enable external charger (v5.2)

Feel free to ask me about this work and to create github issues. This is my spare time project, so I will glad to see other developers connected.
 

blgblade

Senior Member
Jan 16, 2009
179
464
nice project dude :) was trying it today and touchscreen works good so far,
but i cant get the halo keyboard to work, if i try to use it my mouse only moving from left to right and right to left.

if i can help you with creating some logs or something else, just write me ;) i'm not rly good on linux, but i want to use it on this low power device ;)

edit: and yes i tried to reload the kernel modules (if modprobe is the correct command) but no change
i dont know if the problem is maybe that i have a germany keyboard layout, changing in the menu works for my hw keyboard but on the halo no difference still only mouse movement
 
Last edited:

jekhor

Member
Feb 28, 2018
26
7
nice project dude :) was trying it today and touchscreen works good so far,
but i cant get the halo keyboard to work, if i try to use it my mouse only moving from left to right and right to left.

if i can help you with creating some logs or something else, just write me ;) i'm not rly good on linux, but i want to use it on this low power device ;)

edit: and yes i tried to reload the kernel modules (if modprobe is the correct command) but no change
i dont know if the problem is maybe that i have a germany keyboard layout, changing in the menu works for my hw keyboard but on the halo no difference still only mouse movement
Hmmm... You are second people who reports such problem with this image. What YB version you have? I have YB1-X91L only.

Could you please post an output of the command 'sudo cat /sys/class/dmi/id/*' (use external keyboard for this)?

---------- Post added at 10:36 PM ---------- Previous post was at 10:30 PM ----------

Arghhh... I have lost one part of goodix touchscreen driver patch and keyboard will works only at YB1-X91L model (not X91F). Wil be fixed.
 

blgblade

Senior Member
Jan 16, 2009
179
464
Hmmm... You are second people who reports such problem with this image. What YB version you have? I have YB1-X91L only.

Could you please post an output of the command 'sudo cat /sys/class/dmi/id/*' (use external keyboard for this)?

---------- Post added at 10:36 PM ---------- Previous post was at 10:30 PM ----------

Arghhh... I have lost one part of goodix touchscreen driver patch and keyboard will works only at YB1-X91L model (not X91F). Wil be fixed.

yep i have a YB1-X91F ;)
ok nice, than i will wait for the next release

i found out 2 things that did not work (or not correctly or i'm to stupid xD)
- sound (but i allready see the post in issues ;) )
- the gui and if i tried video it looks like there is no graphic driver installed (dont know how to specify this, but if i just move a window it looks like software rendering, ok my english should be better to explain this but i hope you know what i mean ^^)
if i found something more i will give you feedback
but for now, its rly nice work
thank you so much for this project :)

here the output from the command above ;)

Code:
08/26/2016
LENOVO
04WT18WW
NO Asset Tag
INVALID
HA0QPQ1T
LENOVO
Not Defined
NO Asset Tag
HA0QPQ1T
11
LENOVO
X91F
dmi:bvnLENOVO:bvr04WT18WW:bd08/26/2016:svnLENOVO:pnLenovoYB1-X91F:pvrX91F:rvnLENOVO:rnINVALID:rvrNotDefined:cvnLENOVO:ct11:cvrX91F:
cat: /sys/class/dmi/id/power: Is a directory
(TBD)
Lenovo YB1-X91F
HA0QPQ1T
LENOVO_BI_04_PCG_FM_YB1_X91F
41564e49-494c-0044-0000-000000000000
X91F
cat: /sys/class/dmi/id/subsystem: Is a directory
LENOVO
MODALIAS=dmi:bvnLENOVO:bvr04WT18WW:bd08/26/2016:svnLENOVO:pnLenovoYB1-X91F:pvrX91F:rvnLENOVO:rnINVALID:rvrNotDefined:cvnLENOVO:ct11:cvrX91F:
 

jekhor

Member
Feb 28, 2018
26
7
yep i have a YB1-X91F ;)
ok nice, than i will wait for the next release

i found out 2 things that did not work (or not correctly or i'm to stupid xD)
- sound (but i allready see the post in issues ;) )
- the gui and if i tried video it looks like there is no graphic driver installed (dont know how to specify this, but if i just move a window it looks like software rendering, ok my english should be better to explain this but i hope you know what i mean ^^)
if i found something more i will give you feedback
but for now, its rly nice work
thank you so much for this project :)

[/CODE]
I have uploaded fixed iso (halo keyboard should work): https://github.com/jekhor/yogabook-linux/releases/tag/livecd-test3.1

Yes, no sound, no force-feedback for keypresses.
Don't know about video driver and acceleration, need to check.
 
Last edited:

blgblade

Senior Member
Jan 16, 2009
179
464
hey all, because @jekhor is using a diffrent keyboard layout (not only mapping are diffrent) i created a modified layout.csv
(on this page --> https://forums.lenovo.com/t5/Yoga-Book-Windows/Yoga-book-Window-keyboard-layout-wrong/td-p/3705108 <-- you will see the layout diffrences)

layout.csv as attachmant (as txt because csv is not allowed ^^)
changes:
- Enter key diffrent size
- # moved to the other position
- added the > < | key (dont know the name ;) )
- LeftShift key diffrent size

edit: i created a patch for the filesystem.squashfs file, just unpack the patcher in the /live/ folder on your stick and run it or run it ffrom any location you want and choose the live folder from the app, than you can use the keyboardlayout on the livesystem (sorry, the patcher is windows only)
 

Attachments

  • layout.csv.txt
    2 KB · Views: 64
  • keyboardlayoutpatch.zip
    3.4 MB · Views: 56
Last edited:
  • Like
Reactions: Jeff

Supkambingsatu

New member
Aug 22, 2019
2
0
Thanks for all the hard work

Hey all, just came across this thread recently - really appreciate all the hard work here. I've been trying to install Ubuntu on my Windows powered YogaBook since the beginning, and am amazed at how far your efforts have come. Looking forward to the completed product later on! Can't stand Win10 as it tends to bloat and slowdown. Hopefully Linux runs better on this thing.
 
Sep 8, 2018
6
0
Thxxx man

Love the level of involvement in this adforable and light device with great potential in linux
Hope u guys dont lose patience in the development.
Once the wifi, keyboard and touch screen is aredy, i think i will fully change my android yogabook into linux.......

---------- Post added at 02:01 PM ---------- Previous post was at 01:56 PM ----------

Love the level of involvement in this adforable and light device with great potential in linux
Hope u guys dont lose patience in the development.
Once the wifi, keyboard and touch screen is aredy, i think i will fully change my android yogabook into linux.......
 

Jeff

Senior Member
Sep 17, 2003
189
27
Brussels, Belgium
It has been more than 2 full years, one in this forum has been able to achieve in only a few weeks of coding what MOST of us have tried to achieve in years. He has uploaded his ISO of Debian with many things working, however some things are left to be desired : Resume keyboard (tried with script - failed), fix for keyboard keys layout, and the resolution (worked with XRANDR script : working). However, he does not seem either interested in going further or does not have the device to compile against, either way without him we could be stuck with WinBlows on this machine. Until we get him BACK on board, we are stuck in the water... @jekhor ?
 

thipok17

Senior Member
Mar 9, 2014
91
17
18
Trang
tinlethax.wordpress.com
It has been more than 2 full years, one in this forum has been able to achieve in only a few weeks of coding what MOST of us have tried to achieve in years. He has uploaded his ISO of Debian with many things working, however some things are left to be desired : Resume keyboard (tried with script - failed), fix for keyboard keys layout, and the resolution (worked with XRANDR script : working). However, he does not seem either interested in going further or does not have the device to compile against, either way without him we could be stuck with WinBlows on this machine. Until we get him BACK on board, we are stuck in the water... @jekhor ?

RN, I use the systemd to fix keyboard resume and very soon I will working on sound driver totally ported from android kernel. Plus I can get the haptic feedback to (partially) works only random left or right motor via using udev rule. Extra, the recent kernel added support for the front facing camera (ov2740).
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Hi, I am the author of the repository mentioned above, https://github.com/jekhor/yogabook-linux. My linux porting efforts were focused at kernel, getting battery charger driver and halo keyboard working basically. So, this kernel supports the battery gauge, battery charger (with fast charging mode, yes!). For halo keyboard patch for the goodix touchscreen (touchpad really) kernel was needed, see the https://github.com/jekhor/yogabook-linux-kernel/commit/bd3a5953126fd87e4218550c5a31baafcdc60a38 commit. There is userspace keyboard driver in the Chromium OS which converts touchpad events into keypresses. Forked version suitable for build at GNU\Linux system is here: https://github.com/jekhor/chromiumos_touch_keyboard .

    Some patches were accepted to the mainline Linux already:
    0e116237aa42 extcon-intel-cht-wc: Make charger detection co-existing with OTG host mode (v5.1)
    ff6cdfd71495 ACPI / x86: Make PWM2 device always present at Lenovo Yoga Book (v5.1)
    236c765d6abc mfd: intel_soc_pmic_chtwc: Register LED child device (v5.2)
    a72a1be0de71 extcon: intel-cht-wc: Enable external charger (v5.2)

    Feel free to ask me about this work and to create github issues. This is my spare time project, so I will glad to see other developers connected.
    2
    yep i have a YB1-X91F ;)
    ok nice, than i will wait for the next release

    i found out 2 things that did not work (or not correctly or i'm to stupid xD)
    - sound (but i allready see the post in issues ;) )
    - the gui and if i tried video it looks like there is no graphic driver installed (dont know how to specify this, but if i just move a window it looks like software rendering, ok my english should be better to explain this but i hope you know what i mean ^^)
    if i found something more i will give you feedback
    but for now, its rly nice work
    thank you so much for this project :)

    [/CODE]
    I have uploaded fixed iso (halo keyboard should work): https://github.com/jekhor/yogabook-linux/releases/tag/livecd-test3.1

    Yes, no sound, no force-feedback for keypresses.
    Don't know about video driver and acceleration, need to check.
    1
    Now the keyboard/pen switching is done by bind/unbind the i2c device.

    I have added a special application that will do just that.

    you can play with it at:
    https://github.com/BigET/ying-bend

    is the ltSwitch app.

    It does have problems that the keyboard sometimes will not light up when entering laptop mode, but it will be active, use the pen switching button to make the light comeup.

    have fun.
    1
    Help Needed - Battery Gauge/Charger

    The issue

    The following can be seen by running 'dmesg' after boot using the ISO in my first post, which uses a 4.18 kernel customised for the hardware in the Yoga Book.

    The kernel attempts to load the driver for the TI bq24190 battery charger IC. I'm not yet able to post links so search for 'bq24190_charger.c' in the Linux kernel Github repo. The driver throws an error on boot when it hits this code at line 1640. It's expecting a 6 and it gets a 4, the value of BQ24190_REG_VPRS_PN_24190.

    bq24190_charger.c
    Code:
    	if (v != BQ24190_REG_VPRS_PN_24190 &&
    	    v != BQ24190_REG_VPRS_PN_24192I) {
    		dev_err(bdi->dev, "Error unknown model: 0x%02x\n", v);
    		return -ENODEV;
    	}

    If I remove this check altogether and re-compile the module then the driver proceeds to load but reports zeroes for all status values. It's not clear whether it is, in fact, the right chip and isn't talking to the rest of the hardware or it's simply the wrong driver.

    However, at least removing this check allows the Whiskey Cove ACPI IC driver to get a bit further along. Search for 'intel_cht_int33fe.c' in the kernel source. Comments in this file (line 124) confirm that this IC is expected to be paired with a bq24190.

    By adding in dmesg warnings and re-compiling the int33fe module I could see that when an unmodified bq24190 driver is used, i.e. the check above takes place and is failed, the int33fe driver fails its own check at line 138:

    intel_cht_int33fe.c
    Code:
    regulator = regulator_get_optional(dev, "cht_wc_usb_typec_vbus");
    	if (IS_ERR(regulator)) {
    		ret = PTR_ERR(regulator);
    		return (ret == -ENODEV) ? -EPROBE_DEFER : ret;
    	}
    	regulator_put(regulator);

    When I remove the check, it fails at the next check starting at line 145:

    Code:
    	/* The FUSB302 uses the irq at index 1 and is the only irq user */
    	fusb302_irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 1);
    	if (fusb302_irq < 0) {
    		if (fusb302_irq != -EPROBE_DEFER)
    			dev_err(dev, "Error getting FUSB302 irq\n");
    		return fusb302_irq;
    	}

    I have tried various combinations of including the FUSB driver and dependencies as modules/built in but the result is the same. I also tried moving the FUSB check to after the code which tries to link up with the max17047 battery gauge IC, but this fails also.

    Some owners of the Android version of the Yoga Book have posted files/screenshots on Telegram which indicate that a different charger, the bq25892 is used. As far as I know i2c devices are simply identified by the fact that they occupy a certain address on the bus. You can see in the datasheet for the bq24190 (sorry, no links!) on page 3 that it uses i2c address 6BH. The datasheet for the bq25890/2 shows on page 5 that the bq25892 also uses 6BH.

    I don't know enough about i2c to know whether this is the issue, or how to point Linux to a different driver in the way that you might using a VID:pID for a USB or PCI device? It would be really helpful if anybody could definitively confirm which chip we are dealing with.

    Some final ACPI errors crop up towards the end of the dmesg output (I've cleared all the others) and I suspect that sorting this will clear them, as well as making the Yoga Book with Mint usable in Tablet mode.

    Other things which need fixing:

    - There are sound errors in the dmesg output but it also shows that the drivers and codec are loading properly. I can see all the devices which should be visible in amixer from the command line. Because getting the config wrong can blow speakers I've resisted tackling this until I've done further research but if anyone has a solution please let me know.
    - Halo Keyboard. This needs either a kernel module to be written or a software layer which runs at least under X. I don't expect this to be hugely difficult - Linux can see the Halo as a wacom graphics pad and take input, albeit not deal with it properly yet. There's also a mystery, generic HID device which by process of elimination must be the button/backlight. However, the generic HID driver loads so it shouldn't be too hard to work out how to talk to it.
    - I re-built the ISO using Cubic. When I have tried to make ISOs which use my custom kernel to boot the ISO itself, they don't work. I get garbled graphics and the boot stalls. This is why the touchscreen doesn't work when you live boot (which uses 4.10) but does when you install (because it uses 4.18). This ought not to be insurmountable but I haven't cracked it yet. I've tried doing it manually and using the Debian live-boot commands for both Debian/Ubuntu. Still no luck.
    - Until I can get a custom ISO to boot from a custom kernel it won't be possible to install on the SD Card. Otherwise, there's no reason this shouldn't be possible.
    - It should be possible to install to another USB device now, but I haven't tried yet. Make sure to use the disable MMC script on the desktop if you don't want to install Grub EFI on the eMMC. Ubuntu and derivatives ignore whatever you choose for this and just use the fist EFI partition they find. Amazingly this bug has been there since 2014!
    - It ought to be possible to map the hardware buttons (volume, power) to specific keys in Grub, possibly using a locale. This would allow selections to be made without a keyboard.
    1
    android install

    This might be related as I was just installing windows on Android version and now reverted back (https://forum.xda-developers.com/showpost.php?p=77556606&postcount=44), couple of observations that might help you: On android reinstall back it required to activate halo keyboard to get it working again, there was a phone code entered into the search bar to get it activated which triggered something called easyimage app. In android stock image you can actually find easyimage.zip which I guess is this "fake android update" to install the halo keyboard. Inside the zip are *.so libraries and some files related to halo keyboard and ink pen so you could try to play with those to get it working under classic Linux.

    DNX mode allows to boot EFI via a USB cable &*fastboot (I guess windows version have also this as I activated it somewhere in BIOS?) so this can be also alternative version of booting an OS. IMHO Grub can also chainload iso image directly (I did it in past on normal PC, it was a couple of years ago so I can't find the guide to do it now) so in theory you can just place the Linux ISO image as a normal iso file on disk and tell GRUB to chainload that directly. Since it's possible to revert the Windows installation back to Android it might even be possible to dualboot. Android bootloader is also EFI based (kernelflinger) so you could also play with that. TWRP recovery image have full touch support for screen so that might be also a help when digging for configuration or extracting it from the sources.