Microsoft MCE Remote - Vista and newer

Questions and comments specific to a particular plugin should go here.
User avatar
kgschlosser
Site Admin
Posts: 2891
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Microsoft MCE Remote - Vista and newer

Post by kgschlosser » Thu Jun 22, 2017 1:22 am

If you are running Windows 8 or below the installation/upgrade process of the plugin will delete the old plugin doesn't matter if it is in the program files or the program data folder. With Windows 10 no program is allowed to add/delete/modify any files in the program files directory. Now I would have to check on this but if you moved the plugin into the program files directory then had EG completely closed. Right click on the .egplugin file and do a run as administrator this may or may not be able to delete the plugin located in the program files and it will install the new into program data. But for some reason I believe that even running the egplugin file as admin still does not solve this. But what I can do is I can change the order in which EG looks for plugins and move it to checking the programdata location first unless it it one of the 4 core plugin EventGhost, Window, Mouse and System.
If you like the work I have been doing then feel free to Image

CrazyTimes
Posts: 10
Joined: Sat Mar 12, 2016 3:51 pm

Re: Microsoft MCE Remote - Vista and newer

Post by CrazyTimes » Wed Jun 28, 2017 8:46 pm

This was on Win7. EG was closed during the plugin installation and the old plugin was not deleted from the \Program/Files\ directory. I had to manually delete it and then EG started using the file located in the ProgramsData directory.

While the upgrade/delete process that is set in place with egplugin may be fine for 'normal' plugins - I suspect this issue is because of the AlternateMceIrService service.

In a case like this, even with EG closed the user still needs to intervene and manually stop/uninstall the service (which I suspect runs right from the plugin directory = locked files) since egplugin doesn't seem to have the logic to do that itself.

User avatar
kgschlosser
Site Admin
Posts: 2891
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Microsoft MCE Remote - Vista and newer

Post by kgschlosser » Thu Jun 29, 2017 3:50 am

yes yes yes you are correct. this is due to the file being in use. as soon as EG hits an error it bumps out of the file removing process. and simply exits. There is a version of the plugin installation that is slated to be added into the next version (the one after EG 0.5) and this version will actually show a message box explaining there was an error and that the plugin needs to be removed manually. The whole plugin install process has been re written that is why it was going to be in the next release of EG and it might get changed yet again due to the new server and getting that plugin repository going (which i am stoked about)
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 464
Joined: Thu Nov 17, 2011 1:27 am

Re: Microsoft MCE Remote - Vista and newer

Post by blaher » Sun Aug 06, 2017 5:58 am

I'm having a problem with the service just randoml, (seemingly), dropping out. Here's my log at the same time as the error message, but it doesn't seem to show much.

Code: Select all

20:02:54: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=66688, uMsg=536L, wParam=32787L, lParam=132859520)
20:02:54: 0 MainMessageReceiver: <class 'eg.CorePluginModule.System.PowerBroadcastNotifier.POWERBROADCAST_SETTING'> Monitor.Off 132859520
21:01:40: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=66688, uMsg=536L, wParam=32787L, lParam=132859904)
21:01:40: 0 MainMessageReceiver: <class 'eg.CorePluginModule.System.PowerBroadcastNotifier.POWERBROADCAST_SETTING'> Monitor.On 132859904
23:18:08: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=66688, uMsg=536L, wParam=32787L, lParam=132859520)
23:18:08: 0 MainMessageReceiver: <class 'eg.CorePluginModule.System.PowerBroadcastNotifier.POWERBROADCAST_SETTING'> Monitor.Off 132859520
23:18:10: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=66688, uMsg=536L, wParam=32787L, lParam=132859936)
23:18:10: 0 MainMessageReceiver: <class 'eg.CorePluginModule.System.PowerBroadcastNotifier.POWERBROADCAST_SETTING'> Monitor.On 132859936
23:18:11: 1 MainThread: OSDFrame.ShowOSD(osdText=u'HDMI Audio', fontInfo=u'0;-48;0;0;0;700;0;0;0;0;3;2;1;34;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=4, offset=(0, 0), displayNumber=0, timeout=4.0, event=3884, skin=u'Default')
23:18:12: 1 MainThread: OSDFrame.OnPaint(dummyEvent=<wx.PaintEvent>)
23:18:12: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=66688, uMsg=536L, wParam=32787L, lParam=132859840)
23:18:12: 0 MainMessageReceiver: <class 'eg.CorePluginModule.System.PowerBroadcastNotifier.POWERBROADCAST_SETTING'> Monitor.Off 132859840
23:18:12: 1 MainThread: OSDFrame.ShowOSD(osdText=u'Kodi Light Link Off', fontInfo=u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=4, offset=(0, 0), displayNumber=0, timeout=3.0, event=3272, skin=u'Default')
23:18:15: 0 Thread-55554: OSDFrame.OnTimeout()
10:25:34: 0 MainMessageReceiver: SessionChangeNotifier.OnSessionChange(hwnd=66688, msg=689L, wparam=3L, lparam=2)
I found this in the Win 10 Event Log:

Code: Select all

Faulting application name: AlternateMceIrService.exe, version: 0.0.0.0, time stamp: 0x4eda3c4c
Faulting module name: ntdll.dll, version: 10.0.15063.447, time stamp: 0xa329d3a8
Exception code: 0xc0000374
Fault offset: 0x00000000000f775f
Faulting process ID: 0xdd4
Faulting application start time: 0x01d30ceae7a1edeb
Faulting application path: C:\Program Files (x86)\EventGhost\plugins\MceRemote_Vista\AlternateMceIrService.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report ID: 4a75e7f1-f43b-4952-acde-d0523afa39db
Faulting package full name: 
Faulting package-relative application ID: 

Code: Select all

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2017-08-05T13:18:12.590859600Z" /> 
  <EventRecordID>3819</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>Blaher</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>AlternateMceIrService.exe</Data> 
  <Data>0.0.0.0</Data> 
  <Data>4eda3c4c</Data> 
  <Data>ntdll.dll</Data> 
  <Data>10.0.15063.447</Data> 
  <Data>a329d3a8</Data> 
  <Data>c0000374</Data> 
  <Data>00000000000f775f</Data> 
  <Data>dd4</Data> 
  <Data>01d30ceae7a1edeb</Data> 
  <Data>C:\Program Files (x86)\EventGhost\plugins\MceRemote_Vista\AlternateMceIrService.exe</Data> 
  <Data>C:\WINDOWS\SYSTEM32\ntdll.dll</Data> 
  <Data>4a75e7f1-f43b-4952-acde-d0523afa39db</Data> 
  <Data /> 
  <Data /> 
  </EventData>
  </Event>
Hope that helps track it down a bit!
Attachments
Capture.JPG

User avatar
Luca Brasi
Experienced User
Posts: 250
Joined: Sat Oct 11, 2008 12:39 pm

Re: Microsoft MCE Remote - Vista and newer

Post by Luca Brasi » Sun Aug 06, 2017 11:38 am

This has been happening on my system for years.
Here's a workaround:
You should get an event MceRemote.Disconnected when it happens.
You can tell eg to restart the service in that case:
screen_mmnote_2017-08-06 12 54 19.png
screen_mmnote_2017-08-06 12 54 19.png (23.03 KiB) Viewed 787 times
The system command should look like this. You will need administrative privileges for this and UAC should be disabled.
screen_mmnote_2017-08-06 12 54 47.png
screen_mmnote_2017-08-06 12 54 47.png (34.57 KiB) Viewed 787 times
I know it is just a workaround. Would be nice if it could be actually solved on the system level. The workaround works on my sys most of the times. But from time to time I will get some leftover entries for the service in the taskmanager and have to restart the machine to get it working again. But this is only every couple of weeks.
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 2891
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Microsoft MCE Remote - Vista and newer

Post by kgschlosser » Sun Aug 06, 2017 5:11 pm

well what I am going to have you do is install the mceir service manually. and see of that fixes the problem. the event id is a pretty generic id that is not going to help us out. so unless i see all of the event logs from well what would be best is both computers. i can see if something matches up between the 2. this would help to isolate the problem. there is a very good chance it could be the same thing causing the problem on both machines. I personally do not use the mceir service now. but when i did I never came across the issue of it crashing.

I would need to see all of your windows event logs. and I know that would be a whole heap of information. the only easy way for me to be able to do that is to RDP into both computers at the same time and compare the 2 side by side to see if i find anything
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 250
Joined: Sat Oct 11, 2008 12:39 pm

Re: Microsoft MCE Remote - Vista and newer

Post by Luca Brasi » Sun Aug 06, 2017 5:58 pm

well what I am going to have you do is install the mceir service manually.
You mean running the installer from the plugin's folder? I have done that some time ago.
I'd be fine with a remote session on my sys but as I just have seen there are no current crashes in my log. I'll disable my workaround in eg and check again as soon as the mce goes offline.
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 2891
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Microsoft MCE Remote - Vista and newer

Post by kgschlosser » Mon Aug 07, 2017 6:18 am

no using nssm (Non-Sucking Service Manager) to install the service instead of from the installer.


you should also be able to change the properties of the service and click on recovery and you can set the thing to restart the service after so many minutes. you shouldn't have to use EG to restart the service
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 250
Joined: Sat Oct 11, 2008 12:39 pm

Re: Microsoft MCE Remote - Vista and newer

Post by Luca Brasi » Mon Aug 07, 2017 5:19 pm

kgschlosser wrote:no using nssm (Non-Sucking Service Manager) to install the service instead of from the installer.
I'll try that.
kgschlosser wrote:you should also be able to change the properties of the service and click on recovery and you can set the thing to restart the service after so many minutes. you shouldn't have to use EG to restart the service
This is regarding nssm as well or the windows system feature? This one doesn't help, tried it...
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 2891
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Microsoft MCE Remote - Vista and newer

Post by kgschlosser » Mon Aug 07, 2017 11:42 pm

if you go into your services list in windows and select the mceir service and click on properties. and then recover. there are settings that should restart the thing if it fails. if they do not work then something is not right in the code to install the service. I would try nssm and see if that cures the problem. with either the service it's self. or at the very least make the recovery options work properly.
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 250
Joined: Sat Oct 11, 2008 12:39 pm

Re: Microsoft MCE Remote - Vista and newer

Post by Luca Brasi » Wed Aug 09, 2017 4:38 pm

kgschlosser wrote:if you go into your services list in windows and select the mceir service and click on properties. and then recover. there are settings that should restart the thing if it fails.
Yes that's what I meant in my last post. I had tried this but waited before replying so I could check how it is in Win 10. It's been some time since I last checked.
Just now I could check. On my sys the service will not stop but eg will not get any mce events. So the system will not restart the service. But as soon as I do it manually mce will work again. (There is an option for handling other failures than a stopped service but they are grayed out on my system)
I'm pretty sure that this only happens after resume (or maybe something happens when going to sleep). Thus I have set up eg to restart the service after a resume and Mce will work.
kgschlosser wrote: if they do not work then something is not right in the code to install the service. I would try nssm and see if that cures the problem. with either the service it's self. or at the very least make the recovery options work properly.
I'll try nssm now...
Last edited by Luca Brasi on Fri Aug 11, 2017 8:24 am, edited 1 time in total.
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 2891
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Microsoft MCE Remote - Vista and newer

Post by kgschlosser » Wed Aug 09, 2017 7:10 pm

yeah I know what this is...


turn off the power saving to your usb ports. this is done in 2 places. the first in in your power settings in control panel. you will have to make a custom power plan.

the second is in device manager you have to go to the usb root hubs and disable power management there as well.


Let me explain what is happening.. i completely forgot about this.

Windows when it goes to sleep it informs the programs that it is doing this. and the programs have to handle things how they see fit. so what happens is windows tells the usb devices to turn off. then it tells the applications that it is shutting down. so EG sees the device disconnect.. great... but when it tells the usb devices to wake up it tells the devices then it tells the apps to wake up. so EG never sees the device get reconnected. this is an over simplified explanation of what happens. so if you tell windows not to put the usb devices to sleep then it won't and there for EG will never see it get disconnected. and will wake up with it being connected. it seems to solve the issue. now. you can be selective on which usb root hubs you want to power down or not. you will have to poke through them and find the one that has you ir receiver plugged into it and disable the power management for only that hub..

The driver would need to be overhauled to handle windows message for sleep and waking up to know that it has to rescan for the device. it is not coded this way. i believe. or if it is it is not functioning properly.
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 464
Joined: Thu Nov 17, 2011 1:27 am

Re: Microsoft MCE Remote - Vista and newer

Post by blaher » Fri Aug 11, 2017 5:01 am

kgschlosser wrote:if you go into your services list in windows and select the mceir service and click on properties. and then recover. there are settings that should restart the thing if it fails. if they do not work then something is not right in the code to install the service. I would try nssm and see if that cures the problem. with either the service it's self. or at the very least make the recovery options work properly.
This works for me, thanks. I didn't get an EG event when my service died, but the recovery option works well.

User avatar
kgschlosser
Site Admin
Posts: 2891
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Microsoft MCE Remote - Vista and newer

Post by kgschlosser » Fri Aug 11, 2017 5:28 am

blaher wrote:This works for me, thanks. I didn't get an EG event when my service died, but the recovery option works well.
You're welcome. I'm glad to help. I think..
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 250
Joined: Sat Oct 11, 2008 12:39 pm

Re: Microsoft MCE Remote - Vista and newer

Post by Luca Brasi » Fri Aug 11, 2017 8:28 am

kgschlosser wrote:yeah I know what this is...


turn off the power saving to your usb ports. this is done in 2 places. the first in in your power settings in control panel. you will have to make a custom power plan.

the second is in device manager you have to go to the usb root hubs and disable power management there as well.


Let me explain what is happening.. i completely forgot about this.

Windows when it goes to sleep it informs the programs that it is doing this. and the programs have to handle things how they see fit. so what happens is windows tells the usb devices to turn off. then it tells the applications that it is shutting down. so EG sees the device disconnect.. great... but when it tells the usb devices to wake up it tells the devices then it tells the apps to wake up. so EG never sees the device get reconnected. this is an over simplified explanation of what happens. so if you tell windows not to put the usb devices to sleep then it won't and there for EG will never see it get disconnected. and will wake up with it being connected. it seems to solve the issue. now. you can be selective on which usb root hubs you want to power down or not. you will have to poke through them and find the one that has you ir receiver plugged into it and disable the power management for only that hub..

The driver would need to be overhauled to handle windows message for sleep and waking up to know that it has to rescan for the device. it is not coded this way. i believe. or if it is it is not functioning properly.
Thanks for your explanation. I think you're there about the stuff which is happening on resume. I can even see some events being logged 10 seconds before eg logs the resume. I checked the power settings again. I had done this many times before :-) There was only one hub on my sys with power saving enabled this time. I switched it off and will test if I got lucky.
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

Post Reply