Octoprint on Kubuntu - Permission Denied /dev/ttyUSB0

What is the problem?

I am unable to connect to my printer on /dev/ttyUSB0.
Connecting to: /dev/ttyUSB0
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /dev/ttyUSB0 SerialException: '[Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'' @ comm.py:_openSerial:2691 (hook default)

What did you already try to solve it?

Ensure ttyUSB0 is in dialout group. Rebooted. Tried AUTO for Serial Port. Ran dmesg to ensure printer is on ttyUSB0.

Additional information about your setup

New Kubuntu install on old Dell desktop. Worked a month ago when I had Ubuntu Mate installed... I needed to do a reinstall of Ubuntu so I went with Kubuntu.

My assumptions is your didn't give your user permissions to the serial interfaces. Per the setup guide for Raspbian you must run the following commands, which you would replace the username pi with your username.

sudo usermod -a -G tty pi
sudo usermod -a -G dialout pi
1 Like

Thanks jneilliii, however, I had tried this previously (I ran the commands again to be sure). My username is a member of the tty and dialout groups. Any other ideas?

There is a setting in OctoPrint Request exclusive access to the serial port that if you uncheck might make a difference.

Tried that as well... no luck.

Just a quick check, you restarted octoprint after changing that option?

I did... I tried using the web interface to restart but I'm never really sure if that actually restarts it... so I typically go do the CLI and do a sudo systemctl restart octoprint

I ended up installing regular Ubuntu 20.04 and using the instructions provided here (https://makenotes.de/2020/03/octoprint-on-ubuntu-using-python3-and-systemd/) Octoprint now connects!

1 Like

Hi,
I installed octorpint via snap (I know, I know snap image is old and unsupported)

it turns out you have to install it with devmode confinement

sudo snap install --edge octoprint-pfs --devmode

took me quite a while to figure it out. works well now

5 Likes

Thank you so much!

I needed this too! Was running similarly as Andrew on Ubuntu Studio 20.04.

works for me too thx
now i can not update to 1.5.3 directly from
how can i do it from terminal ?
i m a noob in linux sorry

I did the same thing. How do I get to the point of having no devmode? I tried to remove the old package, but it doesn't recognize octoprint or OctoPrint. "sudo apt-get remove"

You guys should try this installer script instead of using an old broken unofficial snap deployment.

Found! sudo snap remove octoprint-pfs