9 ms·
Drivers. The way laptops sleep and wake is pretty unique to each type of computer, and many manufacturers don't care about Linux support so kernel developers ar
by steviedotboston 6y ago
Drivers. The way laptops sleep and wake is pretty unique to each type of computer, and many manufacturers don't care about Linux support so kernel developers are left to figure it out on their own.
I haven't used Linux on a desktop/laptop in a decade so it's sad to hear that things are still the same.
- kreetx 6y agoE.g on my 2015 macbook pro I need to remove and re-add the wifi driver module to make it connect.
- Klonoar 6y ago...what? The 2015's were incredibly solid machines, I've never heard of an issue like this happening. I still daily my 2015MBP and the thing is an absolute tank where everything just works. I would literally bet money that your issue is hardware, not software. Edit: I realize now that this comment could be referring to running Linux on a 2015 MBP, in which case I'm a moron and we can just disregard my comment.
- kreetx 6y agoYeah, it's Linux. :) macOS always ran nicely, and the hardware itself is great. I think if somebody more capable in Linux kernel/drivers' hacking looked into it they could fix it, it's just that nobody cares (and `rmmod brcmfmac && modprobe brcmfmac` is simple enough).
- pwg 6y agoThis ... If the OP does some internet research into this topic they will find articles detailing how almost all [1] non-apple laptop makers build to a single target: ms-windows. They also test against a single target: ms-windows. If it works there, they are done. Linux compatibility is not even an afterthought. And as each makers various models all seem to also have slightly different ways to perform sleep/hibernate and subsequent wakeup, the result is that Linux kernel dev's are playing a continuous game of catch-up. One thing I've found is that upgrading the kernel to a later release sometimes fixes the issues (assuming patches were supplied by someone in the interim to fix them). [1] Very few makers have any laptops that ship, from the maker, with Linux preinstalled, the few that do (one or two Dell models, the aftermarket "Linux Laptop" vendors, maybe a sliver of others) will more than likely work properly for sleep/wake. The reason why these work better is because the maker should, in theory, test for Linux compatibility and help fix any bugs (or simply build with compatible chipsets from the outset) since they are selling these with "Linux pre-loaded".
- evolve2k 6y agoWhich laptops get this right then? Any of them?
- sigio 6y agoHad no issues with my current thinkpad (t480) and previous thinkpads (x240, x220, edge 11)
- cat199 6y agoanyone that sells a linux on top; failing that its a crapshoot which mostly depends on developer popularity of that model / devices
- fwsgonzo 6y agoI have a Carbon X1 and it works perfectly, including the fingerprint unlock and the touchscreen.
- Delk 6y agoI'd expect e.g. Ubuntu certified devices [1] to handle it. There are certified laptops from at least Dell and Lenovo, and probably the odd model from other manufacturers. While the certification technically only means the hardware is compatible with Ubuntu, and perhaps only as pre-installed by the OEM, in practice that probably means general Linux compatibility. I have trouble seeing any point in making Ubuntu-specific tweaks to an OEM install, as it's easier to just send only the models with compatible components for certification (or to pick compatible components in the first place, which may be feasible at least for premium laptops). But as a user, you do have to pick your hardware. My ThinkPad X240 has been suspending and resuming reliably for the majority of the last 6 to 7 years. There was a time when the touchpad didn't work after resume without tweaking (in Fedora), which was annoying and surprising and something that IMO shouldn't have happened. But other than that there have been no issues. [1] https://certification.ubuntu.com/ https://certification.ubuntu.com/
- Datenstrom 6y ago> manufacturers don't care about Linux support This is why I have been using System76 personally for the last 5 years, since I first found out about them when given one by an employer. The first linux box I have had that didn't have little problems like that. Disclaimer: not affiliated in any way, just a happy customer for work and play.
- nicholasjarnold 6y agoChiming in to add an anecdotal data point in support of the parent's comment. I too own a System76 laptop which is running their drivers and PopOS (Debian and Ubuntu derivative). Sleep/wake works well.
- gcthomas 6y agoAny machine covered by Ubuntu certified hardware seems to work very well by default, including my work Dell XPS13. Sleep/wake happens flawlessly.
- wutbrodo 6y agoI had two dell XPSes in 2015/16, one of which shipped with Ubuntu, and they were by far the worst compatibility experience I've ever had with a Linux laptop. I loved the hardware, but my God was the firmware garbage.
- lliamander 6y agoMy Dell Precision 5530 for work is kinda meh - by which I mean it works most of the time, but the fact that it doesn't work every time is fairly big deal at this point. My personal ThinkPad E495 has pretty much flawless driver support. Granted, I'm running different distros (Ubuntu on the Dell, Solus on the ThinkPad) but the fact that the Dell Precision is certified specifically for Ubuntu is pretty disappointing.
- nextos 6y agoMost machines with decent drivers also have flawless sleep. This includes NUCs, many Thinkpads, etc. In general, Linux runs really well if you filter hardware a bit ahead of purchase. For example, an all Intel machine with Intel wireless card will rarely give any trouble.
- everdrive 6y agoOn some laptops and desktops it works flawlessly. This is purely anecotal, but my last 5-7 linux computers over the years (~15 years) have never had issues sleeping and waking. Usually, I've been running something that is either not very new, or else, is specifically branded as having linux support.
- bobince 6y agoThey don't even necessarily care about Windows support. Upgrade to a new version that doesn't quite work the same with the hacks in their cobbled-together drivers, and you're quickly in the same boat as the Linux users.
- SteveNuts 6y agoThis hasn't been my experience with Windows in the last 5 years. Truth be told it's pretty stable by now and for me, issues like that are rare. Even things like working with external docking stations are pretty seamless nowadays.
- jcelerier 6y agoBeh, my laptop (MSI GS65) has trouble waking up from sleep on windows too. When putting it to sleep on linux it always comes back up, but I have to reboot to get wifi back. On windows wifi comes back, but the ethernet port needs to be disabled & reenabled in the control panel to work. Laptops suck.
- jtolly710 6y agoHey I'm also running a GS65 (First Ubuntu - now PopOs), the Wifi is frustrating, but I found double-tapping (2x [FN+F10]) in quick succession would bring the radios back up. Have you ever gotten the native HDMI port to work in linux?
- jcelerier 6y ago> Hey I'm also running a GS65 (First Ubuntu - now PopOs), the Wifi is frustrating, but I found double-tapping (2x [FN+F10]) in quick succession would bring the radios back up. oh wow, okay I'll definitely try that haha > Have you ever gotten the native HDMI port to work in linux? Yes, with the nvidia drivers it works fine
- jbverschoor 6y agoLaptops don’t suck. My MacBook rarely reboots.. only in case of system updates. Sleep/wake up works perfect
- petermcneeley 6y agoI would add that this is also related to "The 30 million line problem" aka massive OS complexity due to a plethora of heterogenous hardware. https://youtu.be/kZRE7HIO3vk https://youtu.be/kZRE7HIO3vk
- cultus 6y agoOne particular issue is that nobody actually implements the ACPI power management protocol correctly.
- vlovich123 6y agoThen the problem is with the protocol no? Seems like an architectural issue that the Linux community needs to spearhead with HW vendors to resolve. Good standards that reduce sources of error are the only antidote to vertical integration approaches that big tech is going down.
- zhengyi13 6y agoI think even the best standards can have ambiguities. SHOULD, MAY, etc. Assuming you're not running a Mac (where the vendor controls the entire stack), you've got your OS vendor, your MB vendor, your every-single-external-device-vendor... ... and the interactions of all this hardware mediated through the OS, its drivers, and the reading comprehension and the development pressures of every single dev who's worked on any part of this stack. There's an awful lot of room for ambiguities there. Protocol definition at this level is kind of a collaborative lurching towards consensus.
- cultus 6y agoYeah, it seems most tech standards are design-by-committee disasters.
- adrianmonk 6y ago> problem is with the protocol I wouldn't assume so. Is there a problem with the spec for using your turn signals while driving? And yet...
- vlovich123 6y agoI’ve implemented a lot of protocols. The more complex a protocol is and the more moving parts, the harder it is. The fundamental challenge is complexity. Understanding how to build this stuff is a mix between figuring out which complexity to expose to “the masses” (masses here being other developers) and what else to hide in abstractions or better tooling. I think the market would look very different if senior Linux kernel maintainers (including Torvalds) got together and said “this is the Linux power save API - implement it”. The challenge is that the same HW powers Windows (and used to power Macs and probably still does to at least some degree). No protocol worth a damn can handle that much variability. So then the question is can the firmware and driver code be given less to be responsible for rather than more and then let the kernel make all the decision making power. The problem with ACPI (at least as I understand it from reading about it superficially - I’ve never read the spec itself) is that decision making is extremely interdependent with the kernel ultimately not being fully in charge of decisions. For example, a simple design for something like this is defining ACPI-lite that handles 80% of the hardware that ACPI currently supports but that drastically simplified the mental model and lets the kernel implement all the common logic with the driver and firmware not being responsible for anything more than translating kernel commands to the HW. Then you leave ACPI for the remaining 20% of HW that doesn’t fit in the bucket but you also make the warning verbose (you’re running legacy ACPI device X - this may degrade your battery power / prevent sleep wake from working effectively). If they can also get Windows kernel engineers on board then you would have a compelling market forcing function on HW makers/driver writers to simplify their code.
- vetinari 6y agoSleep and hibernate have nothing to do with drivers. They are done via ACPI. ACPI is implemented by the device vendor, is part of BIOS/UEFI and is notoriously buggy.
- 1996 6y agoSome manufacturer selectively implement ACPI (ex: no S3 or S4, only S0 for connected standby) making things worse
- Overdr0ne 6y agoNo. Linux drivers are supposed to implement runtime_pm callbacks. These are called based on the usage counter of those devices. ACPI is an Intel/microsoft standard for power state definition with spotty compliance. How and when you put those devices into whatever power state, ACPI or not is dictated by those callbacks. Bugs seem to most often occur when you turn off something when it is still being used cuz someone failed to claim it or released it too soon. Also asic bugs in their definitions of their power states.
- dyingkneepad 6y agoruntime_pm is generally for runtime suspend (Intel calls it s0ix) instead of S3 suspend. You can implement S3 suspend using the same callbacks as your runtime_pm callbacks, but you don't need to. The runtime_pm framework is for when applications are still running but the device goes to sleep. In S3 suspend first every single user space application freezes, then the drivers go to sleep. S3 is much easier to implement.
- Overdr0ne 6y agoI think ideally all pm would be controlled by the runtime_pm and qos frameworks. You then don't need to define explicit power states like 'sleep' or 'suspend', you instead simply use what you need for a given performance spec and naturally use a minimum of power. I think that is the ultimate plan
- graposaymaname 6y agoWould it be for the same reason that it takes too long to shutdown? My laptop (dualboot - ubuntu/windows) takes significantly longer to shutdown when on linux. Even with the SSD - which made windows really faster.
- Zancarius 6y agoI have a desktop that shuts down nearly instantly and a ThinkPad that shuts down nearly instantly. I have another laptop that takes about a minute to shut down, and it appears related to the wireless NIC. While it's an Intel-based card (Killer-rebranded... absolute garbage), I've had nothing but trouble with it. I plan on swapping it out one of these days.
- Delk 6y agoPerhaps, or maybe some service just keeps hanging for some reason before it shuts down. It might be a software matter, too.
- ncmncm 6y agoI have not seen this problem on Linux in the past decade. I am obliged to conclude that it must be just an NVidia problem, because I always avoid those. (My laptops are built with an NVidia chip in them, but powered off. On-chip Intel graphics work very, very well lately.)
- easde 6y agoI don't think I've encountered a single smartphone by a reputable vendor that has had significant issues sleeping, no matter the chip vendor or OS. Meanwhile people do have serious issues with sleep even on Intel Macs running MacOS and Thinkpads running Windows. For whatever reason PC chip / hardware vendors just cannot get sleep to work properly. Apparently the problem is so low-level that even a company like Apple cannot paper over the problems without throwing out Intel entirely and using their own SoC in the new Macbooks.
- raffraffraff 6y agoYup. Go for the most boring hardware you can. No fancy GPU. Or be willing to spend time editing blacklist files, or writing your own rmmod/modprobe hooks for sleep/wake.