Steam gobbling shut down request ? #3301

Open
Sarkie opened this Issue May 13, 2014 · 118 comments

Comments

Projects
None yet

Sarkie commented May 13, 2014

I am running elementary os 0.2 64 bit, when I press shut down either via the power button on the box or in the os, then Steam will shut down correctly as shown via running Steam via terminal.

What I have noticed is a timing difference, if Steam isn't running, this will be performed in under 4 seconds, if Steam is running it is greater than 25 seconds, even though according to the terminal output Steam has already taken the request and shut down Steam.

Is there any lingering processes that are running that are timing out after 20 seconds, are there any commands I can run to watch what is happening to Steam or elementary os to help see where the issue lies?

Processor Information:
Vendor: GenuineIntel
CPU Family: 0x6
CPU Model: 0x17
CPU Stepping: 0x6
CPU Type: 0x0
Speed: 3000 Mhz
2 logical processors
2 physical processors
HyperThreading: Unsupported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
SSE4a: Unsupported
SSE41: Supported
SSE42: Unsupported

Network Information:
Network Speed:

Operating System Version:
elementary OS Luna (64 bit)
Kernel Name: Linux
Kernel Version: 3.8.0-39-generic
X Server Vendor: The X.Org Foundation
X Server Release: 11203000
X Window Manager: Mutter(Gala)
Steam Runtime Version: steam-runtime-release_2014-04-15

Video Card:
Driver: X.Org Gallium 0.4 on AMD RV770

