Slashdot Mirror


SteamOS Has Dropped Support For Suspend

jones_supa writes: As pointed out by a Redditor, it seems that suspending the machine is not officially supported by SteamOS anymore. A SteamOS user opened a bug report due to his controllers being unresponsive after a suspend cycle. To this, a Valve engineer bluntly reported that "suspend is no longer supported". He further explained the issue by saying that given the state of hardware and software support throughout the graphics stack on Linux, the team didn't think that they could make the feature work reliably.

13 of 378 comments (clear)

  1. As a Linux supporter, I agree by Gazzonyx · · Score: 5, Interesting

    Suspend is such a complicated feature that touches every part of the stack. I've found it works about 50/50. Every now and then I try it and it works for a while until a kernel update breaks it, eventually I try again in a few months and it's working again. I wouldn't support it if I wanted to remain sane.

    --

    If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.

    1. Re:As a Linux supporter, I agree by Gazzonyx · · Score: 3, Interesting
      Disclaimer: I have a patch in Linux, but I don't know anything about this section of code at all, I only know what I've heard. I will try to explain it as I understand it from a high level though; just take it with a grain of salt as for how accurate it is.

      As I'm sure you're aware, the resume process has to do everything in a precise order because some subsystems rely on others to be awake before they can proceed. Every driver has to interact with less traversed paths of code and they have to work on sometimes obscure hardware where the documentation doesn't exist or is wrong (think reverse engineered drivers), and every piece has to work more or less flawlessly or the rest of the chain can't load.

      As I understand it, the state of the machine is written out to page file and has to be loaded back from there and then run as if nothing had happened. Consider just the case of software that doesn't behave correctly when the system time jumps ahead a couple of hours mid computation. I've had issues with KDE not being able to wake up from screen saver (maybe USB didn't reinitialize correctly and it can't see my mouse/keyboard inputs?) or the screen not coming back without power cycling my monitor after thawing out the state.

      There's a lot that can go wrong, and it seems it usually does. I know even Windows sometimes has issues when I close my laptop and head into the office - sometimes it remains running the entire time (I think VirtualBox is the cause - but I can't reliably reproduce, so I'm not sure).

      --

      If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.

  2. Ubuntu does not support hibernate by kervin · · Score: 2, Interesting

    Considering the push for the "Year of the Linux Desktop" it's strange Ubuntu does not support hibernate and hasn't for years now. Hibernate is important, because unlike suspend it does not require power.

    It's annoying to have the computer shutdown when it runs out of power instead of simply hibernating.

    1. Re:Ubuntu does not support hibernate by adhdengineer · · Score: 3, Interesting

      the problem is that people see the notification that updates are ready and then they keep clicking postpone because reasons. I am as guilty of this as anyone, my work PC never gets shutdown because I hate waiting for it to start up again. I've had updates pending for up to three weeks before. If there were any 0-day exploits that had fixes pending i'd be vulnerable the whole time.

      Basically forcing updates to reboot is addressing that. And while I may swear when i go to home (Windows 10) pc and find it's rebooted for updates overnight, I don't mind and I wouldnt disable it because I know i'd just leave the damn thing pending for a while and forget to do it myself.

      Having said that, i'd like the auto-update-and-reboot be a bit smarter and signal apps that an update reboot is occurring and then the apps save their state, then after the reboot i'd like it to log me back in and fire up the apps to their pre-reboot state. That's the ideal situation i think

  3. Re:Is systemd involved at all? by UnsignedInt32 · · Score: 1, Interesting

    Funny you mentioned systemd, as hibernate on pre-systemd setup didn't work for me reliably on two Linux machines I use. Now I use it routinely without any problem.

  4. Technically, suspend is not the problem. by tlambert · · Score: 5, Interesting

    Technically, suspend is not the problem. The problem is resume. It doesn't probe and reattach the controllers to the same point in the device tree that they were in when the system was suspended. Since those are the device nodes that SteamOS has open at the time of the suspend, and they route to The Noplace(tm), the controllers become unresponsive.

    This is a general problem in the Linux device model, and you can see problem in the device model poke their heads up in various places.

    For example, if you plug in two USB keyboards, what you are going to see when you hit the caps lock key on one of them is that the caps get locked for both of them, but the LED indicating that the caps lock is on is only lit on the original keyboard. This is great fun, when you see the LED state on both keyboards relative to the caps lock state, when you bounce the caps lock key on the second keyboard.

    Presumably, this was implemented this way in order to allow multihead operation, with the keyboards separately (and explicitly -- which they are not by default -- to separately running console instances. But it's indicative of deeper problems in the model.

    The reattach operation should (in theory) be handled by the udev mechanism, which I'm told is subsumed in systemd; however, they've faithfully reproduced the problems in the original implementation in the replacement as well (so it actually doesn't matter which one SteamOS is using, so please don't argue about that crap).

    There are two implementations that do work; however, they in fact work differently.

    The first implementation is in Windows; it works by directly assigning the device descriptor based on the USB vendor and device ID. What this effectively means is that when you resume, everything gets the same descriptor (or a replacement) that it had going own. The keyboard "problem" is handled in Windows by making them "the same device" -- in other words, you caps lock on one keyboard, it does it on both, and you undo it, and it does it on both.

    The second implementation is Mac OS X; it's handled by explicit enumeration order of USB bus devices, and the using the USB vendor and device ID *and* the enumeration position ("bus ID) to uniquely identify the device.

    You'll also notice, if you look, that Linux has problems with keyboard internationalization and locale. This is most easily seen by using a locale specific keyboard, and having it not be recognized. Further, you'll notice that the character set differences are handled by tables in X and Weyland, and these are not the same as the console tables (i.e. the USB ID of the keys is not propagated through the full input stack, and there's a difference in operation between sending the events up through the console, vs. sending events up through the X Server). To fix this would require moving the HID key value translations into the kernel keyboard driver, rather than having it (mostly) in user space in all three instances (X, Weyland, console).

    Finally, Apple is one of the few vendors that actually correctly fills out the USB device serial number field correctly, so it's hard to use that as a unique identifier (specifically, it makes it really hard to mask program all your controller chips, without adding a "burn the fusable links" step).

    Further, they are also one of the few vendors that sets the locale field in their USB devices (most laptop vendors will get this right during manufacturing, by placing the value into the BIOS, since the laptop keyboard is actually matrix decoded by the EC via a grid hooked up to GPIO pins, and then the EC pretends it's an 8051 with a PS/2 interface for the keyboard to mux a PS/2 trackpad -- e.g. like a Synaptics -- to look like a standard PS/2 keyboard and mouse).

    Apple handles for unrecognized keyboards by having you press "the key right of the left shift key" and "the key to the left of the right shift key", and then uses the key IDs. Not ure if they have a patent on it, but it's a lot more clever than what Linux or the BSDs do to

    1. Re:Technically, suspend is not the problem. by tlambert · · Score: 3, Interesting

      When we are looking at USB devices is it possible this could be handled later in the boot process by having all devices re-polled and connected as new devices? So on resume previously connected devices are simply treated as new devices. It would add a delay to the resume process and I'm guessing there may be device confusion if you have 2 controllers attached, ie player 1s controller becomes players 2s after a suspend resume. But would this not be a simple, but manky, solution to the problem?

      If you are talking about the application programs closing and reopening the devices, then yes, the controllers could be handled that way. You would have to do it in every single application, however, for every single device which was capable of moving around that way, so it would include audio devices, cameras, game controllers, and so on.

      Further, you'd have to have a mechanism for notification of the applications that they need to close and reopen (and reinitialize) their devices.

      This really can't be done at a system level, because on resume the devices look like arriving new devices, and the nodes are in use by existing opens. So it is, for example, easy to "lose" a built-in camera or keyboard or audio device, because those end points are in use, and the "new" device gets assigned a new end point.

      One of the things I fixed in the Chrome OS testing environment was that the cameras got "lost" during factory testing on a number of devices where they were interfaces via USB (but were built into the clam shell). This meant that the test harness, which set up devices up front, would lose the devices because there were "there and open" in the Python code, but "not used yet before the suspend/resume cycle".

      The fix was to move the camera open/close code, ant to modify the code to search for specific attributes which meant "camera attached to this node", rather than "node for a camera".

  5. Re:Fragmentation... by wolrahnaes · · Score: 3, Interesting

    Am I the only one who hasn't had a suspend problem in years on any platform? The last time I can recall having suspend not work reliably was on a late '90s Pentium 2 running Windows 98.

    --
    I used to get high on life, but I developed a tolerance. Now I need something stronger.
  6. Re: Is systemd involved at all? by hairyfeet · · Score: 5, Interesting

    You got it half right, the problem on Linux is drivers or more precisely a driver stack that hasn't evolved since the days of Win9x. You can sit down and with basic math show that "let the devs handle it" just doesn't scale, even if you had ten times the amount of driver devs than Linux actually has they still wouldn't have enough hours in the day to fix all that gets pissed on when Torvalds and friends change a pointer.

    I have taken XP drivers and ran them in Windows 7, taken XP X64 drivers and run them in 8.1 64bit, and until Linus fixes his mess of a driver stack so an OEM won't have to remake every driver when a new kernel comes out? Things are never gonna get any better which is why despite Windows 10 being nothing but spyware pretending to be an OS Linux will not gain even a single percentage point, not one.

    The really sad part IMHO? I gave you a perfect test to rub in the dev's noses like rubbing a doggy nose in its poo, they say their driver model works? Show them the results of the Hairyfeet challenge and call 'em out on their bullshit. Instead I get called dirty names for actually expecting an OS to be able to update itself without destroying itself (gasp! shock!) and have FOSSies rush to defend them with classic memes like "its free you can't complain" or the ever hilarious "you should fix it" which is like saying you have a new car that can take on the new Mustang and when somebody asks to see it you hand 'em a pile of raw ore and say "here ya go, make it for me" LOL.

    So take the challenge yourself, pick any of those "consumer friendly" distros and knock yourself out, then you will see why Linux doesn't gain any share and why I predict Valve will abandon SteamOS within 5 years, its because you can't build a strong house on a rotten foundation and the Linux driver model is rotten to the core.

    --
    ACs don't waste your time replying, your posts are never seen by me.
  7. Re:Is systemd involved at all? by KGIII · · Score: 3, Interesting

    Hibernation never works for me and I am unwilling to debug it. Suspend works like a champ, though.

    --
    "So long and thanks for all the fish."
  8. Re:Windows only says "Sleep" by Anonymous Coward · · Score: 2, Interesting

    In Linux, suspend to disk really does write the contents of RAM to the swap partition.

    From here:

    Suspend part
                ~~~~~~~~~~~~
                running system, user asks for suspend-to-disk

                user processes are stopped

                suspend(PMSG_FREEZE): devices are frozen so that they don't interfere
                                            with state snapshot

                state snapshot: copy of whole used memory is taken with interrupts disabled

                resume(): devices are woken up so that we can write image to swap

                write image to swap

                suspend(PMSG_SUSPEND): suspend devices so that we can power off

                turn the power off

  9. Re: Is systemd involved at all? by Anonymous Coward · · Score: 0, Interesting

    Funny that yours has just worked. I guess you were one of the lucky ones. I've used some Linux off and on, mostly off these days. A couple of years ago I had an Ubuntu over the network upgrade (can't remember exactly which one), and after the install finished there was no network card anymore. The flipping OS upgraded OVER THE NETWORK and then didn't have a network when it was done. That's the way Linux works sometimes. You go to a second machine and search on it and find that they randomly don't have support for the specific card anymore. Outstanding! Then don't upgrade machines that have that card.

  10. No Mac comments? by ilsaloving · · Score: 1, Interesting

    This is one of the big reasons I switched to Mac a long time ago (Pre Windows 7). I got utterly fed up with Windows being unable to handle suspend/resume. I tried to go to Linux, but the amount of fiddling and script editing I needed to do to make it was was just absurd, and still wasn't guaranteed to work.

    I am able to close the lid on my Macbook Pro to suspend, open it to resume, multiple times a day for weeks at a time without ever having to shut down or reboot. (Ocassionally it would die, at which point I would be livid because it would be so unexpected). Whether this is still true or not, I'm not sure, as I haven't needed to do this for a couple years now, but it was true for 10.5, 10.6 and 10.7.

    It's depressing that that it sounds like things haven't improved at all on the Linux side... I don't want to go to back to Windows, especially considering all the privacy nightmares I've been reading lately about Windows 10, but I'm equally unhappy with the appliance-ification of computers that Apple is doing... I swear it seems like we're going full circle to go back to the 1980s.

    One would have thought that by going the Apple route and focusing on a specific and limited set of hardware, Valve would be able to focus on making sure that that hardware works flawlessly. I believe there are several Linux-certified laptops that are supposed to have done this (I can't remember who at this point... Dell maybe?), but I have no experience with them so I can't say how successful they were.

    But rambling aside... Being able to suspend and/or hibernate should be considered a standard feature in almost everything at this point, so a device that can't handle it just seems... sub-par, and makes you wonder what else they've screwed up, or if they're even competent enough to put out a decent product in the first place.