copy/paste failure from host to guest with VirtualBox 6.1.16
-
- Posts: 77
- Joined: 22. Jul 2018, 03:29
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux Mint 20.3 Mate
Re: copy/paste failure from host to guest with VirtualBox 6.1.16
May I join the fun?
I am also experiencing such a problem: viewtopic.php?f=6&t=103009&p=500516#p500516. There are slightly different symptoms, but my problem is essentially the same.
I am also experiencing such a problem: viewtopic.php?f=6&t=103009&p=500516#p500516. There are slightly different symptoms, but my problem is essentially the same.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: copy/paste failure from host to guest with VirtualBox 6.1.16
abc/Mark, I merged your standalone topic to this one because the problem is the same, apparently.
Reading back through the topic above, you may find that fth0 offered a possible cause and troubleshooting suggestions. Did you try them?
Reading back through the topic above, you may find that fth0 offered a possible cause and troubleshooting suggestions. Did you try them?
-
- Posts: 77
- Joined: 22. Jul 2018, 03:29
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux Mint 20.3 Mate
Paste intermittent - Launch on startup, only
Was that really appropriate? I'm running the current VBox, not a very stale one. How much attention will I get given that the topic title indicates v.6.1.16?scottgus1 wrote:abc/Mark, I merged your standalone topic to this one because the problem is the same, apparently.
Reading back through the topic above, you may find that fth0 offered a possible cause and troubleshooting suggestions. Did you try them?
Last edited by abcdefgh on 1. Jun 2021, 00:31, edited 1 time in total.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
-
- Posts: 77
- Joined: 22. Jul 2018, 03:29
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux Mint 20.3 Mate
Paste intermittent - Launch on startup, only
Hello fth0, thanks.fth0 wrote:If you're interested in investigating further, you can create a special log file by executing the following commands in the Linux guest:
Then post the VBox.log file and the /tmp/clipboard.log file, together with a description of your clipboard actions.Code: Select all
# Clipboard logging (X11 guest) sudo pkill -fx "/usr/bin/VBoxClient --clipboard" VBOX_RELEASE_LOG_DEST=file=/tmp/clipboard.log VBOX_RELEASE_LOG=+all.e.l.f VBoxClient -d --clipboard
My topic was merged with this one, so I'm going to respond if I can figure out how. This is uncharted territory for me.
When I submitted your suggested commands, I got this:
Code: Select all
mark@mark-VirtualBox ~ $ VBOX_RELEASE_LOG_DEST=file=/tmp/clipboard.log VBOX_RELEASE_LOG=+all.e.l.f VBoxClient -d --clipboard
vboxClientSetSignalHandlers: ENTER
vboxClientSetSignalHandlers: LEAVE
Shared Clipboard: Starting X11 event thread ...
Shared Clipboard: X11 event thread started
Shared Clipboard: Guest features: 0x1 - Host features: 0x1
Worker loop running
Code: Select all
Shared Clipboard: 10 formats were found
Shared Clipboard: Found target 'TIMESTAMP'
Shared Clipboard: Found target 'TARGETS'
Shared Clipboard: Found target 'MULTIPLE'
Shared Clipboard: Found target 'SAVE_TARGETS'
Shared Clipboard: Found target 'UTF8_STRING'
Shared Clipboard: Found target 'COMPOUND_TEXT'
Shared Clipboard: Found target 'TEXT'
Shared Clipboard: Found target 'STRING'
Shared Clipboard: Found target 'text/plain;charset=utf-8'
Shared Clipboard: Found target 'text/plain'
Shared Clipboard: Reporting format 'UTF8_STRING'
Shared Clipboard: Reporting format 'TEXT'
Shared Clipboard: Reporting format 'STRING'
Shared Clipboard: Reporting format 'text/plain;charset=utf-8'
Shared Clipboard: Reporting format 'text/plain'
Shared Clipboard: X11 reported available VBox formats: 0x1
Code: Select all
^CTerminated with signal 2
Terminating ...
Segmentation fault
Code: Select all
mark@mark-VirtualBox ~ $ mark@mark-VirtualBox ~ $ VBOX_RELEASE_LOG_DEST=file=/tmp/clipboard.log VBOX_RELEASE_LOG=+all.e.l.f VBoxClient -d --clipboard
mark@mark-VirtualBox: command not found
mark@mark-VirtualBox ~ $ vboxClientSetSignalHandlers: ENTER
vboxClientSetSignalHandlers:: command not found
mark@mark-VirtualBox ~ $ vboxClientSetSignalHandlers: LEAVE
vboxClientSetSignalHandlers:: command not found
mark@mark-VirtualBox ~ $ Shared Clipboard: Starting X11 event thread ...
Shared: command not found
mark@mark-VirtualBox ~ $ Shared Clipboard: X11 event thread started
Shared: command not found
mark@mark-VirtualBox ~ $ Shared Clipboard: Guest features: 0x1 - Host features: 0x1
Shared: command not found
mark@mark-VirtualBox ~ $ Worker loop running
No command 'Worker' found, did you mean:
Command 'worker' from package 'worker' (universe)
Worker: command not found
mark@mark-VirtualBox ~ $
mark@mark-VirtualBox ~ $
mark@mark-VirtualBox ~ $
Here is /tmp/clipboard.log:
Code: Select all
Service: Shared Clipboard
vboxClientSetSignalHandlers: ENTER
vboxClientSetSignalHandlers: LEAVE
Shared Clipboard: Starting X11 event thread ...
Shared Clipboard: X11 event thread started
Shared Clipboard: Guest features: 0x1 - Host features: 0x1
Worker loop running
Shared Clipboard: 10 formats were found
Shared Clipboard: Found target 'TIMESTAMP'
Shared Clipboard: Found target 'TARGETS'
Shared Clipboard: Found target 'MULTIPLE'
Shared Clipboard: Found target 'SAVE_TARGETS'
Shared Clipboard: Found target 'UTF8_STRING'
Shared Clipboard: Found target 'COMPOUND_TEXT'
Shared Clipboard: Found target 'TEXT'
Shared Clipboard: Found target 'STRING'
Shared Clipboard: Found target 'text/plain;charset=utf-8'
Shared Clipboard: Found target 'text/plain'
Shared Clipboard: Reporting format 'UTF8_STRING'
Shared Clipboard: Reporting format 'TEXT'
Shared Clipboard: Reporting format 'STRING'
Shared Clipboard: Reporting format 'text/plain;charset=utf-8'
Shared Clipboard: Reporting format 'text/plain'
Shared Clipboard: X11 reported available VBox formats: 0x1
Terminated with signal 2
Terminating ...
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: copy/paste failure from host to guest with VirtualBox 6.1.16
Thanks for trying to help (us and yourself), but the clipboard logs alone do not tell enough to understand a problem.
Generally speaking, HaroldFinch started with systematic tests of their problem, and the clipboard logging I suggested was meant as additional info to gather during even more systematic tests. Most users don't realize that clipboard handling has a certain complexity. Let me elaborate:
Let's start with an easy setup: A single OS (e.g. Windows, Linux) on a PC usually has a clipboard C, where an app A copies data into, and other apps B paste data from. The OS (Windows, Linux) itself can only handle few types of data, therefore a cooperation between A and C is needed as long as data from A is in C. This key concept is usually called ownership. The clipboard handling in Windows and Linux is implemented differently (and there even exist different implementation strategies inside Linux). In consequence, some OS-agnostic apps (e.g. LibreOffice) implement their own additional clipboard, thereby creating a chain of clipboards, and this already complicates matters on this single OS PC.
It gets even more complex when we consider multiple PCs with possibly different OSs. We can combine two PCs using different methods, for example by virtualization (host + guest) or by remote access (e.g. RDP, VNC, TeamViewer). In both cases, we have at least 2 or 3 chained clipboards, and if we combine them, we may even have 3 to 5 chained clipboards. Now add some apps with their own clipboard, and be amazed when it works most of the time. And we didn't consider clipboard managers and cleaning tools yet ...
Regarding TextPad, the descriptions sound like there is a problem with the first copy operation, in regard to the interactions between TextPad (A), the Windows clipboard (C) and the VirtualBox host side (B). But I'm not sure ...
Generally speaking, HaroldFinch started with systematic tests of their problem, and the clipboard logging I suggested was meant as additional info to gather during even more systematic tests. Most users don't realize that clipboard handling has a certain complexity. Let me elaborate:
Let's start with an easy setup: A single OS (e.g. Windows, Linux) on a PC usually has a clipboard C, where an app A copies data into, and other apps B paste data from. The OS (Windows, Linux) itself can only handle few types of data, therefore a cooperation between A and C is needed as long as data from A is in C. This key concept is usually called ownership. The clipboard handling in Windows and Linux is implemented differently (and there even exist different implementation strategies inside Linux). In consequence, some OS-agnostic apps (e.g. LibreOffice) implement their own additional clipboard, thereby creating a chain of clipboards, and this already complicates matters on this single OS PC.
It gets even more complex when we consider multiple PCs with possibly different OSs. We can combine two PCs using different methods, for example by virtualization (host + guest) or by remote access (e.g. RDP, VNC, TeamViewer). In both cases, we have at least 2 or 3 chained clipboards, and if we combine them, we may even have 3 to 5 chained clipboards. Now add some apps with their own clipboard, and be amazed when it works most of the time. And we didn't consider clipboard managers and cleaning tools yet ...
Regarding TextPad, the descriptions sound like there is a problem with the first copy operation, in regard to the interactions between TextPad (A), the Windows clipboard (C) and the VirtualBox host side (B). But I'm not sure ...
-
- Posts: 77
- Joined: 22. Jul 2018, 03:29
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux Mint 20.3 Mate
Paste intermittent - Launch on startup, only
Thanks, fth0.
For me, the problem is not the first paste from TextPad solely. It's the first paste after I launch the VM via Windows Task Scheduler upon Windows user login [note]. If I launch the VM manually after Windows user login, all seems to go well. That leads me to guess that the Guest Additions ......
Wait a minute. Did I install the Guest Additions?.....
(a short time later...)
I just installed the Guest Additions. Did I do that already when I updated to 6.1.22? I don't remember. I probably did because for the last couple of years, the VM nag-notifies if you forget.
I will have to reboot the VM now. I'll be right back with the results.
[note] The reason I'm trying to launch the VM on Windows user login is that putting the VM launch in any of the various 'Start Menu\Programs\Startup\' don't work.
For me, the problem is not the first paste from TextPad solely. It's the first paste after I launch the VM via Windows Task Scheduler upon Windows user login [note]. If I launch the VM manually after Windows user login, all seems to go well. That leads me to guess that the Guest Additions ......
Wait a minute. Did I install the Guest Additions?.....
(a short time later...)
I just installed the Guest Additions. Did I do that already when I updated to 6.1.22? I don't remember. I probably did because for the last couple of years, the VM nag-notifies if you forget.
I will have to reboot the VM now. I'll be right back with the results.
[note] The reason I'm trying to launch the VM on Windows user login is that putting the VM launch in any of the various 'Start Menu\Programs\Startup\' don't work.
Last edited by abcdefgh on 2. Jun 2021, 09:18, edited 1 time in total.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
-
- Posts: 77
- Joined: 22. Jul 2018, 03:29
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux Mint 20.3 Mate
Paste intermittent - Launch on startup, only
Okay, I've run a bunch of tests...
Windows boot, login, copy text from TextPad to Notepad. Success.
Windows boot, login, copy text from TextPad to the Linux Mint VM. Failure.
Windows boot, login, copy text from Notepad to the VM. Success.
Windows boot, login, copy text from the VM to TextPad. Success. Then copy text from TextPad to the VM. Success.
Windows boot, login, close the VM. Relaunch the VM. Copy always works in either direction from anything to anything.
Copying is always plain text.
The problem is obviously stateful. Oh, wait, there's one more test I didn't run: Windows boot, login, copy text from the VM (Thunderbird) to the VM (xed). I'll be right back...
Windows boot, login, copy text from TextPad to Notepad. Success.
Windows boot, login, copy text from TextPad to the Linux Mint VM. Failure.
Windows boot, login, copy text from Notepad to the VM. Success.
Windows boot, login, copy text from the VM to TextPad. Success. Then copy text from TextPad to the VM. Success.
Windows boot, login, close the VM. Relaunch the VM. Copy always works in either direction from anything to anything.
Copying is always plain text.
The problem is obviously stateful. Oh, wait, there's one more test I didn't run: Windows boot, login, copy text from the VM (Thunderbird) to the VM (xed). I'll be right back...
Last edited by abcdefgh on 2. Jun 2021, 09:25, edited 1 time in total.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
-
- Posts: 77
- Joined: 22. Jul 2018, 03:29
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux Mint 20.3 Mate
Paste intermittent - Launch on startup, only
Windows boot, login, copy text from the VM (Thunderbird) to the VM (xed). Success.
So. I appears that VBox Guest Additions is stateful and is not pasting the flavor of clipboard formatted textual content from TextPad in Windows Host to Linux Mint Guest ...
Oh, wait, this is interesting: I just thought of another test and I ran it and got a surprising result.
Windows boot, login, open my web browser (Pale Moon), and begin typing into this reply, then attempt to copy from TextPad to the VM (xed). Success!
So, it may not be a paste buffer issue at all. It may be something more general about text handling within the VM (or within LInux Mint).
Any suggestions about how to proceed from here?
So. I appears that VBox Guest Additions is stateful and is not pasting the flavor of clipboard formatted textual content from TextPad in Windows Host to Linux Mint Guest ...
Oh, wait, this is interesting: I just thought of another test and I ran it and got a surprising result.
Windows boot, login, open my web browser (Pale Moon), and begin typing into this reply, then attempt to copy from TextPad to the VM (xed). Success!
So, it may not be a paste buffer issue at all. It may be something more general about text handling within the VM (or within LInux Mint).
Any suggestions about how to proceed from here?
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: copy/paste failure from host to guest with VirtualBox 6.1.16
Thanks for performing systematic tests and describing them in detail. I have some ideas how to proceed:
First of all, try using a free clipboard viewer (e.g. from https://freeclipboardviewer.com) on the Windows host. During the following tests, take note of the clipboard formats (e.g. Text vs. Unicode Text vs. OEM Text), and watch closely, what the clipboard viewer displays when, especially if the clipboard is emptied unexpectedly. Do a few copy and paste operations, first between two programs on the host, then between programs on the host and the guest. Then try to reproduce the problem after a Windows boot, with the clipboard viewer running. If it is still reproducible, use the clipboard viewer during the next round of tests, otherwise do them without it.
Second, copy and paste operations do not have to come in pairs: (1) Copy some text in TextPad, and paste it in Notepad + xed + Notepad. (2) Copy some text in TextPad, and paste it in xed + Notepad + xed. (3) Copy some text in TextPad, do not paste it anywhere, copy some other text in TextPad, and paste it in xed.
You can develop your own ideas, of course. If we do not gain enough insight, we may have to go to a deeper level and investigate function calls and messages of TextPad and VirtualBox ...
First of all, try using a free clipboard viewer (e.g. from https://freeclipboardviewer.com) on the Windows host. During the following tests, take note of the clipboard formats (e.g. Text vs. Unicode Text vs. OEM Text), and watch closely, what the clipboard viewer displays when, especially if the clipboard is emptied unexpectedly. Do a few copy and paste operations, first between two programs on the host, then between programs on the host and the guest. Then try to reproduce the problem after a Windows boot, with the clipboard viewer running. If it is still reproducible, use the clipboard viewer during the next round of tests, otherwise do them without it.
Second, copy and paste operations do not have to come in pairs: (1) Copy some text in TextPad, and paste it in Notepad + xed + Notepad. (2) Copy some text in TextPad, and paste it in xed + Notepad + xed. (3) Copy some text in TextPad, do not paste it anywhere, copy some other text in TextPad, and paste it in xed.
You can develop your own ideas, of course. If we do not gain enough insight, we may have to go to a deeper level and investigate function calls and messages of TextPad and VirtualBox ...
-
- Posts: 77
- Joined: 22. Jul 2018, 03:29
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux Mint 20.3 Mate
Paste intermittent - Launch on startup, only
Thanks for sticking with this.fth0 wrote:Thanks for performing systematic tests and describing them in detail.
Code: Select all
1. Boot Windows (Windows Task Scheduler automatically launches Linux Guest after 30 second delay)
1.1. Copy some text in
(Windows Host) TextPad,
SAVED AS '1.1.CL7.txt' (attached to this message) [note 1]
and paste it in
1.2. (Windows Host) Notepad +
SUCCESS
1.3. (Linux Guest) xed +
FAILURE
1.4. (Windows Host) Notepad.
SUCCESS
2. Boot Windows (Windows Task Scheduler automatically launches Linux Guest after 30 second delay)
2.1. Copy some text in
(Windows Host) TextPad,
SAVED AS '2.1.CL7.txt' (attached to this message) [note 1]
and paste it in
2.2. (Linux Guest) xed +
FAILURE
2.3. (Windows Host) Notepad +
SUCCESS
2.4. (Linux Guest) xed.
FAILURE
3. Boot Windows (Windows Task Scheduler automatically launches Linux Guest after 30 second delay)
3.1. Copy some text in
(Windows Host) TextPad,
SAVED AS '3.1.CL7.txt' (attached to this message) [note 1]
do not paste it anywhere,
3.2. copy some other text in
(Windows Host) TextPad,
SAVED AS '3.2.CL7.txt' (attached to this message) [note 2]
and paste it in
3.3. (Linux Guest) xed.
FAILURE
[note 2] I could not attach '3.2.CL7.txt' to this message -- there is a 3 attachment limit. I will attach it to the next message (which will otherwise be blank).
- Attachments
-
- 3.1.CL7.txt
- (248 Bytes) Downloaded 7 times
-
- 2.1.CL7.txt
- (248 Bytes) Downloaded 7 times
-
- 1.1.CL7.txt
- (248 Bytes) Downloaded 7 times
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
-
- Posts: 77
- Joined: 22. Jul 2018, 03:29
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux Mint 20.3 Mate
Paste intermittent - Launch on startup, only
Your message contains too few characters.
EDIT: At no time was the clipboard contents altered (that is, according to Free Clipboard Viewer 4).
EDIT: At no time was the clipboard contents altered (that is, according to Free Clipboard Viewer 4).
- Attachments
-
- 3.2.CL7.txt
- (272 Bytes) Downloaded 8 times
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: copy/paste failure from host to guest with VirtualBox 6.1.16
I'm curious, and I like puzzles and riddles.abcdefgh wrote:Thanks for sticking with this.
Thanks for the clipboard files, which contain the copied text in the CF_UNICODETEXT, CF_TEXT and CF_OEMTEXT formats, and the CF_LOCALE en_US. Your test results show that neither copying from TextPad to the clipboard twice nor successfully pasting to Notepad eliminated the error condition.
I'll have to investigate a bit myself on how to proceed from here. BTW, which version of TextPad did you use?
-
- Posts: 77
- Joined: 22. Jul 2018, 03:29
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux Mint 20.3 Mate
Paste intermittent - Launch on startup, only
By "the error" I assume you mean the unknown error. Or did you find an error in the clipboard files?fth0 wrote:Your test results show that neither copying from TextPad to the clipboard twice nor successfully pasting to Notepad eliminated the error condition.
7.6.4 (64-bit). I would spend the money to upgrade but I understand that the latest TextPad still doesn't handle UTF-8 and UTF-16 properly so I'm stuck with ANSI (which is fine). I tried NotePad++ and hated it.I'll have to investigate a bit myself on how to proceed from here. BTW, which version of TextPad did you use?
EDIT: "UTF-16" was "UTTF-16".
Last edited by abcdefgh on 4. Jun 2021, 21:12, edited 1 time in total.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: copy/paste failure from host to guest with VirtualBox 6.1.16
Yes. I hoped to find an easy way to better understand the issue by some simple experiments.abcdefgh wrote:By "the error" I assume you mean the unknown error.
No, all clipboard files have exactly the same structure and contain only the 4 clipboard data types as I mentioned. They only differ in the text strings (as you know).abcdefgh wrote:Or did you find an error in the clipboard files?
-
- Posts: 77
- Joined: 22. Jul 2018, 03:29
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux Mint 20.3 Mate
Paste intermittent - Launch on startup, only
I've noticed something else... strange/different/noteworthy(?)...
When I boot Windows, Task Scheduler launches, 1, Total Commander, 2, TextPad (as "Mark's Presets Cookbook", the current profile), and 3, the Linux Guest (launched via file association -- 'C:\VMs\Mint18\Mint18.vbox' -- with 30 second delay). At the end of the boot process, the Linux Guest is topmost, but it doesn't have focus. It seems that nothing has the focus. As you can see from the screenshot, Total Commander and TextPad are shown "Running" but Linux Guest is "Ready". One more clue: From time to time, the VM seems to lose/corrupt the keyboard state -- the keyboard is in caps-lock but the 'Caps Lock' key doesn't work in the VM. I have to focus on a Host window and hit 'Caps Lock' to get it to operate correctly in the VM.
EDIT: Upon rereading this, it's a bit misleading. Regarding the keyboard state that gets 'lost' from time to time, it's not stuck in caps lock, it's stuck in shift. Specifically, from time to time, when I type '8', I get '*', for example. When that happens, hitting 'Shift' has no effect -- it's stuck and won't get unstuck until I unstick it in the Host. To be clear, shift isn't stuck in the Host. It's only stuck in the Guest.
When I boot Windows, Task Scheduler launches, 1, Total Commander, 2, TextPad (as "Mark's Presets Cookbook", the current profile), and 3, the Linux Guest (launched via file association -- 'C:\VMs\Mint18\Mint18.vbox' -- with 30 second delay). At the end of the boot process, the Linux Guest is topmost, but it doesn't have focus. It seems that nothing has the focus. As you can see from the screenshot, Total Commander and TextPad are shown "Running" but Linux Guest is "Ready". One more clue: From time to time, the VM seems to lose/corrupt the keyboard state -- the keyboard is in caps-lock but the 'Caps Lock' key doesn't work in the VM. I have to focus on a Host window and hit 'Caps Lock' to get it to operate correctly in the VM.
EDIT: Upon rereading this, it's a bit misleading. Regarding the keyboard state that gets 'lost' from time to time, it's not stuck in caps lock, it's stuck in shift. Specifically, from time to time, when I type '8', I get '*', for example. When that happens, hitting 'Shift' has no effect -- it's stuck and won't get unstuck until I unstick it in the Host. To be clear, shift isn't stuck in the Host. It's only stuck in the Guest.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.