How to fix mount manager error in winecfg (drives list missing)?

Questions about Wine on Linux
Locked
User avatar
Dragos
Level 2
Level 2
Posts: 11
Joined: Thu Dec 03, 2020 11:19 pm

How to fix mount manager error in winecfg (drives list missing)?

Post by Dragos »

A few things happened in a short time (including installing native libraries through Winetricks) and at some point winecfg started displaying an empty drive panel with an error. Tried reinstalling same Wine version (5.14) to no avail. Then I temporarily updated to current 5.22 and the drive list was back working. Then I downgraded back to 5.14 due to a different issue (just posted about it) and the drive list error returned. Something about mountmgr. Right now can't provide the exact error messages because I upgraded back to 5.22 in an attempt to find a clue.
Any information on this would be appreciated. I'm not afraid to test anything that could lead to fixing this issue. Thank you in advance.
User avatar
Dragos
Level 2
Level 2
Posts: 11
Joined: Thu Dec 03, 2020 11:19 pm

Re: How to fix mount manager error in winecfg (drives list missing)?

Post by Dragos »

Back to 5.14 in order to restore usability with one of the daily application.
Not much to see in the Drives tab of winecfg:
Screenshot from 2020-12-07 01-47-56.png
Usually I start winecfg from Q4wine (v1.3.12) for the 32bit prefix I'm using. In the Logging tab there's a command line showing how it's started, Exit code is zero, no STDOUT or STDERROR output:

Code: Select all

/usr/bin/env  WINE='/usr/bin/wine'  WINEPREFIX='/home/dragos/.local/share/wineprefixes/XP32'  WINESERVER='/usr/bin/wineserver'  WINELOADER='/usr/bin/wine'  WINEARCH='win32'  WINEDEBUG='-all'  /bin/sh -c "cd '/home/dragos' &&   '/usr/bin/wine'   'winecfg.exe'  2>&1 "
There is no problem in displaying the drive list for the default 64bit prefix, however since all my Windows applications are 32bit they are all installed/running in the 32bit prefix. Needless to say any newly connected drive - such as an USB stick or drive - will not show up in that prefix's file manager(s) so they would be unusable.
Screenshot from 2020-12-07 01-58-46.png
Obviously installing native libraries led to this situation, and it is strange that there is no visible way of uninstalling them, nor any useful advices can be found on the web. Could anyone please point me to such location(s), please? Even here it's hard to navigate and use the search function of the board, for whatever reason.
spoon0042
Level 6
Level 6
Posts: 570
Joined: Thu Dec 24, 2009 11:00 am

Re: How to fix mount manager error in winecfg (drives list missing)?

Post by spoon0042 »

That command line includes WINEDEBUG='-all' which turns off all output, which you don't want if you're trying to diagnose a problem.

It would be useful to know if a newly created 32-bit prefix fails the same way. If not then it's something in this particular wineprefix. Further, if it's a result of native libraries those should be able to be disabled under the 'Libraries' tab in winecfg.
User avatar
Dragos
Level 2
Level 2
Posts: 11
Joined: Thu Dec 03, 2020 11:19 pm

Re: How to fix mount manager error in winecfg (drives list missing)?

Post by Dragos »

Ah, one of the so many quirks of Linux: how to type in parameters and arguments. Thank you for enlightening me.

News: I've just found out about 6.0 RC1 and installed it. In Q4wine using the very same command line (done automatically) now there is error output:

Code: Select all

wine: configuration in L"/home/dragos/.local/share/wineprefixes/XP32" has been updated.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\E:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\F:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\H:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\J:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\L:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
That's what used to say before when upgrading from 5.14 to 5.22. Which is weird, because logically errors should appear when something is not working, not the other way around.
So, in 5.14 there is no error message and no drives list; in 6.0 there are errors but drives list is available. :?

Was just about to create a new 32bit prefix to check how everything goes but I already suspect it will all be fine, just as it is with the 64bit prefix which has not been tampered with in any way. Will do that however, just to be sure.

