Earlier 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.
I helped fix sleep-wake hangs on Linux with AMD GPUs
141–150 of 218 posts
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#142Earlier quoted context omitted.
For some reason, people really insist on being able to put their machines to sleep, I honestly don't know why. Long boot times, maybe?
I mean I totally get it. At the end of the day I have a billion tabs open and 14 instances of notepad. But after getting burned by sleep failing enough times, you gotta change your habits.
So while I get the "I just want sleep to work, dangit" attitude (it really should just work, to be honest) the fact is that it barely does work. Seriously, it took this long to realize that VRAM contents may not fit into RAM entirely, so powering down the drives that hold the swap should probably be postponed to the last moment.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#143> Through some digging, I found that when a desktop enters S3 sleep, the system cuts power to PCIe GPUs I am not sure how correct this assumption is. S3 is supposed to cut power to everything but RAM, but for example Gigabyte Aorus motherboards are notorious for an NVMe SSD sleep bug that randomly prevents the system from properly sleeping or waking. This is fixed by adding the following udev rule: # Generic PCIe fix…
Any further insight you might have on these Aorus wakeup issues? In particular, it seems the wakeup in my case is coming from `.../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45/wakeup/wakeup6` which does not really mean anything to me.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#144This is amazing work! If folks have ever wondered why suspend is so difficult to get working on linux and why debugging it is equally difficult, this is a single datapoint with lots of information about all the things that can go wrong. Even now I have a thinkpad P1G4 where the fans won't turn off automatically unless I turn them off before going into suspend. Recently I also started having crackling issues with my b…
It can be really hit-or-miss, and it can be really hard to debug errors like in the post. A lot of workarounds that are suggested for various issues are also not really viable. Some of the workarounds involve turning off different power-saving modes; however, the point of enabling sleep is often to increase the amount of usable time between charges, and turning off these power-saving modes can often dramatically shor…
Thanks
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#145Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#146I guess "hibernating" (writing VRAM to swap) works better than expecting userspace to gracefully handle device resets. One linear read vs. a thundering herd of processes re-initialising, decompressing, etc. should be more predictable/reliable at least. I do wonder however how much VRAM is "volatile" - ie. framebuffers - and could just be thrown away. And web browsers seem to handle GPU resets just fine, so maybe they…
I didn't mention in the article but the Nvidia drivers at one point would drop VRAM rather than preserving it, leading to corrupted RGB noise textures in window managers and browsers (and potential crashes though I don't think I encountered them). I suggested doing this on the AMD bug tracker ( https://gitlab.freedesktop.org/drm/amd/-/issues/2362#note_20... ), but the amdgpu developers weren't interested.
Do you know if they tried to communicate with clients and were just ignored/not implemented or if the APIs just don't support it?
A quick search indicates that "residency"[1] exists, but no idea the extent it's useful/implemented.
[1] https://learn.microsoft.com/en-us/windows/win32/direct3d12/r...
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#147Earlier 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…
Even Apple struggled to get it working perfectly in my experience across several models in the PPC/x86 era. Yes they are better(-ish) but when I had Apple laptops I'd still see weird sleep/wake issues in around 1 in every ~50 sleep/wake cycles. I also had one Apple laptop which had its battery going from 100% to 0% overnight during sleep requiring a cold start in the morning on a regular basis despite it being put to…
My work mac (M1 Pro) occasionally locks up and reboots when waking from sleep too, at about the same frequency.
Always wondered why this was such a difficult problem to solve, seemingly irrespective of operating system. (Linux has never been acceptable or reliable in this respect, IME, regardless of distro and hardware configuration.)
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#148Apple became a trillion dollar company by mastering sleeping / waking up of electronic devices. why nobody else sees this?
Pretty much all smartphones can do this.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#149Earlier quoted context omitted.
I didn't mention in the article but the Nvidia drivers at one point would drop VRAM rather than preserving it, leading to corrupted RGB noise textures in window managers and browsers (and potential crashes though I don't think I encountered them). I suggested doing this on the AMD bug tracker ( https://gitlab.freedesktop.org/drm/amd/-/issues/2362#note_20... ), but the amdgpu developers weren't interested.
Oh wow didn't really expect anything other than whole device loss. Just returning garbage does sound bad. Do you know if they tried to communicate with clients and were just ignored/not implemented or if the APIs just don't support it? A quick search indicates that "residency"[1] exists, but no idea the extent it's useful/implemented. [1] https://learn.microsoft.com/en-us/windows/win32/direct3d12/r...
I'm not sure if residency is relevant here; the Microsoft link indicates that eviction makes memory inaccessible from the GPU to make room for other memory, which explains why Linux uses the same name for "backing up" VRAM before sleep (through the same underlying mechanism).
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#150Earlier quoted context omitted.
I mean I totally get it. At the end of the day I have a billion tabs open and 14 instances of notepad. But after getting burned by sleep failing enough times, you gotta change your habits.
Firefox preserves opened tabs on close/re-open, and so does Notepad++/Sublime (and for those, it works even for tabs you've never saved as files). And let's be honest, losing most of those browser is inconsequential. So while I get the "I just want sleep to work, dangit" attitude (it really should just work, to be honest) the fact is that it barely does work. Seriously, it took this long to realize that VRAM contents…