Earlier quoted context omitted.
Linus tech tips on YouTube did a video about a windows bug where sleeping while charging would allow the laptop to wake up to check for updates etc but often caused this issue of turning on in a bag
It wouldn't happen that this feature was released around early/mid 2020? Windows sleep used to be semi-reliable but one it's been shit for a couple of years. (Any link to the video/docs for turning it off?)
I helped fix sleep-wake hangs on Linux with AMD GPUs
191–200 of 218 posts
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#192Earlier quoted context omitted.
There's really two problems as I understand it: - Overcommit. Linux will "overcommit" memory: allocations will succeed when there's no memory, and then hang when the page is actually mapped if no physical pages are available (to my understanding.) Windows NT doesn't do this. Not sure exactly how macOS/XNU handles it. - The OOM killer. Because allocations don't fail, to actually recover from an OOM situation the kerne…
> two problems ... overcommit Is there any other sensible way to do this though? It would be quite inefficient to constantly call mmap for additional small(ish) pieces of memory. In effect overcommit just means that until the page is actually written to it hasn't really been allocated. (Aside: I believe a malloc implementation that zero'd out blocks on allocation would fail abruptly rather than later in case that hap…
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#193Earlier quoted context omitted.
Because they own the now hardware, and MacOS iOS run exclusively on their hardware Source: I work on windows power management and I know system engineers at apple.
That's the often repeated argument. But as a counter point you have the Google Pixel. Google owns the hardware, even the SoC, and the software. And yet, battery is still poorer than third party Android phone manufacturers. And let's not even compare to Apple. So controlling the entire stack isn't enough. There has to be a desire to do better, as well as technical competency.
in my experience with OnePlus, it aggressively kills and/or throttles applications that you want to be running in the background (e.g. fitness trackers or even audio players) even when you put them on the battery allowlist.
at the same time, my iPad just randomly decides to drain all of its battery even when it's been sitting unused without any apps installed. I don't have this problem on Pixel devices. (you do get this problem as soon as you install some misbehaving apps but that's something you've done to yourself)
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#194I used to think that naming things, cache invalidation, and off-by-one errors were the 2 biggest problems in CS, but then I learned about the "sleep/wake" problem and realized it's NP-complete.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#195Earlier quoted context omitted.
Sleep & suspend doesn’t work on Windows either. Power control is the kind of stuff that benefits from very tight integration, and PCs just don’t have that. Firmware is seen by most vendors as a pure cost to minimize, so you get a fragmented market full of subcontractors delivering the bare minimum that is considered “working”. Manufacturers also know most people aren’t going to use a big part of the functions they’re…
Are there issues in Windows? Sure but if you give me 100 laptops, 80% will do this right without any issue. Maybe 30% of those laptops will work right on any Linux distro without major fucking around with bullshit trying to make it work. Yes those numbers are made up but I have been running versions of Linux since Slackware in the 90s. I still have a desktop with an amd cpu and nvidia gpu that I can’t get to sleep/su…
Now its like an elderly nursing home patient who wakes up several times and raids the kitchen to eat all the time.
The fall of a once great OS is sad to see. I guess AI matters more to Microsoft than their Core OS nowadays.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#196Earlier quoted context omitted.
> Sleep & suspend doesn’t work on Windows either. Or Macintosh. My $DAYJOB Macbook sleeps properly about about 2 out of 10 times, at best. Most of the time it fails to sleep and by the next morning when I open it up, the battery is dead. :-( For comparison, my System76 laptop running PopOS! sleeps perfectly, every time with no issues. shrug
> My $DAYJOB Macbook sleeps properly about about 2 out of 10 times, at best. Most of the time it fails to sleep and by the next morning when I open it up, the battery is dead. :-( Important to remember that work laptops typically install all sorts of crap spyware and fleet management software that causes the system to misbehave. That’s not as much on Apple although not protecting their brand against such software is…
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#197Earlier quoted context omitted.
There's really two problems as I understand it: - Overcommit. Linux will "overcommit" memory: allocations will succeed when there's no memory, and then hang when the page is actually mapped if no physical pages are available (to my understanding.) Windows NT doesn't do this. Not sure exactly how macOS/XNU handles it. - The OOM killer. Because allocations don't fail, to actually recover from an OOM situation the kerne…
> two problems ... overcommit Is there any other sensible way to do this though? It would be quite inefficient to constantly call mmap for additional small(ish) pieces of memory. In effect overcommit just means that until the page is actually written to it hasn't really been allocated. (Aside: I believe a malloc implementation that zero'd out blocks on allocation would fail abruptly rather than later in case that hap…
This is most likely a trick for garbage collection or memory bug hardening or both. Haskell programs also map 1tb.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#198Earlier quoted context omitted.
Linus tech tips on YouTube did a video about a windows bug where sleeping while charging would allow the laptop to wake up to check for updates etc but often caused this issue of turning on in a bag
It wouldn't happen that this feature was released around early/mid 2020? Windows sleep used to be semi-reliable but one it's been shit for a couple of years. (Any link to the video/docs for turning it off?)
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#199Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#200Earlier quoted context omitted.
After my (closed) gaming laptop started making annoying Windows noises earlier today, I'm led to believe that it doesn't work properly on Windows either. It seems like it's basically hardware whack-a-mole at this point. The only reason Apple does it reasonably well is they control more of the stack and they support less hardware. The only reason Windows does it better than Linux is they have more eyes on it.
The reason it works better on Mac and windows is because they're designed to be desktop OSs. On Linux the funding goes to things cloud services and Android use, which decidedly does not include suspension or other desktop features
I've interacted with him countless times on the kernel mailing list and bug tracker, he's literally paid by AMD to work on Linux support for AMD's consumer desktop hardware.