Bug 25251 - Upgrading via mgaapplet + screenlocker kicks in -> normal level user locked out
Summary: Upgrading via mgaapplet + screenlocker kicks in -> normal level user locked out
Status: REOPENED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High major
Target Milestone: Mageia 10
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard: MGA8TOO, MGA9TOO
Keywords: IN_ERRATA8, IN_ERRATA9, IN_RELEASENOTES8, IN_RELEASENOTES9
Depends on:
Blocks:
 
Reported: 2019-08-09 23:41 CEST by Morgan Leijström
Modified: 2023-12-13 15:49 CET (History)
4 users (show)

See Also:
Source RPM: mgaonline-3.31-1.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Morgan Leijström 2019-08-09 23:41:22 CEST
From https://bugs.mageia.org/show_bug.cgi?id=25216#c6 :


Description of problem:  

Main problem: If user leaves after starting updating, and comes back after screen saver kicks in, it is impossible to log in the normal way.  There is a message telling how to log in, but i think most users are not comfortable, see my experience below.



Additionally, Plasma logout function in menu fails until reboot.  We should tell the user how to shut down/reboot.  Or even better if we could patch the menu to work; the CLI shutdown and reboot commands seem to work.

Is there some way to tell the user that reboot is needed for continued reliable operation (or was there, an i forgot i had seen it?)  But if user leaves for coffe while updating, and screen saver kicks in.


Well this could be split in two bugs but they are related.




My recent experience:

Updated, had to go, came back much later, screen saver had kicked in and I and was greeted with a black screen and white text that said unlocking had failed and i should run "loginctl unlock-session c2" from another terminal.

I Ctrl-Alt-F1 to that terminal and saw it repeatedly output a screen full of NVIDIA messages amongst them "API mismatch".  It is not very user friendly to switch to tty and input that command being interrupted by scrolling messages...



Because users may loose unsaved work when they fail to re-login the bug severity may be "Critical" but on the other hand it have been like this for long...  so i set it major.
Comment 1 Lewis Smith 2019-08-10 21:57:46 CEST
Morgan
Thank you for the reference to
 https://bugs.mageia.org/show_bug.cgi?id=25216#c6
which duplicates this bug (but not marking it as such) for Mageia 6; for which an update was pushed today. That was nVidia specific.
Can you say what video hardware & driver you are using in Mageia 7?

Since tmb dealt with the other bug, I am assigning this one to him initially for his wisdom. Please re-assign it as you see fit.

I wonder whether bug 25008 is related.

Assignee: bugsquad => tmb

Comment 2 Morgan Leijström 2019-08-10 22:38:40 CEST
As i wrote this bug is for this specific issue, which i last saw when testing bug 25216, which is pushed as you say. Which is why i issued this bug.

Ops i set wrong release! And yes i forgot to state clearly: using nvidia-current

Version: 7 => 6

Comment 3 Morgan Leijström 2019-08-10 22:44:29 CEST
I will probably see later when i upgrade if valid for mga7 too, but i guess so.
Comment 4 Aurelien Oudelet 2020-08-23 15:27:28 CEST Comment hidden (obsolete)

Resolution: (none) => OLD
CC: (none) => ouaurelien
Status: NEW => RESOLVED

Comment 5 Morgan Leijström 2020-08-28 17:26:14 CEST
I believe nothing have changed.
As it is major i think it should be tested before closing.

Status: RESOLVED => REOPENED
Resolution: OLD => (none)
Version: 6 => 7

Comment 6 Aurelien Oudelet 2020-08-28 18:29:46 CEST
https://askubuntu.com/questions/972778/locked-out-of-kde-while-upgrading

Does the behavior was like above link?
Comment 7 Morgan Leijström 2020-08-30 12:13:53 CEST
I think i did not see that message, but instead the instruction how to do it (which is far better :) ), sea last half of comment 0.

As per my description "screen full of NVIDIA messages amongst them "API mismatch".  I believe system was unable to show a GUI at all.

I believe kernel and drivers maintainers should decide if to close this bug as old or keep open.  - If it is possible it can happen again.

Maybe make it block screen savers during update - always, or when certain parts are updated.

Assignee: tmb => kernel

Comment 8 Aurelien Oudelet 2021-01-18 20:01:01 CET
Yeah you're right after all.

Doing the following QA:

On a M7 Plasma, updated, default settings.
$ mgaapplet --testing

Screen locked 5 minutes later: TTY1 locked.
A message asks user to log on TTY2 and issue:
# loginctl unlock-session c2
This never does not function well, nvidia card.

Upgrade seems to run in background but lambda user will not get any clue on what's going on.

So, mgaapplet-upgrade-helper should be called with systemd-inhibitor: a command like this:
$ systemd-inhibitor --what=idle:sleep:shutdown --mode=block mgaapplet-upgrade-helper

I wonder if this must be the same to all gurpmi launching.

Reassigning.
Raising release blocker.

