After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764723 - Mention Lock = Suspend on tablets
Mention Lock = Suspend on tablets
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Power
git master
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-07 13:00 UTC by Benjamin Kreuter
Modified: 2021-06-09 16:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benjamin Kreuter 2016-04-07 13:00:37 UTC
On "convertible" machines that can switch between laptop and tablet mode, it is wrong to suspend the system when the screen is locked -- this behavior only makes sense for "true" tablets i.e. machines that are always tablets.  When the machine is used as a laptop the suspend-when-locked behavior can be very annoying and is confusing to users [1].  Unfortunately, none of the machine chassis types properly classify such machines; they are not "laptops," and manually setting the chassis type causes other misbehavior (e.g. switching from tablet to laptop mode can trigger a suspend).

It seems like this behavior should be configurable, given that it can interact poorly with some systems and that the workarounds introduce various problems of their own.

[1] https://ask.fedoraproject.org/en/question/76767/unwanted-suspend-when-locking-screen-using-gnome/
Comment 1 jerome.revillard 2016-06-20 15:08:07 UTC
I totally agree. I'm facing the same issue and would like to be able to configure it.
Comment 2 Bastien Nocera 2016-08-08 18:19:47 UTC
The problem is that systemd wrongly tags your device as a tablet, it should be tagged as a laptop:
https://github.com/systemd/systemd/issues/3930

You can override the behaviour by forcing the chassis type in /etc/machine-info (see the machine-info man page for possible values).

We should however add a label mentioning this behaviour in the Power panel.

Making this configurable isn't on the cards, as /etc/machine-info already provides a way to override the default behaviour.

If your machine isn't a convertible laptop like the Yoga, please file a separate bug, and explain in details the use case behind you wanting to disable this behaviour.
Comment 3 Benjamin Kreuter 2016-08-08 19:39:18 UTC
I am aware of that workaround but the results are suboptimal: as I said when I filed this bug, forcing the chassis type to be "laptop" causes the system to suspend when switching from tablet to laptop form.  That annoying behavior is better than suspending whenever I locked the screen but it is still annoying, wrong, unexpected, and there is no obvious way to disable it without also disabling suspend-on-lid-closed.

Again, to be clear:  /etc/machine-info does not provide a way to get the correct behavior here.  There are NO chassis types that properly capture the convertible form factor.

The problem is ONE SPECIFIC BEHAVIOR and there should be a way to disable that specific behavior.

