EOS M3 - Disable LCD Off doesn't work - page 4 - General Help and Assistance on using CHDK stable releases - CHDK Forum

EOS M3 - Disable LCD Off doesn't work

  • 38 Replies
  • 3754 Views
*

Offline reyalp

  • ******
  • 12879
Re: EOS M3 - Disable LCD Off doesn't work
« Reply #30 on: 13 / February / 2020, 14:56:20 »
Advertisements
Here's the full patch. It has some irrelevant analog AV stuff mixed in.

I'm not sure if the final fix was due to putting the check in vid_bitmap_refresh, or making the delay a hard coded 3s at startup.

I expect there's probably a variable somewhere that tells us if it's safe to try to draw (maybe the is checked in the assert) which be preferable.

I also noticed some of the early debug prints like the one at the start of kbd_task didn't appear in the romlogs. Presumably they happened before the cameralog started.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 12879
Re: EOS M3 - Disable LCD Off doesn't work
« Reply #31 on: 17 / February / 2020, 00:18:29 »
I played with this a bit more. I implemented clean overlay on G7X, but was not able to reproduce the crash with either HDMI or analog video out. G7X does not support HDMI in rec, so it's not really equivalent.

I was initially confused for a bit how clean overlay could trigger the crash at startup, since it's only active in rec mode, but I guess the M ports start in rec by default (which is OK, the main reason we default to play on P&S is to avoid extending the lens unexpectedly)

I looked at the assert a bit more. It is the same as the one on G7X I saw when forcing analog video out. It happens in the final function called from transfer_src_overlay (g7x 100d fc0f7faa, m3 120f  fc245b6, both MakeOsdVram.c Line 603)
The values that trigger the assert come from pointers that are set in transfer_src_overlay, I don't see an obvious way to check them from CHDK code.

I'm thinking about making everything call draw_restore rather than vid_bitmap_refresh, so the check disabling drawing can be in one place rather than in every affected port's vid_bitmap_refresh.
This doesn't work, draw_restore sets the guard pixel, which means the CHDK display doesn't get redrawn when it should. We could maybe use gui_set_need_restore but that puts the palette_control mod far from the eventual vid_bitmap_refresh call.

Attached is a patch that does the 3s delay without the analog video stuff.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4324
Re: EOS M3 - Disable LCD Off doesn't work
« Reply #32 on: 23 / February / 2020, 17:18:52 »
I was initially confused for a bit how clean overlay could trigger the crash at startup, since it's only active in rec mode, but I guess the M ports start in rec by default
The m10 (and I'd guess the m3 too) starts in rec when started via ON/OFF, and in playback when started via the playback button.
Without the fix (and clean overlay set to 'rec'), the m10 crashes when started in rec mode with HDMI connected. That crash no longer happens with clean-overlay-hdmi-crash-reyalp-work-1.patch applied. I checked in the HDMI bit definition in r5429.

*

Offline reyalp

  • ******
  • 12879
Re: EOS M3 - Disable LCD Off doesn't work
« Reply #33 on: 01 / March / 2020, 18:08:23 »
The m10 (and I'd guess the m3 too) starts in rec when started via ON/OFF, and in playback when started via the playback button.
Without the fix (and clean overlay set to 'rec'), the m10 crashes when started in rec mode with HDMI connected. That crash no longer happens with clean-overlay-hdmi-crash-reyalp-work-1.patch applied. I checked in the HDMI bit definition in r5429.
Thanks. I checked in a slight modification of this patch in r5431
Don't forget what the H stands for.


Re: EOS M3 - Disable LCD Off doesn't work
« Reply #34 on: 05 / July / 2020, 16:38:16 »
Hi all, sorry if I should be making a new thread instead.

I'm running into this issue — but only on one specific lens, the EF-M 22mm f/2.0 STM "pancake".

On my other lenses (and without a lens installed) I do not run into this problem:
  • EF-M 18-55 IS STM
  • EF-S 18-200mm IS (with the EF mount adapter)
  • no lens contact (e.g. a fully manual lens)

I've also read about the timing issue and have tried four different SD cards (from a fast, recent 32GB microSD, to a very ancient 32MB freebie card :D ) but none of them seem to improve the issue.

(In the meantime, I've worked around the issue by having my 22mm pancake lens slightly loose/ajar so the lens contacts are not touching. Do any of you know if this will cause any issue in the long-run?)

*

Offline srsa_4c

  • ******
  • 4324
Re: EOS M3 - Disable LCD Off doesn't work
« Reply #35 on: 06 / July / 2020, 16:37:15 »
I'm running into this issue — but only on one specific lens, the EF-M 22mm f/2.0 STM "pancake".

On my other lenses (and without a lens installed) I do not run into this problem:
  • EF-M 18-55 IS STM
  • EF-S 18-200mm IS (with the EF mount adapter)
  • no lens contact (e.g. a fully manual lens)

I've also read about the timing issue and have tried four different SD cards (from a fast, recent 32GB microSD, to a very ancient 32MB freebie card :D ) but none of them seem to improve the issue.
Thanks for these. So, now it looks like the varying factor might be the lens.

Can you make startup logs with the following Lua script?
Code: [Select]
--[[
@title Startup log to file
@chdk_version 1.3
]]
name="A/log.txt"
uartr=require("uartr")
uartr.start(name,false)
call_event_proc("ShowCameraLog")
sleep(1000)
uartr.stop()
Do the following:
Copy the script to the card, load it, exit ALT mode, power off the camera.
With the problem lens attached, start the cam, run the script as soon as possible. Shut down the camera, attach one of the other EF lenses, start the cam, run the script as soon as possible.
Get log.txt from the root of the card and upload it here.
There is a chance that the early part of camera startup won't be in the saved log, but it's worth a try.

I have some ideas that might help with the issue. If you're willing to assist with testing, I'm going to need to know the firmware you're using (101a or 120f).

Re: EOS M3 - Disable LCD Off doesn't work
« Reply #36 on: 08 / August / 2020, 19:52:35 »
I am sorry to bring this up again, but I was able to get always working screen by doing this:
1) Power on EOS M3, switch to CHDK
2) Go to CHDK settings -> Disable LCD Off -> From always to never
3) Switch to Normal shooting mode, go back to CHDK
3) CHDK settings -> Disable LCD Off -> From never to always