The thing with native libraries is much more complicated. When installing individual libraries or packages through Winetricks I have no idea where they actually go, if they physically replace built-in files or not, what additional changes are performed in the registry or elsewhere. Disabling or deleting libraries from the Libraries list does not help; moreover, only certain individual executables have been assigned native libraries while Default Settings remain clear of any changes. This goes deeper, possibly to mountmgr.sys and/or other drivers that winecfg merely accesses for polling information (and fails).
I tried to check dependencies using both Dependency Walker 2.2 and the FileInfo plug-in in Total Commander - both providing useful and consistent results under real Windows - but in Wine there are discrepancies between results. Some serious debug is required here. Will try and see if changing WINEDEBUG to 'all' (are there any specific values for that?) provides any useful information.
User avatar
Dragos
Level 2
Level 2
Posts: 11
Joined: Thu Dec 03, 2020 11:19 pm

Re: How to fix mount manager error in winecfg (drives list missing)?

Post by Dragos »

Hm, can't edit previous post. OK.
So I created new 32bit profile and as expected everything is alright at least in regard to the issue at hand.
But that was just for testing purposes only. What I need is to understand what is happening and find a way to fix it, now and any other times it may be happening again. No prefix deleting/recreating/reinstalling/reconfiguring/etc - that is unacceptable.
spoon0042
Level 6
Level 6
Posts: 570
Joined: Thu Dec 24, 2009 11:00 am

Re: How to fix mount manager error in winecfg (drives list missing)?

Post by spoon0042 »

Dragos wrote: Sun Dec 06, 2020 8:33 pm Ah, one of the so many quirks of Linux: how to type in parameters and arguments. Thank you for enlightening me.

News: I've just found out about 6.0 RC1 and installed it. In Q4wine using the very same command line (done automatically) now there is error output:

Code: Select all

wine: configuration in L"/home/dragos/.local/share/wineprefixes/XP32" has been updated.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\E:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\F:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\H:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\J:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\L:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
That's what used to say before when upgrading from 5.14 to 5.22. Which is weird, because logically errors should appear when something is not working, not the other way around.
So, in 5.14 there is no error message and no drives list; in 6.0 there are errors but drives list is available. :?
That error message is harmless; wine is attempting to read info from the raw(?) unix device and failing. (There's workarounds if you really need a label or serial but it's probably not worth worrying about.) It's not happening with 5.14 because it isn't getting that far with mountmgr failing.
Was just about to create a new 32bit prefix to check how everything goes but I already suspect it will all be fine, just as it is with the 64bit prefix which has not been tampered with in any way. Will do that however, just to be sure.

The thing with native libraries is much more complicated. When installing individual libraries or packages through Winetricks I have no idea where they actually go, if they physically replace built-in files or not, what additional changes are performed in the registry or elsewhere. Disabling or deleting libraries from the Libraries list does not help; moreover, only certain individual executables have been assigned native libraries while Default Settings remain clear of any changes. This goes deeper, possibly to mountmgr.sys and/or other drivers that winecfg merely accesses for polling information (and fails).
If you're using winetricks dlls generally go into c:\windows\system32 and syswow64 in that wineprefix. In most cases if you modify or remove the override in winecfg wine will use its (unix) system dlls and ignore whatever is under c:\windows\whatever. (There are exceptions like programs that do weird things like manually access dlls.)
I tried to check dependencies using both Dependency Walker 2.2 and the FileInfo plug-in in Total Commander - both providing useful and consistent results under real Windows - but in Wine there are discrepancies between results. Some serious debug is required here. Will try and see if changing WINEDEBUG to 'all' (are there any specific values for that?) provides any useful information.
Indeed, there's a page on the wiki describing this: https://wiki.winehq.org/Debug_Channels
One such channel is 'mountmgr' conveniently enough, I don't know how q4wine works but if you're running from a terminal (which is probably worth doing when attempting to debug something) you'd want 'WINEDEBUG=+mountmgr wine whatever.exe'. (Or the full path to wine if necessary.)
Hm, can't edit previous post. OK.
So I created new 32bit profile and as expected everything is alright at least in regard to the issue at hand.
But that was just for testing purposes only. What I need is to understand what is happening and find a way to fix it, now and any other times it may be happening again. No prefix deleting/recreating/reinstalling/reconfiguring/etc - that is unacceptable.
Unfortunately the standard advice for a broken wineprefix is to just start over. You could also repeat whatever steps you did one at a time on the new wineprefix and see if or when it breaks. And it's always possible the cause is some bug in wine that was fixed somewhere between 5.14 and 5.22. I'm not sure but I think I may have run into a similar issue recently while debugging something else but things worked with current wine so I didn't look into it really. I could check if I still have that wineprefix and see if I can figure anything out.
spoon0042
Level 6
Level 6
Posts: 570
Joined: Thu Dec 24, 2009 11:00 am