Driver Version:  3.0 Mesa 9.2.0
OpenGL Version: 3.0
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 74 Hz
VendorID:  0x1002
DeviceID:  0x9442
Number of Monitors:  2
Number of Logical Video Cards:  1
Primary Display Resolution:  1280 x 1024
Desktop Resolution: 2560 x 1024
Primary Display Size: 13.31" x 10.67"  (17.05" diag)
                                        33.8cm x 27.1cm  (43.3cm diag)
Primary VRAM Not Detected

Sound card:
Audio device: Realtek ALC889A

Memory:
RAM: 3952 Mb

Miscellaneous:
UI Language: English
LANG: en_GB.UTF-8
Microphone: Not set
Total Hard Disk Space Available: 70935 Mb
Largest Free Hard Disk Block: 19209 Mb

Installed software:

Recent Failure Reports:

Contributor

gdrewb-valve commented May 13, 2014

See also #3241 for unusual shutdown behavior.

jjkinas commented Mar 4, 2015

This bug is also on Ubuntu Mate 14.10 & 15.04 beta

I must close steam before shutting down , or it is very slow , same behavior. If I just try to shutdown , steam hangs the shutdown by 30 seconds.

System Information:
http://pastebin.com/WZWfndnS

Exists in Cinnamon too, on both Arch and Mint.

@Rfvgyhn Rfvgyhn referenced this issue in linuxmint/Cinnamon Oct 16, 2015

Open

Steam slows down shutdown #3752

I'm experiencing this issue as well on my new Ubuntu MATE 16.04 install. If the development team needs some log files or someone to test something, @ mention me and I'll be happy to help.

calexil commented Aug 2, 2016

STILL ONGOING, Mint 18 mate

The exact same thing happens to me in Fedora 24 with Mate or Cinnamon, as well as Ubuntu Mate 16.04.1.

Did the most recent client update fix this for all of you? They said they fixed something about shutting down with Steam open.

It didn't. It still delays the shutdown of MATE and Cinnamon by whatever amount SystemD is set to delay it for.

SEAPUNK commented Jan 24, 2017

Yeah, which is strange. There must be some additional process that still doesn't listen to SIGTERM, although Steam definitely appears to shut down on it. Maybe Steam takes too long to quit?

calexil commented Jan 24, 2017

this issue was NOT resolved, mint 18.1 mate, still hangs for 30 seconds on shutdown if steam is open

Maybe Steam takes too long to quit?

This wouldn't surprise me at all. I've had issues in the past with Steam holding up the shutdown process in Windows.

+1

Same here, Issue still exists with Linux Mint 18.1 64-bit Cinnamon.

Same here, Issue still exists with Linux Mint 18.1 64-bit Mate.

Same issue. Linux Mint 18.2 Cinnamon 64-bit.

Owner

Plagman commented Jul 12, 2017

Steam should obey SIGTERM now, any details on what exactly is happening? Is the Mint session relying on some other mechanism to instruct the client to exit?

SEAPUNK commented Jul 12, 2017

My best guess is that Steam, on SIGTERM, takes too long to shut down, causing the system to wait (and eventually time out) on shutdown request. I don't 100% understand why the system doesn't catch Steam's process shutting down, unless there is another Steam process that keeps running in the background...

Owner

Plagman commented Jul 12, 2017

Even with downloads running, the client always exits gracefully under a few seconds here if I manually send it SIGTERM.

stevethepocket commented Jul 15, 2017

Something I am noticing now is that when I go to shut down while Steam is running, it forces Steam to quit, but then doesn't actually shut down; it just stays on a fully-functional desktop with everything except Steam still running. I have to pull up the shutdown option a second time. When I manually exit Steam first, and then hit the shutdown button, it shuts down properly the first time. This is on Kubuntu 17.04.

Owner

kisak-valve commented Jul 15, 2017

I might as well add a note to that, with KDE on Arch, I see a notification from Plasma Workspace that says Logout canceled by '' when the steam window visibly closes, but steam itself finishes closing a second or two later which is seen by the steam tray icon leaving the tray.

Unaccounted4 commented Jul 15, 2017

I have seen this very behaviour on KDE as well. On MATE it still does the same old thing, where shutdown becomes delayed by 90 seconds (which is the SystemD default timeout).

Even with downloads running, the client always exits gracefully under a few seconds here if I manually send it SIGTERM.

I'm guessing that's the issue. A few seconds is longer than the rest of the system takes to shutdown, at least on my end.

Same behaviour here with Arch + XFCE. I think it only started recently, but can't pin it down to an exact date.

Same behaviour with xubuntu and manjaro. It started to gobble the shutdown signal about 2 weeks ago.

@frikisama Same scenario. Second week of July I came back to my PC a minute later to find it hadn't rebooted. Thought I just "didn't reboot". July 14th I realised it was a bug. For me I believe it started some time between July 5th and July 10th. I could be wrong of course. :-|

Going through pacman log I found very few xfce-related packages that had been updated recently. Even so, downgrading those packages did not help in any way.

Same issue with Manjaro and KDE. Plasma 5.10.3.

mikerm19 commented Jul 23, 2017

Same here with Linux Mint 18 (Cinnamon). It cancels the shutdown completely, but still exits Steam. I managed to screen shot the steam client shutting down window for a second after Cinnamon tried to shut down. I'm not sure when this started but it was a couple months ago it seems like, which is odd since this bug is from 2014.

MartinX3 commented Jul 27, 2017

Switched to Ubuntu Mate 17.04.4
Same Problem, need to shutdown "twice".
(First one only exit steam.)

To add, happening on Fedora 25 as well, also with XFCE. I think it is safe to say this is not a distro-specific problem.

wolfyrion commented Jul 31, 2017

I had also this problem with Steam and some other applications so I created a work around solution using Plasma Event Notification and Actions.

Run "Notifications"
Go to Event Source--> Plasma Workspace ===> Logout Canceled

In Plasma Notifications you can create a command to run when a "Logout Canceled" event had happened.
So I just created a shut.sh script and made it executable that includes
#! /bin/bash
shutdown -P now

So every time a "Logout Canceled" event happens it just runs that script and it shuts down the pc...

MartinX3 commented Aug 3, 2017

@wolfyrion
So every event which cancel the logout will shutdown the computer?
That's sound like you want to kill an insect with a gatling gun.

zatricky commented Aug 3, 2017

@wolfyrion: I applaud your ingenuity - but @MartinX3 is right. The workaround also probably won't work unless you're using KDE.

The most likely bad scenario of course is where I click logout and an app shows that I hadn't saved something, prompting me to do the save. Except, too late, forced shutdown in progress. :-|

@MartinX3 @zatricky : yeap you are right, only people with plasma can implement this work around.
As for the bash script, I just posted what works for me but you can modify it according to your needs like for example to shutdown your PC after a min or secs, is a bash script so you can actually do whatever you want after a "Logout Canceled" event .
Well I am not using any other DE than KDE but even if I was using another DE I think I would create a shutdown button bash script , just to exit steam and shutdown the PC so as to make it easier for me until Steam fixes this problem.

(I use my pc for rendering or farming steam cards so I have to automatically shutdown my PC because I am not always at home. Temperatures are a bit high these days so I was using Kshutdown to schedule when the pc will be shutdown but unfortunately because of steam and some other apps my pc was not shutting down thats why I used that solution.)

zatricky commented Aug 7, 2017

[ EDIT ] It seems if Kodi shuts down, Steam doesn't gobble the request. But XFCE still can't shut down on the first attempt. :-/
Original:
This issue appears to no longer affect XFCE+Arch for me - but does still appear to affect my XFCE + Fedora 25 install.

Whitetigerswt commented Aug 9, 2017

Having this issue on Arch with KDE. I should add that it's been happening since I installed Arch 3-5 weeks ago

Odel commented Aug 17, 2017

Having the same issue - Arch with KDE

Been ongoing for me since install about a year ago

jeffgrammer commented Aug 20, 2017

Same issue on Xubuntu 17.04, I have to press shutdown/restart twice in order to get it to work (first time seems to just kill Steam), seemed to start around the time I upgraded from 16.10 to 17.04. Also, not sure if this is related, but around the same time my system started freezing on resume from suspend with Steam open.

is someone working on this? @triage-valve got assigned to this issue over 3 years ago and didn't even leave a comment yet.

@property-live Yea, it is kind of ridiculous. However, considering us Linux uses make up less than one percent of the steam users (http://store.steampowered.com/hwsurvey) it only makes sense from a business perspective (though it kind of shows that even they do not have faith in their own Linux-based Steam Machines/SteamOS considering such a little bug has gone under the radar for so many years...).

Commenting to confirm as well, still seeing this behavior on Linux Mint 18.2 Cinnamon. Pressing shutdown once closes Steam, but the system never subsequently shuts down unless I repeat the shutdown request with Steam not running. Closing Steam manually and then shutting down does not present any delays.

SE2Dev commented Aug 23, 2017

I can confirm that this issue occurs on a relatively clean installation of Debian 9.1 (using XFCE) and I've experienced it before on Debian 8 using Cinnamon as well.

Confirmed on Kubuntu 16.04.3, I have to select shutdown twice if I have Steam client running. Latest Steam Beta is installed. This problem has started occuring since the last few weeks.

ICHx commented Aug 27, 2017

I also confirm it on Ubuntu 17.04, OpenSUSE 42.3 and tumbleweed. No problem on Manjaro though.

Not sure if it means anything, but ending the session with something like Ctrl-Alt-Backspace or shutting down through a terminal doesn't cause this problem.

BigMo commented Aug 28, 2017

Confirmed on Manjaro and KDE, Plasma 5.10.5. I extended @wolfyrion's approach and added both a notification and a 60s delay, allowing me to save any unsaved docs:

`#!/bin/bash

notify-send --app-name="Shutdown" "Shutdown failed; forced shutdown in 60 seconds"
sleep 60
shutdown -P now`

SE2Dev commented Aug 29, 2017

I've begun attempting to reproduce this issue on virtual machines to see what actually causes it to occur.
Currently I've tried a fresh Debian 9.1 installation (Debian desktop environment) with Steam installed from the repo. The issue does not occur - in fact Steam automatically shuts down shortly after this dialog appears.
image

I'm going to install some addition DE's and see if that has any effect.

From what I've been able to find online where other projects have fixed similar issues, depending on what library Steam uses to interface with the DM, it may incorrectly return the close event with an "ignore", which causes the DM to cancel the logout. Alternatively, it might incorrectly return a "veto" to the close event, which is how applications normally prevent data loss with possibly-important unsaved content.

SE2Dev commented Aug 29, 2017

@zatricky Yeah, that seems to be the case - I just installed xfce4 on the same system and logout / shutdown are canceled by Steam.

It might also be worth noting that I had to enable lightdm as the default display manager because when I used gdm3, I was unable to start an xfce4 session.

Edit:
I've confirmed that lightdm w/ Debian's default DE does not reproduce the issue.

  • Running sudo apt-get install xfce4 (and enabling lightdm as the default display manager when it asks) on a fresh installation of Debian 9.1 (with Debian Desktop Environment chosen as the desktop environment when installing the OS) does appear to reproduce the issue reliably. On my actual installation of Debian, I have XFCE installed as the only DE and the issue is present - so chances are XFCE (and other affected DE's) always have the issue regardless of what other DE's are installed.

zuh commented Aug 30, 2017

On Debian 9.1 with XFCE 4.12 it seems that the Steam logout dialog is interpreted as an error dialog and even though it cycles in and out on it's own (ie. completes logout/shutdown of Steam) it seems to return a value that xfce4-session sees as cancellation request. Which side of the fence the problem lays would require more digging, but maybe this helps someone to do it:


TRACE[xfsm-manager.c:1295] xfsm_manager_save_yourself_done(): enteringTRACE[sm-layer.c:232] sm_interact_request(): Client Id = 26d3bf123-032c-4cd7-97cd-aaa2114d9662, received INTERACT REQUEST [Dialog type = Error]
TRACE[sm-layer.c:246] sm_interact_done(): Client Id = 26d3bf123-032c-4cd7-97cd-aaa2114d9662, received INTERACT DONE [Cancel shutdown = True]
TRACE[xfsm-manager.c:303] xfsm_manager_set_state(): state is now XFSM_MANAGER_CHECKPOINT
TRACE[sm-layer.c:304] sm_save_yourself_done(): Client Id = 26d3bf123-032c-4cd7-97cd-aaa2114d9662, received SAVE YOURSELF DONE [Success = False]

dtitov commented Sep 2, 2017

Same issue on the newest MacOS. It's been 3 years already since ticket creation: are the Steam-guys even looking at it?

gvlfm78 commented Sep 5, 2017

It doesn't look like it, it shouldn't even be too hard to fix. Maybe we can try contacting them directly if they pay no attention to the GitHub?

bjwest commented Sep 5, 2017

This isn't really a three year old problem though, it started for me just a month or so ago. I wish I could say if it were after a system update or Steam update, and which/when exactly but I don't really know. Then only time I reboot my computer is when an update requires it. Otherwise it's in hibernation when I'm not on it.

bfloch commented Sep 12, 2017

It seems this is where the message happens:
KDE/plasma-workspace@616f57a

As to what triggers it: vlc had similar issues in the past:
https://mailman.videolan.org/pipermail/vlc-commits/2011-July/007707.html

I am pretty sure the answer is hidden here:
https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html
"Termination" is marked obsolete, but according to the vlc patch (from 2011) this was related to their issue.

EDIT:
I traced the behaviour as far as this:
https://github.com/KDE/plasma-workspace/blob/master/ksmserver/server.cpp

Please note that they indeed handle the "obsolete" marked termination behaviour with the WM_SAVE_YOURSELF message. So my guess is that you need to "send a PropertyNotify event on WM_COMMAND" as answer. Compare:
https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#saving_client_state

Just started recognizing this bug a few days ago for the first time.
I'm using Manjaro with the Nvidia-Drivers (v375.82).
It could have something to do with changing my Kernel from 4.8 to 4.12? Not completly sure on that but worth a try.

Just like kisak-valve said above:

I might as well add a note to that, with KDE on Arch, I see a notification from Plasma Workspace that says Logout canceled by '' when the steam window visibly closes, but steam itself finishes closing a second or two later which is seen by the steam tray icon leaving the tray.

I have been having this issue for a month or so now. I don't know where steam logs are, so please direct me to them if the following info is not enough.
Started steam from command line, waited for it to initialise. the following messages come after giving the shut down
Ubuntu 16.04.3 with Cinnamon (no packages to be updated in software updater)

Refresh rate: 1
Refresh rate: 1
Refresh rate: 1
Refresh rate: 1
Refresh rate: 1
Refresh rate: 1
process 5993: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
This is normally a bug in some application using the D-Bus library.
process 5993: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
This is normally a bug in some application using the D-Bus library.
process 5993: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
This is normally a bug in some application using the D-Bus library.
[2017-09-20 16:22:18] Startup - updater built Sep  6 2017 20:37:15
[2017-09-20 16:22:18] Verifying installation...
[2017-09-20 16:22:18] Verification complete
[2017-09-20 16:26:09] Shutdown

Same symptoms as others. On shutdown, steam exits, but shutdown is cancelled

supagu commented Oct 6, 2017

having this issue on manjaro, kde edition.
Its a real pain. Any progress on a fix for it?

same. manjaro, kde edition.

outfrost commented Oct 7, 2017

And same here. Shutdown attempt with Steam running - Steam exits, shutdown cancelled (no notification on this version of Plasma). Shutdown without Steam running proceeds as normal.

screenshot from 2017-10-07 22-29-59

Is there any additional info we could provide in order to hopefully get this issue resolved?

Edit: My apologies, I hadn't noticed Plagman's comment.

Photon89 commented Oct 7, 2017

Arch Linux with Xfce here, same problem.

I have installed kubuntu-desktop after an upgrade to (beta) Ubuntu 17.10 . The error never occurred in Unity but now in KDE I have to do "logout" twice because apparently steam cancels it the first time

zatricky commented Oct 10, 2017

I really wish it were easy to give more compact "me too"s in github issues. :-/

I've noticed the following behaviour and suspect strongly that it is the same issue. If it is the same issue, these steps will be FAR easier to troubleshoot the cause:

  • Ensure Steam is not running (can quit Steam or just do the next step before logging in to the computer)
  • Disconnect network
  • Launch steam
  • Wait for Steam login to time out in order that it presents the option to "RETRY CONNECTION", "START IN OFFLINE MODE", or "QUIT".
  • Though unnecessary for the test, you can now reconnect the network
  • Attempt to log out or shutdown/reboot. Steam prevents this.
  • tap "Quit" to quit Steam
  • Attempt to log out or shutdown/reboot. Succeeds.

October 17 2017 update has the same issue.
Steps to reproduce has been written here quite a lot of times, but I'll write again with minimal steps

  1. Open Steam app (/usr/bin/steam -silent) with no special env vars
  2. Select shutdown/restart

Observed result :
Steam app closes but shutdown/restart does not occur

Expected result :
Steam app closes and shutdown/restart occurs

If the devs are not getting the observed result, can anyone post any env vars they are using which enables expected result?

SE2Dev commented Oct 18, 2017

@renjithis As I said before - the issue can be reproduced on a fresh installation of Debian 9 w/ Cinnamon and XFCE - So they wouldn't have to worry about env vars or any additionally installed programs. I don't know why they've yet to address the issue when it can be reproduced on a clean system 100% of the time in a VM...

Are we that much of a minority in an already minor portion of steam for linux users that they are ignoring us?
The last update didn't even have a Linux/SteamOS section, it only had genral, windows and mac. I thought we amounted more than Mac users who use Steam

Owner

kisak-valve commented Oct 18, 2017

@renjithis, the current status of this issue is at #3301 (comment). It's not clear what is triggering the bad behavior, even though it is reproducible.

So I'm not an expert, I'm willing to help identify. If anyone wants to point me to what log files are needed, etc I'm more than happy to collect information and post. I'm keeping my Linux Mint install very up to date along with the Steam client and the issue is still there. It's the only program out of everything I've tried that does it though.

Maybe we should bring this to the attention of the affected DE's developers by opening issues on the corresponding bug trackers. Don't think they gonna magically notice this here.

I thought this was the place where issues with Steam for Linux is supposed to be reported (It still implies in the repo's description). Do we have a new place where we can report them?

I was under the impression that confirmed issues will be posted by the repo admin/mods to the developer's bug tracker (which I would expect to be private).

@kisak-valve What more info can we provide that will help you (or who is working on this issue) identify the cause of the issue?

@renjithis I'm talking about the DE's developers, not steam. If you read the post way above by @Plagman he states that this will most likely not be fixed without the DE's help of tracking down what steam does wrong/ doesn't do.

If anyone makes a bug report at any DE's bugtracker, link it here so we can add ourselves to the CC lists/vote for the bug.

elementary OS/Pantheon: https://bugs.launchpad.net/elementaryos
MATE (not sure which repo would be appropriate): https://github.com/mate-desktop
Cinnamon: https://github.com/linuxmint/Cinnamon/issues
KDE: https://bugs.kde.org/
Xfce: https://bugzilla.xfce.org/
GNOME: https://bugzilla.gnome.org/

https://bugzilla.xfce.org/show_bug.cgi?id=13841

Not sure if more information is needed there

mikerm19 commented Oct 19, 2017

Here's a thread recently started by someone else over in Mint land:

https://bugs.launchpad.net/linuxmint/+bug/1713601

Is anyone on the x.org mailing list? Other than the Kernel that's the only thing I can fathom is the same through multiple distro's and DE's.

renjithis commented Oct 20, 2017

Has anyone opened issue with Cinnamon? Should I do it?

Edit :
This seems to be their bug tracking https://github.com/linuxmint/Cinnamon/issues

the latest release note say "Fixed an issue that could result in Steam blocking system shutdown or user logout."
has anyone tried it yet?

Owner

kisak-valve commented Oct 27, 2017

Hello @property-live, that looks to be a Windows-only patch note (https://steamcommunity.com/groups/SteamClientBeta#announcements/detail/2971673654055775014) and did not change the client behavior on the test box I checked against.

MartinX3 commented Oct 29, 2017

I think, it helped on Ubuntu Mate x64 17.10.

Edit:
I'm not sure.
Sometimes the fix doesn't work.

Edit0:
Standby works now. But Shutdown doesn't...

Scrumplex commented Oct 31, 2017

How can this issue persist for more than 3 years? Valve... Pls fix

mikerm19 commented Nov 9, 2017

Unfortunately we are just in the super minority, so we are pretty low priority. I've been fastidious about keeping steam and mint completely up to date and it still cancels the shutdown. Hopefully someday someone will fix for us.

Managor commented Nov 26, 2017

Still an issue with xfce 4.12 on Ubuntu 17.10

Managor commented Dec 7, 2017

As far as I know Ubuntu gnome 17.04 and Ubuntu mate aren't affected by this. They have a 30 second shutdown period where you can choose to shut to the computer down now or let it wait for 30 seconds.

AdamSzopa commented Dec 10, 2017

I might as well add a note to that, with KDE on Arch, I see a notification from Plasma Workspace that says Logout canceled by '' when the steam window visibly closes, but steam itself finishes closing a second or two later which is seen by the steam tray icon leaving the tray.

Yes! This is exactly what's happening on my system (kde neon) and it's driving me nuts! Please @kisak-valve, is there any way I can help provide more info? I'm seriously considering preventing steam from auto-starting, it is getting so infuriating.

EDIT: There is a KDE bug here: https://bugs.kde.org/show_bug.cgi?id=387587

TecXero commented Dec 13, 2017

Still happening with xfce as well.

I am experiencing the same issuen as reported earlier in this threaed:

[...]when I go to shut down while Steam is running, it forces Steam to quit, but then doesn't actually shut down; it just stays on a fully-functional desktop with everything except Steam still running. I have to pull up the shutdown option a second time. When I manually exit Steam first, and then hit the shutdown button, it shuts down properly the first time.

Arch XFCE.

DevPre commented Dec 31, 2017

Very annoying behavior. Same result on Fedora 27 KDE.

Occurs on Ubuntu MATE 16.04 LTS (64-bit).

Is one of us going to have to land a job at Valve to fix this? I'm going for a CS masters this fall, I think they recruit from Digipen, I could see about fixing the problem in two years.

3vi1 commented Jan 3, 2018

Also still occurs on Ubuntu 18.04 (bionic beaver) development branch when using latest KDE plasma desktop packages from Ubuntu's devel repos.

For the most part, they asked those issues to be opened against each Distro/DE to get help from their respective devs in identifying the cause for the issue.

That seems like it's pushing the problem on the DE devs, when Steam is the only app exhibiting this problem. The Steam devs should be the ones talking to the DE devs if anything, as we can't ask the right questions or provide the right info without access to the client source.

outfrost commented Jan 3, 2018

Is one of us going to have to land a job at Valve to fix this? I'm going for a CS masters this fall, I think they recruit from Digipen, I could see about fixing the problem in two years.

The funny thing is, had they open-sourced the client, they'd have 3 pull requests with this nonsense fixed like a year ago.

That seems like it's pushing the problem on the DE devs, when Steam is the only app exhibiting this problem.

All of a sudden introduce a previously nonexistent new bug to your closed-source software and start blaming all the other open-source projects for this bug. Now that is something worth discussing about in Software Engineering courses in CS programs.

@outfrost I understand why they don't want to open source this would let competitors catch up, but then again might drop development costs. At least open source a small module for starting up and shutting down Steam.

gvlfm78 commented Jan 3, 2018

what competitors?

Owner

kisak-valve commented Jan 3, 2018

Instead of chaining second hand information, please refer back to #3301 (comment). There is no attribution of blame, just a request for actionable help in resolving this issue instead of general confirmations that the issue exists.

Photon89 commented Jan 3, 2018

@kisak-valve: Could you (or somebody else) be more specific on which DEs allow proper shutdown? Reading through the comments, I have the impression that each single DE in existence (besides of maybe GNOME) is hit by this bug.

@gvlfm78 cd projekt red.

I suspect @paulovilli is right about the culprit being that "Shutting down Steam..." window. KDE probably has some code that checks if any new windows are spawned in the split second after getting a shutdown command, in case a program wants to say "This file has not been saved. Save now?" And that's kind of what that window is for. If the sync and logout take more than a few seconds, it changes to a dialog asking if the user wants to keep trying or quit anyway.

So we're kind of at an impasse. You don't want Steam to just get rid of that window, because it might lose or even corrupt save data if syncing takes too long. And you don't want KDE to ignore it for the same reason. It could be tweaked so it pauses the shutdown until any newly-spawned windows have been closed, and then resumes, but that would mess things up if users click "Don't Quit" on one of those unsaved-files dialogs.

The problem is, there's no standard for apps to signal directly that they want to delay a shutdown, and then later say to either resume or cancel it. And even if someone were to create one, any older apps that aren't compliant will be stuck losing unsaved data.

MarcosCC commented Jan 3, 2018

@kisak-valve can't you reproduce the bug? I mean it clearly happens often enough, should be easy to reproduce and since you have the code, then follow it up to see what's going on.

In my case: install a fresh Debian + KDE, install Steam, open Steam, shutdown computer -> won't shut down. Only ever happens with Steam open.

@stevethepocket there is actually a standard for delaying a shutdown and even a sleep. It is available in systemd 183 (available since 25 May 2012) and later and is called inhibit.
https://www.freedesktop.org/wiki/Software/systemd/inhibit/

SEAPUNK commented Jan 3, 2018

Completely agreed @MarcosCC.

@kisak-valve A lot of us Linux users are likely casual Linux users, and don't know all the various fancy internals of how the shutdown gets prevented. And considering how only Steam is the culprit here, this is likely an issue with how Steam handles shutdown. We don't have the ability to debug your Steam client, so we'd have no idea as to what Steam is doing wrong regarding its shutdown process.

We only have the very simple and consistent repro steps, surely just being able to consistently reproduce this problem on your machine with our steps would be enough to help debug and fix the issue.

mikerm19 commented Jan 3, 2018

I just want to put in a quick note, it's not just KDE that has this problem, at least Cinnamon, a fork of GNOME also has this problem, on both of my "daily driver" installs.

Everyone else who hasn't commented yet, I know it sucks to have to register an account to say "me too", but please do (it only takes a minute). We need as much feedback here as we can get. We are in a minority of Valve's problems here, so the bigger the voice, the better.

SEAPUNK commented Jan 3, 2018

  • Cinnamon
  • KDE
  • XFCE
  • MATE
  • GNOME

that's 4 out of 5 listed DEs doing it now

@SEAPUNK you forgot Unity

Just to corroborate @SEAPUNK, I've tested all major DEs in a vanilla Ubuntu 17.10 virtual machine to see if the bug reproduces. To be clear, this is the procedure:

-Install Steam
-Log into Steam account
-Try to reboot computer from application menu
-Reboot is cancelled. Steam window pops up for a brief moment.
-Try to reboot a second time, reboot completes.

GNOME: Inconsistent. It seemed to stop the shutdown the first time but after repeated tries, Steam shutdown normally and the VM rebooted.
Xfce: Yes.
MATE: Yes.
KDE: Yes, with "Logout cancelled by ''" error.
Cinnamon (tested in Mint 18.3): Yes.
Unity: Unable to test (it hates me) but assuming similar behavior to GNOME.

Is it possible to have Steam run in a mode where it launches a game and then exits after the game has finished? It already gives desktop launchers to run specific titles, and it seems to know how long I've been playing, so it must feel like it can tell when the game has been exited. This wouldn't be ideal for switching games because of the overhead, but it would be a good enough workaround for me. I would just have to remember that if I went to the steam store or wanted to chat that I'd need to close Steam manually afterwards.

At this point, it sounds like it might be more realistic to have a distribution/DE workaround that consists in sending a SIGTERM to steam (if running) prior to closing the DE session...

outfrost commented Jan 4, 2018

Well what if Steam Cloud sync ran as a service? It wouldn't have to cancel nor inhibit desktop session shutdown in order to complete the sync, and init systems (such as systemd) have good support for processes that need a few extra seconds before terminating.

It seems my Debian sid 64-bit can shutdown properly after switched from xfce4 to LxQt 0.12

VKNikov commented Jan 8, 2018

I can confirm experiencing this issue on Manjaro with KDE Plasman 5.11.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment