Suspend for the X1 Carbon 2018 on Linux
github.com
github.com
Worst case is they left the stubs pretending S3 is supported, so the computer goes to sleep - but never wakes up! Dell, I'm looking at you!!
Workarounds come from redoing the S3 code, mostly in ACPI tables with triggers - for all peripherals.
It is a shame, as in S3 most laptops eat less that 1% of the battery per hour, while in S0 such good results require heavy configuration to prevent the "active" part of active sleep, and make sure the laptop never wakes up until you actually press on the power button. But I guess it is the road to progress, as S0 is more flexible.
In 2012 I bought a MacBook Air to run Linux. It's a great silent machine with all Intel hardware, except the pretty poor quality Broadcom wireless card. It boots with any vanilla kernel, and everything just works. Except for poor wireless range. What machine can I buy these days that?
i) Just works on Linux (which in practice means everything has to be Intel, including the wireless card)
ii) Is reasonably silent
The only machine I've found worth considering is a Xiaomi Air 12 with a m3 (fanless) CPU. Some Thinkpads are OK, but they tend to be on the noisy side of things due to excessively small fans and too much power I don't need. This, despite aggressively tweaking powertop settings.
I'm also looking for external USB high-gain wireless antennas. But even classic Alfa ones with Atheros 9271 chipsets are a hit and miss.
It's a bit hopeless. If someone has good suggestions, I'd be glad to consider them.
The standards are too complex. I've spent thousands of dollars on ISO standards documents over the past several years.[1] The complexity of these documents is absurd. And I've never seen an implementation that came close to adhering to the entirety of the standard--everybody always takes shortcuts because it's not cost-effective otherwise. The problem is, everybody takes different shortcuts, so you end up with endless interoperability problems.
The exceptions are often when everybody sources hardware or software implementations from a single vendor. That's when things go more smoothly because everybody is using the same half-baked driver or firmware.
[1] The last document I purchased was 138CHF (coincidentally $138USD at today's exchange rate). They've always been at least that much in recent memory, and often standards are broken up into separate documents or incorporated by reference so you're paying 4x or 5x to get the entire standard. There's alot of free documentation online that open source developers often use, but personally I find it difficult to wrap my head around these things unless I have an idea of the overall design. (I want to see the overall picture so my initial API and architecture isn't a pile of technical debt from day 1.) I have the means so I bite the bullet. But it's a real loss to the entire community--and industry--that these standards aren't freely available. Quality of implementations would be so much better if standards were always open, and sunlight might help minimize the complexity of these things by exposing the flexibility demanded by proprietary vendors on the committees as useless barriers to entry.
In the case of the S3 sleep state, this is just sloppy decision making. Sure give us a new fancy, half sleep-like mode, but don't touch the suspend to ram, it's a feature that has value.
I don't do much traditional driver development (mostly USB related, at least when it comes to hardware). I know enough that dealing with the ARM ecosystem can be much more of a headache than in the PC world, for two reasons: diversity and more opaque specs. (Even if the PC stuff is proprietary, there's enough publicly leaked info to at least get started.) But ARM features are also often much simpler and straight-forward. If the documentation were always and completely freely available[1], then I think many developers would prefer dealing with ARM platforms than with PCs. You may be writing more drivers, but development would be more efficient and reliable and you could move on without having as much of a maintenance and bug-fix burden. It can be a worthwhile trade-off, and fits better with the open source model.
[1] I spent months trying to sign an NDA and gain access to NXP's iMX53 Security Reference Manual. After repeated back-and-forth with two NXP resellers, Mouser and Digi-Key, I just gave up.[2] I've heard of lone developers getting access to the manual, but they must be more familiar with the process than I am. Now I'm pivoting and have decided to use seL4 on PC hardware rather than bother with the TrustZone and the iMX53 crypto hardware, even though the ARM route would have been easier but for the documentation issue.
[2] I think it's NXP that kept dropping the ball, but I'm really not sure.
The culprit isn't UEFI, it's ACPI. That mess predates UEFI. Most operating systems don't really try to use UEFI features beyond the ability to manipulate the bootloader settings, and that feature is almost always correctly implemented. But it's impossible to find a consumer system with bug-free ACPI tables.
The UEFI implementation in U-Boot is tiny, and yet is enough to boot (both from local storage and network) and have a text console.
Most non-embedded board vendors do not reimplement UEFI. There's not much to get right or wrong. They just take AMI or whoever's private fork of TianoCore, tweak some settings and customize the GUI. (It is possible to screw up the GUI though: https://youtu.be/F-ndTMeRT3s)
As mentioned in other comments, it's ACPI that's really bad.
Though at least it's a standard! On ARM, you typically have to have a driver for every. damn. power. controller. Thankfully, ACPI is now appearing on higher end ARM stuff (servers like ThunderX, workstations like Overdrive, hopefully the new Microsoft always-connected laptops?)
I can't believe anyone would be thankful about ACPI. Is there a machine with ACPI that isn't broken in some way? My brand new Lenovo, which multiple sites have crowned the "best" PC laptop, ships with a LTE card that can't properly power down, and causes PCI-E ASPM to be disabled. Even Microsoft has f--ked up power management repeatedly in the Surface line.
Power management on PCs is such a disaster that it calls into question the very idea of doing power management for computers built out of mix-and-match components through standards like ACPI.
I'm not necessarily cheery about ACPI in practice, but ACPI & UEFI in theory provide some kind of substrate to manage the platform, that's not just whatever the engineers are some shop cooked up this time.
But having individual drivers per SoC in the kernel for things like power management still sucks.
Only downsides are Linux's generally patchy support for hidpi, some programs scale and others don't (opt for 1080p version or set resolution to 1080p). And also the placement of the webcam is a bit strange.
Battery life is good in Ubuntu, between 6 and 10 hours depending on use case.
To be crystal clear: the 9360 has a bios featuring the proper ACPI tables, which are omitted on purpose from other cheaper models, breaking S3 on purpose.
This is why injecting proper tables as proposed in this link restores normal functionality. It is not rocket science, just hard enough to do without proper documentation to be a waste of time.
The initial submission title said it was a shame, and I agree it is shameful to intentionally break features to charge higher price (and no, I won't buy that S0 works perfectly now, or that adding a simple if/else is "too complicated"
Unless I'm playing Counter Strike on the X230, which runs great all things considered, I never ever hear the fan. Wireless and thankfully wired connections are spotless too, though the X230 doesn't have 802.11ac as far as I know.
[aside]: it has a top IO panel that every now an then decides to stop working, including the power button mouse and keyboard, although usb ports continue to work. The only option at that point is to hard reset (I carry a paper clip in my keychain :-/). Haven't found an explanation for the problem. If anyone here has any ideas, please reply. I've googled all around. I have found no correlation with anything so far.
Besides that when I say it works, I mean it really works. Even the 4g card I added worked out of box on Ubuntu!
(1) https://techtablets.com/forum/topic/xiaomi-air-12-5-inch-mod...
What do you find lacking in the BIOS? Don't you use EFI instead?
Huh. My X240 is so much quieter than my 2010 MacBook Air was.
The Air was... (I just realized this) very aptly named, as the volume of air its fans push is ridiculous.
So there was no reason whatsoever to remove the code.
IIRC, suspend to disk when battery runs out is now one of the standard S0 features.
At the OS level (windows 10) there is a telemetry to check the depletion rate, and initiate suspend to disk when the rate is too high or battery is too low.
Check the logs made by microsoft powercfg, they are very informative and will help you reach power savings close to what S3 allowed.
But I need that to work in Linux too, and last time I checked it wasn't as good.
Nitpick: "Telemetry" means "measurement far away". Does this get sent to microsoft ("tele") or is it just a measurement ("metric")?
I have done some bios and acpi code before on coreboot. It is tough, lots of work and no guaranteed results if you don't have access to the specs (NDA)
Anyway I really don't recommend you do that unless you have experience, documentation and time.
Edit: Looks like they still do, just that certification doesn't mean shit. This is more RH and Canonical's fault than Lenovo's. What's the point of certifying something if you can add a note (as Canonical did) that suspend/resume doesn't work.
> This system does not not meet our performance criteria for resuming from suspend, but suspend/resume is functional and other functionality is not affected.
Ah, so it does meet their performance criteria after all. The elusive double negative.
Why anyone still trusts Lenovo enough for this sort of thing to come up as an issue is beyond me.
Or who could forget Lenovo's surveillance malware that performed man-in-the-middle attacks on SSL traffic? Seriously, these machines should be banned for sale in the U.S. on national security grounds.
> Lenovo's suspend feature relies on an unsigned binary blob from China sideloaded during system boot over an unsecure HTTP connection
it talks about Lenovo Service Engine, Superfish, Lenovo Solution Center, and Lenovo Customer Feedback.
if you blow away the default install of windows, including the UEFI partition, and install (windows or linux or whatever) from scratch, how could any of those things affect you?
Of course, malicious firmware doesn't really depend on the OS's cooperation. It would just be harder to implement and the result a lot more flaky.
It should still work great on your w520, except there were several power management issues related to the optimus GPU I just couldn't fix.
Oh and careful with the RAM if you use 32G as some brands will not work well, because of raminit issue (I haven't followed, maybe they are fixed now)
Intel has its ME, which is much worse than any of these.
AMD has its own ME-equivalent.
Intel ME is worrisome. Lenovo's behavior was actually malicious. There's kind of a difference.
Superfish was removable. The ME is far from it.
There are alternatives to using Lenovo software or hardware, thus Superfish is even completely avoidable. The ME and its AMD equivalent are not.
Both are worrisome. Backdoor-in-hardware is far more worrisome.
With proper hardware tooling and care, perhaps. (Side question: even for latest gen chips?)
For the vast majority of people, ME is not removable. For the AMD users, AMD's ME equivalent is not removable.
https://www.pcworld.com/article/2969365/security/lenovos-ser...
It says the Thinkpad lines were never affected by this
Carbon is the new, fashionable, Macbook-like device with soldered-on RAM, etc; likely from a different design culture. Its biggest upside is likely the hi-res screen.
For development, a lot depends on the quality of font antialiasing and hinting, though; Linux used to provide superb font rendering in this regard.
Things to love about the T480:
- Fairly portable at around 3.5 lbs with a 14inch screen. It avoids the dedicated numeric keypad that some larger 15inch models have, while still having good screen real estate.
- Great keyboard as all Thinkpads have. (media keys are working great under linux)
- Very durable having undergone mil-spec testing.
- Camera placement at top with a mechanical shutter if you get the FHD screen.
- 32 GB of ram if you want/need it
- Hot-swappable batteries. No need to turn off the laptop. just flip it over and replace. (You can buy the extended 72Wh battery for extra battery time)
Bonus if you find one on eBay slightly used. You could save over a $1000 for a comparably specced machine.
HiDPI is kinda a mess in general on Linux, from my limited use cases. I run X11 with i3wm on Arch, and the application support is all over the place. `xrandr` seems unhappy with multiple monitors at different resolutions (as is my case at work, with external displays), it's a mess.
All that being said, with a combination of `xrandr --dpi` and ctrl-+/- in Firefox and my terminal, things can be made to look OKish.
TLDR: If you can get a computer without HiDPI, I personally recommend it.
Fortunately, Dell U2718Q's are relatively cheap and well-worth the upgrade :)
It wouldn’t be so bad if Wayland was widely supported, as it can handle mixed DPI pretty well. Unfortunately I can’t swap to wayland until browsers and Java apps (aka IntelliJ) support it.
I think the main thing to ponder is whether I’ll be hooking it up to external displays a lot. Is the situation basically “no issues” if not using external displays?
Also when hooking up to external is it possible to make X switch to lodpi everywhere and “pretend” that the 1440p screen is 1080p (like tell applications it’s 1080p)?
If you can match your external DPI to the laptop that would also work (but it's sort of an awkward DPI).
The hiDPI is nice for your fonts, but for working day-to-day I don't really notice it much.
I got used to it by now, as I don't normally work on the internal monitor for longer times. Nevertheless this really bugs me out.
It’s an excellent machine. The Intel wireless chip in it is “Intel 7265” — it uses the open-source “iwlwifi” driver. The machine I got also had the i7-8550U, an 8th gen Intel chip with has four hyper-threaded cores that has a TDP of a mere 15 W. It also had a 512 GiB PCIe SSD from an obscure brand called “SK Hynix”, 16 GB DDR4 RAM, and an NVIDIA MX150 GPU (with 4 GB of graphics memory) in addition to the integrated Intel UHD graphics that comes with the i7-8550U.
https://github.com/ejmg/an-idiots-guide-to-installing-arch-o...
The hardware is all supported from the get go, no tweaking or hacks to get it working (well, besides the bios + s3 hack). Besides the patch provided by the OP, everything else works without issue on Linux. It's kind of why this is so upsetting, in a way... the ability to make a linux machine doesn't require specialty companies, it just requires vendors not do dumb crap like completely dropping support for something without warning, etc.
I suggest OP revises his configuration...
There is no excuse for breaking S3 suspend.
Also there is reports the CPU is underclocked on Linux..
And is the patch even a solution that is stable past the next kernel update?
Oh, each the mobile broadband didn't work either...
Obviously, fingerprint did work as usual... And I couldn't figure out if NFC works.
How to check?
I have some suspend working on X1 2018, not sure which one! Switching from Mac is... hard. My true-wireless bluetooth earbuds don't work too well either. I guess it's gonna take few weeks of tweaking configs to get to a decent situation.
There was an active decision to remove working parts of the code. That is shameful.
Shame, shame, shame.