OctoPi changes IP address when connected to an hdmi screen

I have OctoPrint 1.4.2 running on a Pi 3B and connected to an Ender 3 Pro.
OctoPi has a static IP address (192.168.1.162) assigned by the router on one of my WiFi networks and everything works fine when connecting remotely.

BUT, I tried today to connect an hdmi screen with touch interface - Pi boots ok and arrives to the prompt but it says that it can be reached @ 192.168.0.176 (which is an address I don't know on a different subnet). Seems like it's using a different config when Pi "senses" a monitor and a keyboard. Shutdown and screen disconnection got me back to the normal configuration.

Any ideas? I would basically like to use to hdmi screen as local UI for OctoPrint but of course would also like to keep remote connection.

Thanks in advance!
Giovanni

What is the problem?
OctoPi uses different IP address when connected to HDMI / touch screen

What did you already try to solve it?
Disconnect screen and reboot

Logs (syslog, dmesg, ... no logs, no support)
octoprint.log (165.9 KB)

Additional information about your network (Hardware you are trying to connect to, hardware you are trying to connect from, router, access point, used operating systems, ...)

hey @gperro My first thought: your Pi 3B clearly is looking for a more accurate IP address (2020.2020.2020.2020)... because, you know, 2020 :poop:

In all seriousness, what screen are you using? May have stumbled across a similar issue a while back but think I might be able to retrieve what happened to me; hopefully that'll help break the curse.

Hi @CHA - thanks for the reply.

I am using a 7" LCD labeled "Longrunner" - just got it on Amazon since it was on discount (maybe there was a good reason for it after all :D)

Resolution should be 1024x600 - when connected seems to be working fine but apparently makes my Pi confused...
Thanks
Giovanni

Doesn't make any sense. Screen has no bearing at all on network.
On the screen if you open up a terminal and type "sudo ifconfig -a" then without the screen ssh in and run the same command, what is the output of both?

Hi @5ft24, you're right - it doesn't make sense. And in fact I tried again today (absolutely no changes) and it worked as expected (same IP address with or without screen).

Sorry to have bothered you guys, I tried several times and checked on the internet before ceating my original post but apparently it was a glitch.

Thanks anyway
Giovanni

Update on the same topic: it appears that the problem is intermittent. I begin to suspect my power supply is not good enough to power the Pi and the screen and when it does the wifi nic goes nuts. I'm trying to configure cable connection and see what happens....

or, better still, get a better power supply!

  1. Get better supply AND good power wire
  2. You can always set a constant IP address, just to be sure.

wires are not a problem, power is through a buck converter connected directly to the GPIO pins and I suspect it wasn't good enough to power the lcd AND the wifi.
With the same power setup I'm running now a cabled eth connection and another 7' screen and it works perfectly!

Thanks anyway for the support

PS: I tried to assign fixed IP addresses using the dhcp config file but this resulted in complete loss of reachability of the PI (surely I made some mistakes). I then re-built the PI and switched to cable and everything is now ok :slight_smile: