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

Jeff

Senior Member
Sep 17, 2003
189
27
58
Brussels, Belgium
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).
Outstanding! I am thinking about then taking the dive back to debian on this machine.... we'll need to 'keep in touch' - Great to hear about the front camera support too!
 

jekhor

Member
Feb 28, 2018
17
7
3
Hi. I returned for some time :)
I trying to get sound working for now but still without success. Driver looks as working but there is no sound in speakers :( I can dump my WiP state of kernel if anybody interested. I am looking for mixer controls dump from the Android kernel (if this is possible). So, if somebody can run 'amixer contents' command (and maybe 'amixer -c1 contents') and save its output, this can help me.
 
Last edited:

thipok17

Senior Member
Mar 9, 2014
87
15
0
17
Trang
Hi. I returned for some time :)
I trying to get sound working for now but still without success. Driver looks as working but there is no sound in speakers :( I can dump my WiP state of kernel if anybody interested. I am looking for mixer controls dump from the Android kernel (if this is possible). So, if somebody can run 'amixer contents' command (and maybe 'amixer -c1 contents') and save its output, this can help me.
Glad you come back, on my github, I have the UCM file for yoga book,. But with your 5.1.16 kernel (from your repo) It still not working. Here's the ucm https://github.com/TiNredmc/YogaBookUCM
 

ETTT

Senior Member
Oct 26, 2012
58
29
38
Hi, I want to put here also my efforts to make the yoga-book work on linux (I have a YB1-X91L).
So I have Devuan (debian fork) running on my book.

I had 5.4 compiled with the paches from https://github.com/jekhor/yogabook-linux
But the bluetooth was not working.

I have now 5.7 with the above patches with wifi and bluetooth working (on the bluetooth you have to get the firmware, otherwise it will get a new mac address every time you start so all your pairing will be gone on shutdown).

In 5.7 I have lost the haptic feedback at the keyboard. (in 5.4 was working, need to look into that).

I have made an application that queries the accelerometers (they are working in 5.7 and also the light sensor) and rotates the screen, the touchscreen and the wacom tablet. It also enables or disables the halo keyboard when in laptop mode or tablet mode (the angle between the screen and the keyboard is < 180 degree or not).
You can get it and compile it on https://github.com/BigET/ying-bend

I have made a script that I had binded to the power button that switches between halo keyboard and the wacom tablet. Unfortunately I have not found the input for the pen button above the halo keyboard.
You can get it on https://github.com/BigET/HaloKeyboardSwitcher

What I know it is not working now is: vibrators, sound and web cameras.
What I don't know if are working or not: sdcard and lte.

Maybe it will help someone else.
 
  • Like
Reactions: thipok17

thipok17

Senior Member
Mar 9, 2014
87
15
0
17
Trang
Hi, I want to put here also my efforts to make the yoga-book work on linux (I have a YB1-X91L).
So I have Devuan (debian fork) running on my book.

I had 5.4 compiled with the paches from https://github.com/jekhor/yogabook-linux
But the bluetooth was not working.

I have now 5.7 with the above patches with wifi and bluetooth working (on the bluetooth you have to get the firmware, otherwise it will get a new mac address every time you start so all your pairing will be gone on shutdown).

In 5.7 I have lost the haptic feedback at the keyboard. (in 5.4 was working, need to look into that).

I have made an application that queries the accelerometers (they are working in 5.7 and also the light sensor) and rotates the screen, the touchscreen and the wacom tablet. It also enables or disables the halo keyboard when in laptop mode or tablet mode (the angle between the screen and the keyboard is < 180 degree or not).
You can get it and compile it on https://github.com/BigET/ying-bend

I have made a script that I had binded to the power button that switches between halo keyboard and the wacom tablet. Unfortunately I have not found the input for the pen button above the halo keyboard.
You can get it on https://github.com/BigET/HaloKeyboardSwitcher

What I know it is not working now is: vibrators, sound and web cameras.
What I don't know if are working or not: sdcard and lte.

Maybe it will help someone else.
Glad to see you make the >180 degree detection works,
The haptics might require the special udev rules to symlink the eventnumber to /dev/left_vibrator or /dev/right_vibrator . I've made the partially working udev rules. If the special udev rules doesn't work, trying to rollback the driver sourcecode version.
To use the pen Icon, I believe that this feature depend on the goodix touch driver source code. I suspect that it might report the special data packet, Since I replace my keyboard a long time ago. I can't confirm that the Attiny microcontroller on the Flex PCB under the keyboard is involving with the pen Icon (probably the touch sensing of mcu ?) or depend only the goodix touchscreen only. I might desolder it from my old touch keyboard and goes for some reverse engineering the firmware.
 
Last edited:

ETTT

Senior Member
Oct 26, 2012
58
29
38
How to make firefox work properly with touchscreen.

Maybe is a problem specific to Devuan (Debian).

But in case you just get a normal pointer from the touchscreen. Meaning that you cannot scroll the page in firefox if you swipe up/down.

It is actually not a problem with the driver (x11 or evdev).

You have to enable xinput2 client handler in firefox.

More info https://wiki.archlinux.org/index.php/Firefox/Tweaks#Enable_touchscreen_gestures

For me it was sufficient to add the MOZ_USE_XINPUT2 environment variable.

cheers.
 

thipok17

Senior Member
Mar 9, 2014
87
15
0
17
Trang
Maybe is a problem specific to Devuan (Debian).

But in case you just get a normal pointer from the touchscreen. Meaning that you cannot scroll the page in firefox if you swipe up/down.

It is actually not a problem with the driver (x11 or evdev).

You have to enable xinput2 client handler in firefox.

More info https://wiki.archlinux.org/index.php/Firefox/Tweaks#Enable_touchscreen_gestures

For me it was sufficient to add the MOZ_USE_XINPUT2 environment variable.

cheers.
What about Chrome ? I can't move the tab or chrome windows with touchscreen input, only the mouse cursor works. Any idea ?
 

ETTT

Senior Member
Oct 26, 2012
58
29
38
What about Chrome ? I can't move the tab or chrome windows with touchscreen input, only the mouse cursor works. Any idea ?
I will not touch chrome with a 10 foot pole. :)
But there might be 2 issues here.

  1. xinput 2 enable client: take a look here, it might already be done: https://codereview.chromium.org/688253002/
  2. there is a problem in some scenarios when you give some commands with the touchscreen and the window dies before releasing the touch grab, this prevents the clicks in the other windows, I have found a workaround, drag the title bar of a window, this will reset the grab or something.

Besides that I have no idea.
 
  • Like
Reactions: thipok17

ETTT

Senior Member
Oct 26, 2012
58
29
38
Put It in a branch on the repo on github

Hi. I returned for some time :)
I trying to get sound working for now but still without success. Driver looks as working but there is no sound in speakers :( I can dump my WiP state of kernel if anybody interested. I am looking for mixer controls dump from the Android kernel (if this is possible). So, if somebody can run 'amixer contents' command (and maybe 'amixer -c1 contents') and save its output, this can help me.
I will have some time next weekend, can you put the wip somewhere, maybe in a a branch on https://github.com/jekhor/yogabook-linux-kernel and tell me about it, thanks.
 

Juapalso

New member
Nov 6, 2020
2
0
0
Hello, I would like to know what progress you have until today, thank you very much for the work you have done, I am going to acquire a lenovo Yoga Book with windows and I would like to install linux to do computer courses.
 

jekhor

Member
Feb 28, 2018
17
7
3
Hi. I updated repository with kernel with sound working at YB1-X91* and ucm2 configs needed to configure it. Microphones are not tested yet, speakers and headphones works.
See yogabook-linux-kernel submodule and ucm2 folder (files from this folder should be installed over upstream /usr/share/alsa/ucm2 configs).
https://github.com/jekhor/yogabook-linux
 

Juapalso

New member
Nov 6, 2020
2
0
0
I'm going to ask a very beginner's question, but I've never done it. First you would have to install debian with the livecd from your repository and then update the kernel with all the code that you indicate in your comment @jekhor. I'm sorry if my questions are very new, but even more people are useful. Again great work you have done.
 

thipok17

Senior Member
Mar 9, 2014
87
15
0
17
Trang
I'm going to ask a very beginner's question, but I've never done it. First you would have to install debian with the livecd from your repository and then update the kernel with all the code that you indicate in your comment @jekhor. I'm sorry if my questions are very new, but even more people are useful. Again great work you have done.
You need to install the linux on your YB, you can go get some fast micro SD card and install on that too like I did. First get into bios and disable secure boot (If you're running windows, enable bit locker and keep the recovery key at somewhere else that you can access when bitlocker bug locked your PC)then you need the usb hub, usb mouse + keyboard, flash drive with livecd image (Flash drive is using less power compare to USB hard drive or DVD rom). Enter the setup and after all setup done. you can boot into linux. Note that GRUB2 boot menu won't support touchscreen. The debian will move itself to 1st boot priority. you can modify that once you booted linux and use efibootmgr command (don't forget sudo).

about the sound support. you need to "compile" Linux kernel. There's a guide on internet for how to do that, recommend finding some powerful computer running linux for compiling this, Last time I use my YB to compile the kernel. I let it run overnight and It ate up 12 GB after compilation done so be careful when you running of Micro SD card.

In fact, I've made install tutorial video during pandemic quarantine time. but since after I done it, My school semester start. I might get back and edit all the video and share for all of you soon.

Plus, this might be useful for you. some fixes and secure boot setup guide Here
 

thipok17

Senior Member
Mar 9, 2014
87
15
0
17
Trang
Hi. The LiveCD with sound :)
https://github.com/jekhor/yogabook-linux/releases/tag/livecd-5.10-rc3-1

And the small instruction to get installed Ubuntu 20.10 working (how to install kernel and keyboard/sound support files): https://github.com/jekhor/yogabook-linux/wiki
Hi, you have noted the auto-rotation bug. It's belong to Gnome shell bugs, and about the keyboard. I've done some simple systemd script workaround for that too. Plus the haptic motor need to do something with driver to 1. Create separate device with some kind of unique device identifier (e.g. DRV2604-1 DRV2604-2) 2. Fix the device shutdown mode, It's broken and prevent device from sleeping.
 

hal2020

New member
Nov 7, 2020
3
0
0
Feedback & request for help

Hi jekhor,

first of all- THANK YOU very much for putting all the effort in to make linux available for the Yoga Book! This is really appreciated!!!

I followed your instructions as posted above. Here is what happened:

1. First try:
Installed Xubuntu 20.10 (no updates during installation) WITH ZFS. Installed libbase, updated the kernel (with your image as per instruction), copied rootfs. System breaks: ZFS commands not availabe. Hence system not usable.

2. Second try:
Standard partitioning WITH encryption. Rest the same as above. System not usable because keyboard not available when asked for encryption password.

3. Third try:
Standard partitiong. Rest the same as above. Halo keyboard lights up is NOT sensitive for key presses AND the touch screen behaves weird. I then updated Xubuntu as per normal. Now the touch screen works OK, BUT the halo keyboard is still not usable- it lights up but - again - is not sensitive for key presses. So no typing input possible.

Is there anything I can do- like installing another .deb or patching something?

Thank you very much for any idea, input or help!
 

jekhor

Member
Feb 28, 2018
17
7
3
Hi jekhor,

first of all- THANK YOU very much for putting all the effort in to make linux available for the Yoga Book! This is really appreciated!!!

I followed your instructions as posted above. Here is what happened:

1. First try:
Installed Xubuntu 20.10 (no updates during installation) WITH ZFS. Installed libbase, updated the kernel (with your image as per instruction), copied rootfs. System breaks: ZFS commands not availabe. Hence system not usable.

2. Second try:
Standard partitioning WITH encryption. Rest the same as above. System not usable because keyboard not available when asked for encryption password.

3. Third try:
Standard partitiong. Rest the same as above. Halo keyboard lights up is NOT sensitive for key presses AND the touch screen behaves weird. I then updated Xubuntu as per normal. Now the touch screen works OK, BUT the halo keyboard is still not usable- it lights up but - again - is not sensitive for key presses. So no typing input possible.

Is there anything I can do- like installing another .deb or patching something?

Thank you very much for any idea, input or help!
Hi!
Thanks for feedback. The kernel is modified Debian's kernel and it may not work in some cases (I think that using of ZFS is such case).
For keyboard support at early stages of boot you need to add touch-keyboard-handler (binary and configs) and goodix kernel module to initramfs image. I don't have ready instruction for this now.
For third case – could you please check the output of command 'journalctl -u touch-keyboard-handler' (using external keyboard or ssh) and show it here?

---------- Post added at 10:08 PM ---------- Previous post was at 09:51 PM ----------

Hi, you have noted the auto-rotation bug. It's belong to Gnome shell bugs, and about the keyboard. I've done some simple systemd script workaround for that too. Plus the haptic motor need to do something with driver to 1. Create separate device with some kind of unique device identifier (e.g. DRV2604-1 DRV2604-2) 2. Fix the device shutdown mode, It's broken and prevent device from sleeping.
Good point about haptic driiver. I started to port it but has broke one motor controller during of experiments :( So I temporary paused this effort. But my tablet can sleep without problems anyway.
 

hal2020

New member
Nov 7, 2020
3
0
0
Hi jekhor,

first of all- THANK YOU very much for putting all the effort in to make linux available for the Yoga Book! This is really appreciated!!!

I followed your instructions as posted above. Here is what happened:

1. First try:
Installed Xubuntu 20.10 (no updates during installation) WITH ZFS. Installed libbase, updated the kernel (with your image as per instruction), copied rootfs. System breaks: ZFS commands not availabe. Hence system not usable.

2. Second try:
Standard partitioning WITH encryption. Rest the same as above. System not usable because keyboard not available when asked for encryption password.

3. Third try:
Standard partitiong. Rest the same as above. Halo keyboard lights up is NOT sensitive for key presses AND the touch screen behaves weird. I then updated Xubuntu as per normal. Now the touch screen works OK, BUT the halo keyboard is still not usable- it lights up but - again - is not sensitive for key presses. So no typing input possible.

Is there anything I can do- like installing another .deb or patching something?

Thank you very much for any idea, input or help!
Hi jekhor,
thx for your help. Here's the output:
-- Logs begin at Sat 2020-11-21 22:37:26 CET, end at Sun 2020-11-29 20:17:01 CET. --
Nov 21 22:49:10 x91f systemd[1]: Starting Touch keyboard handler...
Nov 21 22:49:10 x91f systemd[1]: Started Touch keyboard handler.
Nov 21 22:49:10 x91f systemd[609]: touch-keyboard-handler.service: Failed to execute command: Permission denied
Nov 21 22:49:10 x91f systemd[609]: touch-keyboard-handler.service: Failed at step EXEC spawning /usr/sbin/touch_keyboard_handler: Permission denied
Nov 21 22:49:10 x91f systemd[1]: touch-keyboard-handler.service: Main process exited, code=exited, status=203/EXEC
Nov 21 22:49:10 x91f systemd[1]: touch-keyboard-handler.service: Failed with result 'exit-code'.
-- Reboot --
Nov 21 23:11:56 x91f systemd[1]: Starting Touch keyboard handler...
Nov 21 23:11:56 x91f systemd[1]: Started Touch keyboard handler.
Nov 21 23:11:56 x91f systemd[1]: touch-keyboard-handler.service: Main process exited, code=exited, status=203/EXEC
Nov 21 23:11:56 x91f systemd[1]: touch-keyboard-handler.service: Failed with result 'exit-code'.
-- Reboot --
Nov 23 20:42:26 x91f systemd[1]: Starting Touch keyboard handler...
Nov 23 20:42:26 x91f systemd[1]: Started Touch keyboard handler.
Nov 23 20:42:26 x91f systemd[610]: touch-keyboard-handler.service: Failed to execute command: Permission denied
Nov 23 20:42:26 x91f systemd[610]: touch-keyboard-handler.service: Failed at step EXEC spawning /usr/sbin/touch_keyboard_handler: Permission denied
Nov 23 20:42:26 x91f systemd[1]: touch-keyboard-handler.service: Main process exited, code=exited, status=203/EXEC
Nov 23 20:42:26 x91f systemd[1]: touch-keyboard-handler.service: Failed with result 'exit-code'.
-- Reboot --
Nov 29 20:13:07 x91f systemd[1]: Starting Touch keyboard handler...
Nov 29 20:13:07 x91f systemd[1]: Started Touch keyboard handler.
Nov 29 20:13:07 x91f systemd[634]: touch-keyboard-handler.service: Failed to execute command: Permission denied
Nov 29 20:13:07 x91f systemd[634]: touch-keyboard-handler.service: Failed at step EXEC spawning /usr/sbin/touch_keyboard_handler: Permission denied
Nov 29 20:13:07 x91f systemd[1]: touch-keyboard-handler.service: Main process exited, code=exited, status=203/EXEC
Nov 29 20:13:07 x91f systemd[1]: touch-keyboard-handler.service: Failed with result 'exit-code'.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone