English Community

Linux Operating SystemsUbuntu
All Forum Topics
Options

6 Posts

03-31-2019

AT

15 Signins

243 Page Views

  • Posts: 6
  • Registered: ‎03-31-2019
  • Location: AT
  • Views: 243
  • Message 1 of 9

Thinkpad X1 Yoga and Ubuntu 19.04 - a tale of woe

2019-04-08, 7:36 AM

Hello, this posting is primarily for documentation purpose in the hope, it may help others on their quest for having a working - at least usable - Linux installation on the X1 Yoga.

 

First of all, let me say, if you're planning to buy a X1 Yoga and to run Linux on it, i strongly disadvise. Buy another laptop.

It's Ubuntu certified and you find it on the list of Lenovo systems supporting Linux here https://support.lenovo.com/at/en/solutions/pd031426 but obviously that doesn't mean your laptop has to go to sleep, has a working thermal management or the same performance as with windows. Thanks for the certification!

 

This is a summary of the steps I had to perform, to get a usable system. You won't get any new information you cant't find anywhere else, I didn't find anything of out myself, so the kudos go to all the people sharing their knowledge on the web.

 

No working S3

 

The newest X1 don't support S3 sleep state but some Windows Modern Standy stuff, so with Ubuntu sleep doesn't work. Ironically Lenovo released a BIOS update for the X1 Carbon which makes S3 available but they have not (yet?) provided that option in the Yoga's BIOS.

 

Prerequisites:

  • Ensure that Boot Mode is set to Quick and not Diagnostic
  • Set Thunderbolt BIOS Assist Mode to Enabled (via Config → Thunderbolt 3).
  • Disable Secure Boot.

 

curl -O https://raw.githubusercontent.com/fiji-flo/x1carbon2018s3/master/generate_and_apply_patch.sh
chmod +x generate_and_apply_patch.sh
./generate_and_apply_patch.sh

edit /etc/grub.d/10_linux and change all occurences of initrd  ${rel_dirname}/${initrd} to initrd  /boot/acpi_override ${rel_dirname}/${initrd}

 

Add mem_sleep_default=deep to GRUB_CMDLINE_LINUX_DEFAULT boot options in /etc/default/grub.

 

update-grub
reboot

After that S3 should work which leads directly to the next problem:

 

 

Touchscreen not working after suspend

 

My Touchscreen didn't work after waking up from suspend. I found this workaround in the forums, which sends the Yoga for 1 second to S2idle state after waking up, which for whatever reason renables the touchscreen.

 

Create a file /etc/systemd/system/wake_wacom_hack.service with the following lines:

 

[Unit]
Description= s2idle fo 1 second after resume
After=suspend.target

[Service]
Type=oneshot
ExecStart=/usr/sbin/rtcwake -m freeze -s 1

[Install]
WantedBy=suspend.target

and enable the service with

 

 

systemctl enable wake_wacom_hack.service

This is not totally reliable, but most times it makes the touchscreen work again and if not, I just have to suspend and wake it up again.

 

 

 

At this point you might think, you've got a working system and might be impressed, by how silent it runs, until you recognize, that the colling is totally broken and the fan just never spins up and the cpu is cooled by throtteling.

 

Fan not spinning up

 

At some point in time Lenovo broke the cooling under Linux and the fan just doesn't spin up. To fix this you have to install the thinkfan package.

 

apt install thinkfan

Edit /etc/thinkfan.conf. Mine looks like this:

 

 

hwmon /sys/devices/virtual/thermal/thermal_zone0/temp
(0, 0, 55)
(1, 48, 60)
(2, 50, 61)
(3, 52, 63)
(4, 56, 65)
(5, 59, 66)
(7, 63, 32767)

Finally enable fan control from within the OS

 

 

echo "options thinkpad_acpi fan_control=1" > /etc/modprobe.d/thinkfan.conf
systemctl enable thinkfan.service
reboot

 

Now, for the first time, the X1 Yoga is really usable. But after researching that much you surely have already read about the throttling issues: It seems, that under Linux the CPU throttles at lower temperatures als under Windows. I wasn't sure about that problem, since I somewhere read someone claiming, that it's more a Windows problem as the temperature there is too high. Until I found this in Lenovo's README for the BIOS V1.29:

(Fix) Fixed an issue where thermal throttling started to happen at 85C degree.

So, let's go on

 

CPU Throttling issue

 

apt install git build-essential python3-dev libdbus-glib-1-dev libgirepository1.0-dev libcairo2-dev python3-venv python3-wheel python3-pip
pip3 install --upgrade pip
git clone https://github.com/erpalma/lenovo-throttling-fix.git
cd lenovo-throttling-fix/
./install.sh

systemctl stop thermald.service
systemctl disable thermald.service
systemctl mask thermald.service

All after all that's it for now. My Yoga is now running fine. You might run in other issues I've not experienced like not working like non-working touchpad and trackpoint.

 

After that experience I'm really wondering, what kind of QA is going on at Lenovo. That's not some kind of cheapo laptop and they keep breaking things with BIOS updates.

At this stage other quirks like no Linux support for the mobile device, Lenovo Vantage reporting wrong BIOS versions, autorotate in Windows sporadically not working, loosing the mapping for the stylus buttons from time to time, not waking up on power button presses (especially annoying in tablet mode) and so on just seem like minor annoyances.

 

Once again thanks to all the people out there doing Lenovo's work and fixing the Yoga X1.

Reply
Options

2 Posts

06-15-2018

US

4 Signins

30 Page Views

  • Posts: 2
  • Registered: ‎06-15-2018
  • Location: US
  • Views: 30
  • Message 2 of 9

Re: Thinkpad X1 Yoga and Ubuntu 19.04 - a tale of woe

2019-05-09, 4:38 AM

Firstly, thank you so much for the effort you put into making this post. :-)

 

I just upgraded my new X1 Yoga 3rd Gen from Windows 10 to Ubuntu 19.04, and your input was key in making it go smoothly!!!

 

That said, I have one tweak to recommend.  In the "No working S3" section, /boot/acpi_override wasn't found on my first boot.  I live edited it out at the grub prompt on the next boot, then tweaked the entry in /etc/grub.d/10_linux.

 

Instead of:

  initrd /boot/acpi_override ${rel_dirname}/${initrd}

 

I used:

  initrd ${rel_dirname}/acpi_override ${rel_dirname}/${initrd}

 

which worked perfectly.  I expect /boot/acpi_override works fine if you don't have a separate /boot partition, FWIW...

 

Thanks again!

 

Cheers, -Brian

 

 

Reply
Options

6 Posts

03-31-2019

AT

15 Signins

243 Page Views

  • Posts: 6
  • Registered: ‎03-31-2019
  • Location: AT
  • Views: 243
  • Message 3 of 9

Re: Thinkpad X1 Yoga and Ubuntu 19.04 - a tale of woe

2019-05-18, 16:05 PM

It seems, that Lenovo released a BIOS update with a possible fix for at least the S3 issue, but for some reason the pulled it out.

 

See

https://forums.lenovo.com/t5/Other-Linux-Discussions/X1-Yoga-3rd-Gen-S3-Sleep-Linux/m-p/4431993/high...

Reply
Options

6 Posts

03-31-2019

AT

15 Signins

243 Page Views

  • Posts: 6
  • Registered: ‎03-31-2019
  • Location: AT
  • Views: 243
  • Message 4 of 9

Re: Thinkpad X1 Yoga and Ubuntu 19.04 - a tale of woe

2020-02-07, 10:57 AM

A short update:

 

After I was forced to install Lenovo's updates because of the thunderbolt firmware issue, my Ubuntu install didn't boot anymore. Not sure why, I didn't waste time to investigate. I decided to do a fresh install of Ubuntu 20.04pre-release.

 

The fix for S3 is no longer needed with the current BIOS, the other fixes still work like on 19.04, except for the fix for the no-touchscreen-after-sleep problem - it doesn't work anymore.

So no touchscreen in Linux for now. Perhaps someone knows another workaround?

Reply
Options

0 Posts

02-04-2020

US

0 Signins

0 Page Views

  • Posts: 0
  • Registered: ‎02-04-2020
  • Location: US
  • Views: 0
  • Message 5 of 9