Hope it will help someone too.

*

Offline Jet

  • *
  • 1
Re: EOS M3 - Disable LCD Off doesn't work
« Reply #37 on: 08 / January / 2021, 03:46:51 »
I am sorry to bring this up again, but I was able to get always working screen by doing this:
1) Power on EOS M3, switch to CHDK
2) Go to CHDK settings -> Disable LCD Off -> From always to never
3) Switch to Normal shooting mode, go back to CHDK
3) CHDK settings -> Disable LCD Off -> From never to always

Hope it will help someone too.

Yes, I have found that toggling the setting to something else and then to Always will make it stay on.

Is there a way to make it work as it should though? I read through the earlier posts in the thread and didn't really understand it.


*

Offline srsa_4c

  • ******
  • 4324
Re: EOS M3 - Disable LCD Off doesn't work
« Reply #38 on: 10 / January / 2021, 17:56:03 »
Is there a way to make it work as it should though? I read through the earlier posts in the thread and didn't really understand it.
The cause of the issue is not known. This post, slightly above yours suggests that it might be lens dependent.
Attached is a trial build for both supported firmware versions.
Does it help?

Source patch is this (I'm trying to delay SpyTask a bit more at startup).
Code: [Select]
Index: platform/m3/sub/101a/boot.c
===================================================================
--- platform/m3/sub/101a/boot.c (revision 5707)
+++ platform/m3/sub/101a/boot.c (working copy)
@@ -252,6 +252,15 @@
 );
 }
 
+// notifies spytask on its second invocation
+void spytask_notifier() {
+    static int ncnt = 0;
+    ncnt++;
+    if (ncnt == 2) {
+        core_spytask_can_start();
+    }
+}
+
 //fc04f194 ??????????????
 void __attribute__((naked,noinline)) sub_fc062f48_my() {
 
@@ -464,6 +473,7 @@
 "                 bl      sub_fc0638a8\n"
 "                 bl      sub_fc362db4\n"
 "                 bl      sub_fc130c90\n"
+"                 bl      spytask_notifier\n" // +
  "ldmia.w sp!, {r4, lr}\n"
  //"                 b.w     sub_fc130f1e\n"      // - (not recognized automatically yet, transformed into ldr pc)
  "ldr     pc, =0xfc130f1f\n"     // + thumb address must be used
@@ -511,7 +521,7 @@
 "                 bl      sub_fc37e834\n"
 " loc_fc0f79b6:\n"
 "                 bl      sub_fc0f9e16\n"
-"    BL      core_spytask_can_start\n" // + CHDK: Set "it's-safe-to-start" flag for spytask
+"                 bl      spytask_notifier\n" // +
 "                 cmp     r4, #0\n"
 "                 bne.n     loc_fc0f79ca\n"
 "                 mov     r0, r5\n"
Index: platform/m3/sub/120f/boot.c
===================================================================
--- platform/m3/sub/120f/boot.c (revision 5707)
+++ platform/m3/sub/120f/boot.c (working copy)
@@ -252,6 +252,15 @@
 );
 }
 
+// notifies spytask on its second invocation
+void spytask_notifier() {
+    static int ncnt = 0;
+    ncnt++;
+    if (ncnt == 2) {
+        core_spytask_can_start();
+    }
+}
+
 //fc04f194 ??????????????
 void __attribute__((naked,noinline)) sub_fc062f48_my() {
 
@@ -463,6 +472,7 @@
 "  bl      sub_fc363020\n"
 "  bl      sub_fc130d78\n"
 // " bl agent_orange\n"
+"  bl      spytask_notifier\n" // +
 "  pop.w   {r4,lr}\n"
 //"  b.w     sub_fc131006\n" // - (not recognized automatically yet, transformed into ldr pc)
 "ldr     pc, =0xfc131007\n"     // + thumb address must be used
@@ -510,7 +520,7 @@
 "       bl      sub_fc37eba4\n"
 " loc_fc0f79b6:\n"
 "       bl      sub_fc0f9e16\n"
-"    BL      core_spytask_can_start\n" // + CHDK: Set "it's-safe-to-start" flag for spytask
+"       bl      spytask_notifier\n" // +
 "       cmp     r4, #0\n"
 "       bne     locret_fc0f79ca\n"
 "       mov     r0, r5\n"

 

Related Topics