"unable to lock lock was blocked by an application"

Discussions related to using VirtualBox on Linux hosts.
Locked
MarcosCav
Posts: 1
Joined: 13. Apr 2019, 15:32

"unable to lock lock was blocked by an application"

Post by MarcosCav »

Hi,

First: This is my first post being a VB user for a decade now. This is because I always find a solution to my problems thanks to you guys! I've been searching for this issue on different forums but could not find anything related to Ubuntu. My apologies if this is related to a known issue or a solved issue in some other post I couldn't find.

My stack: Running Ubuntu 18.04 with AMD FX6300 @ 16GB RAM with VB 6.0.4 r128413 (Qt5.9.5) and Windows 10 Guest with 8GB RAM (any config of ram and CPU in the Win10Guest trigger the error anyhow)

The Issue: Running both Ubuntu (host) and Win10(guest) at the same time (as I usually do) I find that Ubuntu is never able to block after a few minutes (as is intended) if the Win10 VM is ON and "selected" as "the last application" in use. Message in Ubuntu's notification bar reads "Unable to lock: lock was blocked by an application"

My "tests": I find that if this "last application" in use before lock is another ubuntu app (whichever: for the sake of example lets say "folders") and the Win10 VM is ON Ubuntu WILL lock as intended.

So I tried:
  1. Check Win10 is always in power save (just screens off) before Ubuntu's lock kicks in. Win10 power save is set to 5 min, Ubuntu's is set to 8min.
  2. I didn't set Win10 to sleep mode because I simply don't want to wait for wakeup. Just to lock my PC while I'm not using it (not a super strange thing to ask, right?)
  3. I tried to set Win10 to lock itself after 5 min of "no use" but couldn't. The thing is I also don't want to enter my Ubuntu's Password and Windows PIN eeeeevery time it locks. So that wouldn't be a solution either.
I think the problem is Ubuntu interprets Win10 VM is "in use" even if it is in power saving mode (screens off) and when lock timing kick in (8 min in my case) the lock process conflict with the "app in use" process and notification pop in.

Any ideas on how to solve this?
Thanks
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: "unable to lock lock was blocked by an application"

Post by socratis »

Can you give 6.0.6 a test? It includes a fix for power savings, not sure if it applies in your case.

BTW, I couldn't reproduce this with an OSX host, I'm going to try and see what's going on with my Mint19 host...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
tedchina
Posts: 1
Joined: 6. Jan 2020, 12:40

Re: "unable to lock lock was blocked by an application"

Post by tedchina »

My laptop has a same behavior. When the VirtualBox VM window (guest Windows) is the current focus, the host Ubuntu will not be able to be auto locked after time expiration.
If the VirtualBox VM window is not the current focus, even if the current focus is the about window of VirtualBox, the host Ubuntu's auto-lock won't be blocked (i.e. will enter auto lock after time expiration).

The configurtation:
HW: AMD Ryzen 3500U, 16G RAM
Host Ubuntu: 18.04.3
VirtualBox: 6.1
Guest Windows: Windows 10 Enterprise 1909
Shmu26
Posts: 99
Joined: 21. Dec 2017, 15:32

Re: "unable to lock lock was blocked by an application"

Post by Shmu26 »

I can confirm this issue.
However, it is a bug in the Gnome desktop environment, if an application is maximized or running full-screen, it often blocks the screen locking. It is not specific to Ubuntu, but it is specific to Gnome. The bug has been reported but not fixed.
henning724
Posts: 1
Joined: 18. Nov 2021, 10:07

Re: "unable to lock lock was blocked by an application"

Post by henning724 »

Shmu26 wrote:I can confirm this issue.
However, it is a bug in the Gnome desktop environment, if an application is maximized or running full-screen, it often blocks the screen locking. It is not specific to Ubuntu, but it is specific to Gnome. The bug has been reported but not fixed.
I don't run virtualbox maximized or full-screen and I have the same issue.
Shmu26
Posts: 99
Joined: 21. Dec 2017, 15:32

Re: "unable to lock lock was blocked by an application"

Post by Shmu26 »

If you run Gnome in a Wayland session, screenlocking works as expected
Locked