Assignee: kernel => mageiatools
Summary: Update + user away -> normal level user locked out -> may loose work => Upgrading M7 to M8 via mgaapplet + user away -> normal level user locked out
Target Milestone: --- => Mageia 8
CC: (none) => mageia, thierry.vignaud
Priority: Normal => release_blocker

Aurelien Oudelet 2021-01-18 20:06:36 CET

Source RPM: dkms-nvidia-current => mgaonline-3.31-1.mga8.src.rpm
Version: 7 => Cauldron
Whiteboard: (none) => MGA7TOO

Comment 9 Pascal Terjan 2021-01-18 20:08:23 CET
Inhibiting lock seems like a very bad idea security wise.

Most people don't stay in front of their computer while upgrading a lot of packages, so it should get locked if it is configured to lock when users are away (like many companies requires).

Instead whatever breaks should be fixed.

If distro upgrades can not be done in plasma, then we should explicitly log the user out and do the upgrade through some background service.
Comment 10 Aurelien Oudelet 2021-01-18 20:15:44 CET
(In reply to Pascal Terjan from comment #9)
> Inhibiting lock seems like a very bad idea security wise.
> 
> Most people don't stay in front of their computer while upgrading a lot of
> packages, so it should get locked if it is configured to lock when users are
> away (like many companies requires).
> 
> Instead whatever breaks should be fixed.
> 
> If distro upgrades can not be done in plasma, then we should explicitly log
> the user out and do the upgrade through some background service.

Yeah, security related this can't be done.
But, all new Plasma instance, app,... can't load due to a new glibc, new libraries,...

So, this should really be user loggued out and with a GUI.
Or, use DNF system-upgrade ?
Comment 11 Frédéric "LpSolit" Buclin 2021-01-20 13:10:48 CET
(In reply to Aurelien Oudelet from comment #10)
> But, all new Plasma instance, app,... can't load due to a new glibc, new
> libraries,...
> 
> So, this should really be user loggued out and with a GUI.
> Or, use DNF system-upgrade ?


Or warn the user that he must save his work before starting the upgrade because the machine will reboot automatically.
Comment 12 Aurelien Oudelet 2021-01-20 13:20:15 CET
No, the machine does not reboot automatically if you use mgaapplet to upgrade.

If you "dnf system-upgrade" it is the case as it does upgrade right after a reboot and reboot automatically.
Comment 13 Frédéric "LpSolit" Buclin 2021-01-20 13:38:54 CET
(In reply to Aurelien Oudelet from comment #12)
> No, the machine does not reboot automatically if you use mgaapplet to
> upgrade.


Sorry for being unclear: my previous comment included an implicit reboot (I know it doesn't do it for now, but this should be implemented if some key packages are being updated).
Comment 14 Dave Hodgins 2021-01-28 00:07:21 CET
Status?

CC: (none) => davidwhodgins

Comment 15 Morgan Leijström 2021-02-12 09:40:54 CET
This is since some time in release notes in the form of instructions how to upgrade.  (The DNF immediate reboot too, BTW, #11 )

Now I added a note and link to instructions, also citing this bug, at
https://wiki.mageia.org/en/Mageia_8_Errata#Upgrade_issues

Keywords: (none) => IN_ERRATA8, IN_RELEASENOTES8

Comment 16 Thomas Backlund 2021-02-12 13:34:23 CET
considering this is not a new issue, 
and would need a lot of integration and testing ...

there is nothing that can or will be fixed for Mga8 within a reasonable time frame...

so not a blocker for mga8 release

Priority: release_blocker => High
Target Milestone: Mageia 8 => Mageia 9

Comment 17 Morgan Leijström 2021-04-12 18:54:06 CEST
On dev and qa list today, because of several users are being hit:

https://ml.mageia.org/l/arc/qa-discuss/2021-04/msg00154.html
https://ml.mageia.org/l/arc/dev/2021-04/msg00083.html

Andrews Farm added that it have in the past also hit install from Live Plasma, so we should also check if Live installer, the one launched from desktop, is affected.
Comment 18 Morgan Leijström 2023-10-20 17:26:12 CEST
We have this noted in
https://wiki.mageia.org/en/Mageia_9_Release_Notes#Online-Upgrade
and we note and point it from errata.

One user that hit this upgrading to 9:
https://forums.mageia.org/en/viewtopic.php?t=15112

Developers: Could systemd-inhibit be used by the updater, urpmi in general, to hinder screen locking?
https://www.freedesktop.org/software/systemd/man/latest/systemd-inhibit.html

Target Milestone: Mageia 9 => Mageia 10
Keywords: (none) => IN_ERRATA9, IN_RELEASENOTES9
Whiteboard: MGA7TOO => MGA8TOO, MGA9TOO

Comment 19 Morgan Leijström 2023-12-13 15:49:45 CET
Somehow the line got missing in 9 rel notes, now reinstated.

Summary: Upgrading M7 to M8 via mgaapplet + user away -> normal level user locked out => Upgrading via mgaapplet + screenlocker kicks in -> normal level user locked out


Note You need to log in before you can comment on or make changes to this bug.