Page 1 of 1

Upgrading/New Drivers

Posted: Wed Oct 09, 2019 1:20 pm
by DaveDischord
I understand from other posts that you DO NOT want to [apt-get] upgrade either Stretch or Buster images, as it will break stuff, however, I'm attempting to install a driver for a Wifi/BLE dongle using these steps. I've used this walkthrough before, with no issues, but for StereoPi, I attempted to go through it and bypass the sudo apt-get upgrade line. OpenCV still functions, but I can't build the driver because of the kernel directory. Would anyone happen to know a way I can get this driver installed without breaking everything else?

Re: Upgrading/New Drivers

Posted: Wed Oct 09, 2019 1:41 pm
by Realizator
At this moment we know why this problem appears, as I mention here on our forum.
The problem is updated AWB algo in the latest Raspbian firmware, which broke stereoscopic mode. You can use a temporary solution, proposed by RPi engineer 6by9, and BEFORE accessing camera run this code once:

Code: Select all

sudo vcdbg set awb_mode 0
This command will turn AWB algo to the previous revision, and stereoscopic mode will work fine. Please notice, this works untill reboot. You can add it to autostart.
So you can do drivers installation as intended (with all apt-get upgrade options), and use this patch.

I hope this issue will be patched soon, and we'll be able to do Raspbian upgrade without any issues.

Re: Upgrading/New Drivers

Posted: Wed Oct 09, 2019 1:48 pm
by DaveDischord
Scratch that. For anyone interested, have this Edimax dongle, or maybe having the same issues with installing other drivers, there is a difference between make and sudo make. Choose the right command, in my case make without the sudo.

Re: Upgrading/New Drivers

Posted: Wed Oct 09, 2019 1:49 pm
by DaveDischord
Posted at the same time I guess. Thank you. I'll also give that a try.

Re: Upgrading/New Drivers

Posted: Wed Oct 09, 2019 10:29 pm
by stereomaton
DaveDischord wrote:
Wed Oct 09, 2019 1:48 pm
there is a difference between make and sudo make.
The difference is that executing through the sudo command, the make program get root privileges.
You can remember it as sudo="super user do".

It is always better to reserve execution with high privileges to the tasks that really need it, such as the "make install" which probably need to write files at system level. Regular make (often) only build the binary from sources, so that if the rights of the directories are not messed up, a regular user should be able to execute make without parameters.
In general case, building with root account might lead to wrong file permissions that can prevent software to run normally, so it is adviced to build as regular user.
Of course the Makefile can be written to not follow this general behavior so that there might be rare exceptions.

In general, don't use sudo as a magical solution for all the problems on Linux, otherwise you will slowly mess up the system and end to need sudo everywhere.