Can't run IDE 2.10 with sudo on Ubuntu 22.04.2 LTS

Hi,
I am aware that this subject was already discussed, but I've never found a solution depsite the read posts.

when trying to upload a sketch onto an Arduino Due I get the known error about the serial port:

No device found on ttyACM0
Failed uploading: uploading error: exit status 1

Then I try to run the IDE with sudo, getting the alert that I should use the --no-sandbox option:

marco@Viognier:~/programs/arduino\> sudo ./arduino-ide 
[sudo] password for marco: 
[0703/095044.803887:FATAL:electron_main_delegate.cc(294)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Trace/breakpoint trap

Then I add the option and a series of errors is thrown:

sudo ./arduino-ide --no-sandbox
Arduino IDE 2.1.0
Starting backend process. PID: 9635
[9620:0703/095104.999912:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[9620:0703/095104.999963:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Authorization required, but no authorization protocol specified
[9620:0703/095105.033750:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=1024
Authorization required, but no authorization protocol specified
[9620:0703/095105.037288:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=1024
Authorization required, but no authorization protocol specified
[9620:0703/095105.040146:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=1024
Authorization required, but no authorization protocol specified
[9620:0703/095105.043031:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=1024
Authorization required, but no authorization protocol specified
[9620:0703/095105.045680:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=1024
Authorization required, but no authorization protocol specified
[9620:0703/095105.048186:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=1024
Authorization required, but no authorization protocol specified
[9620:0703/095105.051531:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=1024
Authorization required, but no authorization protocol specified
[9620:0703/095105.054433:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=1024
Authorization required, but no authorization protocol specified
[9620:0703/095105.057123:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=1024
[9620:0703/095105.057141:FATAL:gpu_data_manager_impl_private.cc(417)] GPU process isn't usable. Goodbye.
Trace/breakpoint trap

I have tried, as suggested in previous posts, to fix port access to my username with no success:

sudo usermod -a -G dialout <username>

Does anybody know how to fix this issue permanently ?

Many thanks in advance,
Marco

For the benefit of others who may encounter the same issue, I answer myself after fixing it.
The problem was not related to the arduino board nor to the driving computer and its settings, but to a stepper motor controller board (MDD3A) connecte to the Arduino Due via 4 digital pins plus 5V and GND.
It looks like the board sinks current from the Arduino even if not programmed and even if the 5V wire is unconnected, thus bringing the Arduino Due into an unstable state.
Summarizing, who may have my same problem, before getting into troubles should try and program the Arduino board with nothing connected to it.
Hope this helps,
Marco

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.