Re: Thinkpad X1 Yoga and Ubuntu 19.04 - a tale of woe

2020-02-08, 17:47 PM

When I added the following  to my GRUB it caused a kernel panic:

 

  initrd /boot/acpi_override ${rel_dirname}/${initrd}


 I did not try the other provided workaround yet but I have to say that I doult not change the BIOS oprion for the Thunderbolt Mode Assist in the BIOS cos this is a company laptop but I will overcome that  ext week poissibly. Anyway I do not think that the the kernel crash was related to the the unchanges BIOS option. On the otherside my all drive is encryoted too.

 

Once I removed the line from grub the kernel booted just fine, 

 

Did you experince a Kernel panic event too? @bludgrumber

Reply
Options

6 Posts

03-31-2019

AT

15 Signins

243 Page Views

  • Posts: 6
  • Registered: ‎03-31-2019
  • Location: AT
  • Views: 243
  • Message 6 of 9

Re: Thinkpad X1 Yoga and Ubuntu 19.04 - a tale of woe

2020-02-21, 16:18 PM
repost, because Lenovo didn't restore all messages yet: 02-07-2020 02:57 AM A short update: After I was forced to install Lenovo's updates because of the thunderbolt firmware issue, my Ubuntu install didn't boot anymore. Not sure why, I didn't waste time to investigate. I decided to do a fresh install of Ubuntu 20.04pre-release. The fix for S3 is no longer needed with the current BIOS, the other fixes still work like on 19.04, except for the fix for the no-touchscreen-after-sleep problem - it doesn't work anymore. So no touchscreen in Linux for now. Perhaps someone knows another workaround?
Reply
Options

6 Posts

03-31-2019

AT

15 Signins

243 Page Views

  • Posts: 6
  • Registered: ‎03-31-2019
  • Location: AT
  • Views: 243
  • Message 7 of 9

Re:Thinkpad X1 Yoga and Ubuntu 19.04 - a tale of woe

2020-02-21, 16:20 PM

Another update:

 

Disabling thunderbolt in the BIOS seems to "fix" the no-touchscreen-after-sleep problem. For now I can live with that since I don't use thunderbolt anyway.

Reply
Options

5 Posts

05-09-2020

US

5 Signins

25 Page Views

  • Posts: 5
  • Registered: ‎05-09-2020
  • Location: US
  • Views: 25
  • Message 8 of 9

Re:Thinkpad X1 Yoga and Ubuntu 19.04 - a tale of woe

2020-05-09, 4:33 AM
I just wanted to document my own experience with X1 Yoga 3rd generation and Ubuntu 20.04 I'm not finding a lot of trouble however. Suspend seems to work fine. But since I didn't ever hear the fan over the course of a few hours,.I pursued the question suggested above and installed thinkfan. I wasn't able to modify the configuration files but that was partially because I didn't know how to find them. Found them later, they were read-only and I didn't pursue that any further.(It's not an easy being a newbie) but I found a website that would drive the CPUs up and finally after a suspended period of time, I heard the fan turn on. I don't know if this is due to thinkfan or if it was never a problem to begin with. At this point the only other problem I found is that Libreoffice will not let me select items from the drop-down menus. I'm able to navigate through the menu but not execute the command at the end. But the stylus will work fine, and place of my finger.
Reply
Options

5 Posts

05-09-2020

US

5 Signins

25 Page Views

  • Posts: 5
  • Registered: ‎05-09-2020
  • Location: US
  • Views: 25
  • Message 9 of 9

Re:Thinkpad X1 Yoga and Ubuntu 19.04 - a tale of woe

2020-05-11, 4:27 AM
New information. I'm having trouble with the following The computer runs slow because the fan is not kicking in soon enough, I believe. Thinkfan is recommended but I'm having trouble with that ,so far.. Ubuntu software will not launch after the first time A newly installed application will not launch after the first time.. That may be specific to the application, I don't know. I was only able to get 20.04 to recently run. I was not able to get Mint to run at all.
Reply
Forum Home

Community Guidelines

Please review our Guidelines before posting.

Learn More

Check out current deals!

Go Shop
X

Save

X

Delete