I am changing the title of the bug back because "mentioning" the behavior in a label is not a solution.  This should be configurable, at least via dconf-editor if not in the power panel.
Comment 4 Bastien Nocera 2016-08-09 08:19:51 UTC
(In reply to Benjamin Kreuter from comment #3)
> I am aware of that workaround but the results are suboptimal: as I said when
> I filed this bug, forcing the chassis type to be "laptop" causes the system
> to suspend when switching from tablet to laptop form.

This probably happens because the laptop is doing something broken, like sending lid close events when switching modes. You need to get that problem fixed, not try to work around it.

I really don't see how choosing the tablet chassis type can change that behaviour, as when in tablet mode, we *still* take care of the lid if there is one.

>  That annoying
> behavior is better than suspending whenever I locked the screen but it is
> still annoying, wrong, unexpected,

"Citation needed". What do you expect me to do with this sort of information? It might be infuriating, but you're not explaining anything to me.

> and there is no obvious way to disable it
> without also disabling suspend-on-lid-closed.

Which is caused by a problem in the firmware, hardware or the kernel. Focus on that.

> Again, to be clear:  /etc/machine-info does not provide a way to get the
> correct behavior here.  There are NO chassis types that properly capture the
> convertible form factor.

Laptop's pretty close actually. And it doesn't matter. We have 2 types of behaviour, so we only need two types.

> The problem is ONE SPECIFIC BEHAVIOR and there should be a way to disable
> that specific behavior.
> 
> I am changing the title of the bug back because "mentioning" the behavior in
> a label is not a solution.  This should be configurable, at least via
> dconf-editor if not in the power panel.

No. And please don't do that, unless you want me to get pissy. The problems that happen with the default non-tablet chassis type on your machine are unrelated to suspending on lock.
Comment 5 Jani Nikula 2017-02-24 13:02:40 UTC
I think the primary bug in gnome settings here is that it clearly says, "Automatic suspend: Off", but promptly suspends on screen lock/blank anyway. Automatic suspend in that case seems wrong regardless of the chassis type. You shouldn't display that kind of text when you effectively can't switch off the automatic suspend in the settings.

There is zero discoverability in figuring out why the suspend happens.

I like to think I know more about this stuff than most, and I ended up wasting days trying to debug systemd, monitoring dbus, checking dconf, perusing logs, googling, and generally desperately banging my head against the wall trying to figure out why the machine suspends. And in the end I found the clue by accident in gnome-settings-daemon NEWS, "When disabling the backlight, also suspend on tablets".

And, of course, this is a laptop, one that you could call "2-in-1" or "convertible", but labeling it as a tablet is ridiculous (http://shop.lenovo.com/us/en/laptops/yoga/900-series/yoga-910/). That's not *your* bug, obviously. But if there's no convertible category, it seems to me it should be possible to switch between tablet and laptop chassis runtime. That's of course not currently the case, the info doesn't propagate from hostnamectl. Perhaps not your bug either.

But I do think you need to take into account the imperfect world beneath your component. With the number of convertibles around, mislabeling them is going to happen more than you'll think, and your average users are *never* going to figure out that they have the wrong chassis type or how to change it. They'll only be able to avoid unwanted suspend by disabling screen blanking completely. That's a pretty lousy user experience.

My preference would be that you could disable automatic suspend also on tablets. You could show an additional menu item next to "On Battery Power" and "Plugged in" when the chassis is tablet.

I understand that you don't want that, and you only intend to add a message, but then you also need to tell the users how they fix their chassis type for their laptop.
Comment 6 Jani Nikula 2017-02-24 14:22:12 UTC
Digging deeper, hostnamectl looks for chassis type in DMI and ACPI data, in this order [1]. In my case, the DMI actually reports "convertible", but hostnamectl disregards that, and falls back to ACPI, which reports "tablet".

Of DMI data, hostnamectl sources say, "We only list the really obvious cases here. The DMI data is unreliable enough, so let's not do any additional guesswork on top of that."

Of ACPI data, hostnamectl sources say, "We only list the really obvious cases here as the ACPI data is not really super reliable."

That's it, the chassis type is regarded as *unreliable* data. That is the real world you have to live in. You *must* be prepared for chassis being mislabeled.

Arguably it's a much worse user experience for a laptop to be regarded as a tablet, getting autosuspend on screen blanking, than the other way round. I'm pretty sure there are more convertible laptops than actual tablets running gnome out there.

Your assumptions are breaking the user experience for *all* laptops out there that report themselves as convertible in DMI data. I'm starting to think the smallest, easiest and most sensible fix here would be to revert the forced autosuspend for tablets altogether, backport that to stable releases, and rethink the approach.

[1] https://github.com/systemd/systemd/blob/master/src/hostname/hostnamed.c#L150
Comment 7 Jani Nikula 2017-02-27 09:32:43 UTC
(In reply to Bastien Nocera from comment #4)
> Laptop's pretty close actually. And it doesn't matter. We have 2 types of
> behaviour, so we only need two types.

This is conflating chassis type with behaviour. It's perfectly fine to want autosuspend on screen lock on laptops and not want it on tablets. Assuming the chassis type *is* correct, you should not have to lie about chassis type to change behaviour. That is not the intention of chassis type configuration. There are other consumers for chassis type information.

Filed bug 779300 about this.
Comment 8 Jani Nikula 2017-02-27 09:43:06 UTC
And while I still think it's patently wrong to rely solely on chassis type, and not provide a separate configuration, I submitted a patch to hostnamectl [1] to treat convertibles as laptops. It'll mitigate some of the problems on convertibles, but only where the DMI data actually correctly reports them as convertibles.

[1] http://marc.info/?i=1487948412-19888-1-git-send-email-jani.nikula@intel.com
Comment 9 Lennart Poettering 2017-02-27 17:46:50 UTC
BTW, if there's interest we could change hostnamed to report a new type "convertible" to cover Yoga-like devices. I mean, if the the current vocabulary is too coarse to accurately reflect the form factor of popular devices, then we should improve that.

Also, I figure we might want to start a hwdb database containing form factor information to cover for cases where the data in ACPI/DMI is crap or contradictory.
Comment 10 Lennart Poettering 2017-02-27 17:49:48 UTC
btw, there's now a proper github issue about this, please let's follow-up on the discussion of the precise naming of the value there.

https://github.com/systemd/systemd/pull/5475
Comment 11 André Klapper 2021-06-09 16:29:39 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new bug report at
  https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/

Thank you for your understanding and your help.