• 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

Abe.to75

Member
Apr 20, 2021
6
0
Hi!
Touch keyboard driver with international layout and touchpad buttons added:
Jekhor, first of all thank you for you amazing job. I'm trying the installation from Ubuntu and I'm facing multiple issues; actually, I'm not able to update the kernel and get the keyboard working. I guess it's just me, as I'm a complete noob 😔. On the other hand, the liveCD is working perfectly; i was wandering if you have a quick way to install the OS after booting from the live, as the "Install Debian" does not seem to work. Any hint?
 

jekhor

Member
Feb 28, 2018
26
7
Jekhor, first of all thank you for you amazing job. I'm trying the installation from Ubuntu and I'm facing multiple issues; actually, I'm not able to update the kernel and get the keyboard working. I guess it's just me, as I'm a complete noob 😔. On the other hand, the liveCD is working perfectly; i was wandering if you have a quick way to install the OS after booting from the live, as the "Install Debian" does not seem to work. Any hint?
Maybe, but describe what kind of issues you met, please.
 

Abe.to75

Member
Apr 20, 2021
6
0
Maybe, but describe what kind of issues you met, please.
You are absolutely right :)
These are the steps I followed:
- Minimal installation of Ubuntu 20.04.2 LTS
- After reboot, installation the android-libbase package
- Download of the package ubuntu-yb.tar.gz and installation of the linux-image and wireless-regdb packages
- Copied contents of 'rootfs' directory to the root fs.
After that, I have:
- Working keyboard and digitizer
- Screen orientation acting weird but fixed locking the screen
- No sound.
Whenever I suspend the session/reboot, I still have a working keyboard but no light (the keyboard stays black) and no digitizer.

After that, I did:
- Update android-libbase to the last version + required dependencies
- Installed the updated linux-image and the .deb packages for sound and screen
As a result, I lose the keyboard and no attempt to restore to previous condition is successful, so i end up trying with a new installation.

On the other end, the LiveCD image (based on Debian, if I'm not wrong), is working perfectly for me (I find it more responsive than Ubuntu, even if it's a live) but the "Install Debian" function on the live is not working.

So, in the end:
-I'm pretty sure I'm doing something wrong, but I'm too noob to understand what...
-If there was a simple way to install the live it would be amazing

Any hint?
 

jekhor

Member
Feb 28, 2018
26
7
You are absolutely right :)
These are the steps I followed:
- Minimal installation of Ubuntu 20.04.2 LTS
- After reboot, installation the android-libbase package
- Download of the package ubuntu-yb.tar.gz and installation of the linux-image and wireless-regdb packages
- Copied contents of 'rootfs' directory to the root fs.
After that, I have:
- Working keyboard and digitizer
- Screen orientation acting weird but fixed locking the screen
- No sound.
Whenever I suspend the session/reboot, I still have a working keyboard but no light (the keyboard stays black) and no digitizer.

After that, I did:
- Update android-libbase to the last version + required dependencies
- Installed the updated linux-image and the .deb packages for sound and screen
As a result, I lose the keyboard and no attempt to restore to previous condition is successful, so i end up trying with a new installation.

On the other end, the LiveCD image (based on Debian, if I'm not wrong), is working perfectly for me (I find it more responsive than Ubuntu, even if it's a live) but the "Install Debian" function on the live is not working.

So, in the end:
-I'm pretty sure I'm doing something wrong, but I'm too noob to understand what...
-If there was a simple way to install the live it would be amazing

Any hint?
First, try to download and install .deb's from here: https://github.com/jekhor/yogabook-linux/releases/tag/livecd-5.10.2

Then try to install touch-keyboard from here: https://github.com/jekhor/chromiumos_touch_keyboard/releases/tag/1.4.1 (it does not depend on android library anymore).

If any .deb (except linux-image) fails to install, try to recompile it from sources (located in the same place as binaries).

I think this should help.
 

Abe.to75

Member
Apr 20, 2021
6
0
JJJekhorFirst, try to download and install .deb's from here: https://github.com/jekhor/yogabook-linux/releases/tag/livecd-5.10.2

Then try to install touch-keyboard from here: https://github.com/jekhor/chromiumos_touch_keyboard/releases/tag/1.4.1 (it does not depend on android library anymore).

If any .deb (except linux-image) fails to install, try to recompile it from sources (located in the same place as binaries).

I think this should help.
Jekhor, tried. Unfortunately no luck with the .deb, once I install the new linux-image I lose the keyboard and find no way to revert back.
The live image is the one I tried and I cannot find a way to install it.

What if I try to Install a standard Debian and then to update the linux-image?
 

Abe.to75

Member
Apr 20, 2021
6
0
Jekhor, tried. Unfortunately no luck with the .deb, once I install the new linux-image I lose the keyboard and find no way to revert back.
The live image is the one I tried and I cannot find a way to install it.

What if I try to Install a standard Debian and then to update the linux-image?
UPDATE: after a second reboot the keyboard is back and fully functional. The digitizer is not working thou..anything else I should install?
Plus, every time I suspend the system the keyboard works but doesn't switch on (basically it stays black)

UPDATE 2: started with a clean install of Ubuntu 20.10 (normal install, NOT minimal) and now keyboard and sound work perfectly! :)

Just 1 thing: no way to get the integrated webcam to work, the hardware is not recognized. Is there any trick to make it work?
 
Last edited:

RSFox

New member
Jun 21, 2021
1
0
Джехор сказал

Привет товарищи. Я новичок в Linux. Хотел Ubuntu 18.04 по йоге. Установлены все пакеты .deb, но клавиатура не работает, горит но не работает. Что я сделал не так? Или на ubuntu 18.04 плохо поставить? Тоже не уверен, но пакет alsa-ucm-conf-yogabook_1.1_all.deb вроде не встал

Вы можете сказать мне, в чем дело?

PS Извините за мой английский. Использую переводчик
 

jekhor

Member
Feb 28, 2018
26
7
Джехор сказал

Привет товарищи. Я новичок в Linux. Хотел Ubuntu 18.04 по йоге. Установлены все пакеты .deb, но клавиатура не работает, горит но не работает. Что я сделал не так? Или на ubuntu 18.04 плохо поставить? Тоже не уверен, но пакет alsa-ucm-conf-yogabook_1.1_all.deb вроде не встал

Вы можете сказать мне, в чем дело?

PS Извините за мой английский. Использую переводчик
Feel free to ask in russian, I am russian-speaking :)
Try to install latest touch_keyboard package from here:
 

jekhor

Member
Feb 28, 2018
26
7
In tablet mode I would actually want to disable both keyboard and pen, also remember what was disabled so when going to laptop mode I will enable the one thing that was disabled.

That's about it.

Hope this helps. That 90 degrees rotation about the z axis of the keyboard sensor was a nasty surprise.
Hi. I implemented similar approach in the MR to iio-sensor-proxy (https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/338) and in the helper script: https://github.com/jekhor/yogabook-...115fff0e81d537135e3f22/yogabook-modes-handler

Thank you very much for inspiration :)
 

punba

New member
Jan 3, 2016
1
0
Feel free to ask in russian, I am russian-speaking :)
Try to install latest touch_keyboard package from here:
Добрый день! Я установил все .deb пакеты которые вы описали включая touch-keyboard_1.4.1_amd64.deb и ядро 5.10. Заработала подсветка клавиатуры, но на нажатия не отвечает. Дистрибутив antiX Linux, что посоветуете еще попробовать? Заранее благодарен)
 

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.