Re: How to fix mount manager error in winecfg (drives list missing)?

Post by spoon0042 »

Before you tear anymore hair out: I'm leaning towards some bug. 5.14 devel gives me that same error instead of the drives list. More recent versions work as expected, though I don't know exactly when it was fixed.
User avatar
Dragos
Level 2
Level 2
Posts: 11
Joined: Thu Dec 03, 2020 11:19 pm

Re: How to fix mount manager error in winecfg (drives list missing)?

Post by Dragos »

spoon0042 wrote: Mon Dec 07, 2020 11:49 am That error message is harmless; wine is attempting to read info from the raw(?) unix device and failing.
Maybe, but the point is it was never there before in any of the previous Wine versions I went through. Popped up only after the DLL mess.

There still are bugs in Wine related to labels and serials, for example all existing (hidden) serial files for all partitions except C: and Z: have been cleared by the 6.0 RC1 installation. I had manually created and edited those files since previous Wine versions didn't even create them when editing those properties in winecfg > Drives > Advanced. Now all serial files contain a zero and a <CR>.
spoon0042 wrote: Mon Dec 07, 2020 11:49 am If you're using winetricks dlls generally go into c:\windows\system32 and syswow64 in that wineprefix. In most cases if you modify or remove the override in winecfg wine will use its (unix) system dlls and ignore whatever is under c:\windows\whatever. (There are exceptions like programs that do weird things like manually access dlls.)
Since this is a 32bit prefix there is no syswow64 folder, unless the main 64bit prefix is also modified, which shouldn't be the case.
I did comb through system32 and manually removed most libraries that didn't belong (creation date is a great hint), but there must be others in various places, and possibly some configuration settings elsewhere than the registry. Does Wine keep an external list of what was installed and where? I just launched winecfg with +mountmgr debug flag and first error was missing CommonControls 6.0.0 (which I had manually - but probably not completely - removed). And in Q4wine (latest available version) in the Setup tab there is a list of Winetricks files sorted by categories; in dlls one can see the installed packages have large icons as compared to the uninstalled ones.
Screenshot from 2020-12-08 06-50-30.png
There also seems to be a slightly different library path loading order than in real Windows, where if one places a DLL/OCX/AX/etc library in the same folder with an executable then that executable when launched would scan its own folder and load whatever dependency it finds there as prioritary to those in system/system32 or other system-wide paths. In Wine, even if I place - say - native gdiplus.dll or msvcrt.dll next to my executable it will not be loaded, not even when overridden in winecfg for that particular executable. Am I wrong?
spoon0042 wrote: Mon Dec 07, 2020 11:49 am I don't know how q4wine works but if you're running from a terminal (which is probably worth doing when attempting to debug something) you'd want 'WINEDEBUG=+mountmgr wine whatever.exe'.
The full comand line launched by Q4wine is posted in my second post above between screenshots. When needed I can copy that, paste in Terminal, edit accordingly and launch.
Thing is, I'll have to downgrade to 5.14 again for the n-th time in order to check the console output with WINEDEBUG=+mountmgr on. BTW thank you for pointing directly to it, earlier I skimmed through that debug page but it's quite a lot to read and was very sleepy after an all-nighter.
User avatar
Dragos
Level 2
Level 2
Posts: 11
Joined: Thu Dec 03, 2020 11:19 pm

Re: How to fix mount manager error in winecfg (drives list missing)?

Post by Dragos »

BTW, the reason why I'm stuck with 5.14 can be found here. And I didn't even cover all the issues with that application there.
Locked