<h4>Via firmware</h4>
<p>Looking at your <a href="https://marlinfw.org/docs/gcode/M412.html" rel="nofollow noreferrer">M412 - Filament Runout</a> link, it says that it requires <code>FILAMENT_RUNOUT_SENSOR</code>.</p>
<p>Try disabling <code>FILAMENT_RUNOUT_SENSOR</code> in the firmware by commenting out (<code>//</code>) the following line, in <code>Configuration.h</code>, like so</p>
<pre><code>//#define FILAMENT_RUNOUT_SENSOR
</code></pre>
<p>From <a href="https://marlinfw.org/docs/configuration/configuration.html#filament-runout-sensor" rel="nofollow noreferrer">Filament Runout Sensor</a></p>
<pre><code>//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
  #define NUM_RUNOUT_SENSORS   1     // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
  #define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor.

...
</code></pre>
<hr />
<h4>Via UI</h4>
<p>Watch this video, <a href="https://www.youtube.com/watch?v=pxBGBjLC2rk" rel="nofollow noreferrer">The BEST Ender-3 V2 Firmware EVER?! MRiscoC Professional Firmware</a>, at <a href="https://www.youtube.com/watch?v=pxBGBjLC2rk&amp;t=143" rel="nofollow noreferrer">2:43</a>,</p>
<p><div class="youtube-embed"><div>
                <iframe width="640px" height="395px" src="https://www.youtube.com/embed/pxBGBjLC2rk?start=0"></iframe>
            </div></div></p>
<p>It shows the Filament sensor can be disabled via the UI:</p>
<p><a href="https://i.sstatic.net/BgTAr.jpg" rel="nofollow noreferrer" title="Filament settings on printer UI"><img src="https://i.sstatic.net/BgTAr.jpg" alt="Filament settings on printer UI" title="Filament settings on printer UI" /></a></p>

CC BY-SA 4.0
2024-02-02T00:03:19.877Z
Thank you for the help and advice.  I've dug into it... it seems my printer is using some ancient version of Marlin and is tricky to get working on a current version, based on what I've found on GitHub.  So, I'm going to poke at building Marlin for it this weekend, but will probably end up ordering a new mainboard.  In any case, thanks!
Brad
CC BY-SA 4.0
2024-02-03T23:17:48.750Z
That's a real  shame that there isn't a Marlin upgrade path. BTW, If you have some useful links about the ancient Marlin and your board, then it might be useful for someone else, who is experiencing the same issue, if you posted them as an answer (maybe quoting the relevant parts). Also, knowing the version number (if there is one) of your ancient Marlin could be very useful.
Greenonline
CC BY-SA 4.0
2024-02-01T21:48:55.657Z
2024-02-01T22:01:40.060Z
2024-02-01T22:01:40.060Z
Greenonline
<p>I have a Lotmaxx Shark v2, which has developed the problem of constantly saying the filament has ran out when it hasn't.  I've narrowed down the issue to the main board, and tried to work around the problem:</p>
<ul>
<li>Installed new sensor (which is just a switch), no effect.</li>
<li>Checked the cable continuity all the way to the pins that plug into the main board, that was fine.</li>
<li>Added <a href="https://marlinfw.org/docs/gcode/M412.html" rel="nofollow noreferrer"><code>M412 S0</code></a> to the top of my G-code file to try to disable the sensor.</li>
<li>Set <code>FILAMENT_INVERTING</code> in the firmware configuration.</li>
</ul>
<p>If, for whatever reason, the main board is damaged, I'd love to just disable this sensor.  I don't really need it.  Also unused is the second extruder set, so if I can't disable the sensor maybe I could configure the printer to use extruder #2 all the time instead of extruder #1?</p>

CC BY-SA 4.0
2024-01-29T00:45:28.907Z
you'd have to install new firmware that simply has no sensor.
Trish
CC BY-SA 4.0
2024-01-29T07:37:23.017Z
Or perhaps your firmware provides an option to disable it without reflashing. Mriscoc firmware for Ender 3V2 for example has that. Did you check advanced settings of your firmware?
Bob Ortiz
<marlin><g-code><filament-sensor><runout-sensor>
How to disable a filament sensor?
Brad
# How to disable a filament sensor?

(Asked by: username_0 on 2024-01-28)

I have a Lotmaxx Shark v2, which has developed the problem of constantly saying the filament has ran out when it hasn't. I've narrowed down the issue to the main board, and tried to work around the problem:

* Installed new sensor (which is just a switch), no effect.
* Checked the cable continuity all the way to the pins that plug into the main board, that was fine.
* Added [`M412 S0`](https://marlinfw.org/docs/gcode/M412.html) to the top of my G-code file to try to disable the sensor.
* Set `FILAMENT_INVERTING` in the firmware configuration.

If, for whatever reason, the main board is damaged, I'd love to just disable this sensor. I don't really need it. Also unused is the second extruder set, so if I can't disable the sensor maybe I could configure the printer to use extruder #2 all the time instead of extruder #1?

**Tags:** marlin, g-code, filament-sensor, runout-sensor
> **Comments:**
> **username_1**: you'd have to install new firmware that simply has no sensor.  
> **username_2**: Or perhaps your firmware provides an option to disable it without reflashing. Mriscoc firmware for Ender 3V2 for example has that. Did you check advanced settings of your firmware?  

---

## 1 answers

### Answer by username_3 on 2024-02-01. Score: 2 | Accepted answer

Via firmware
Looking at your M412 - Filament Runout link, it says that it requires FILAMENT_RUNOUT_SENSOR.
Try disabling FILAMENT_RUNOUT_SENSOR in the firmware by commenting out (//) the following line, in Configuration.h, like so
//#define FILAMENT_RUNOUT_SENSOR

From Filament Runout Sensor
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
  #define NUM_RUNOUT_SENSORS   1     // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
  #define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor.

...


Via UI
Watch this video, The BEST Ender-3 V2 Firmware EVER?! MRiscoC Professional Firmware, at 2:43,



It shows the Filament sensor can be disabled via the UI:

> **Comments:**
> **username_0**: Thank you for the help and advice.  I've dug into it... it seems my printer is using some ancient version of Marlin and is tricky to get working on a current version, based on what I've found on GitHub.  So, I'm going to poke at building Marlin for it this weekend, but will probably end up ordering a new mainboard.  In any case, thanks!  
> **username_3**: That's a real  shame that there isn't a Marlin upgrade path. BTW, If you have some useful links about the ancient Marlin and your board, then it might be useful for someone else, who is experiencing the same issue, if you posted them as an answer (maybe quoting the relevant parts). Also, knowing the version number (if there is one) of your ancient Marlin could be very useful.  

---

