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