If when running vcgencmd on a raspberry pi you get VCHI initialization failed then you need to add the video group to your user. The vcgencmd tool requires you have this group role so without it, it will give VCHI initialization failed.
To add the user group to your user you can run:
sudo usermod -aG video <username>
Where <username> is the user you want to run the vcgencmd command with. This command adds the video group to the the user you specify.
Once you have ran the command any new logins will run the command successfully. Logging out and back into the pi will let you use the command.
Why this problem occurs
This issue happens when you try and use the vcgencmd command with a user that isn’t a member of the video group. This typically happens when you create a new user for the raspberry pi and don’t give it the same groups that the pi user has.
The solution above fixes this by adding the correct video group to the created user.
I have always wondered this, its exceptionally hit and miss and there isnt any real standards. I recently found the reason on the internet
Well, there were other factors in play there. htmlspecialchars was a very early function. Back when PHP had less than 100 functions and the function hashing mechanism was strlen(). In order to get a nice hash distribution of function names across the various function name lengths names were picked specifically to make them fit into a specific length bucket. This was circa late 1994 when PHP was a tool just for my own personal use and I wasn't too worried about not being able to remember the few function names.
-Rasmus - citation
So it turns out they were very specifically named to make sure they would fit nicely into the hashing function… Obviously today this isn’t needed, but its an exceptionally old artefact of PHP’s past that never got changed.
A IRC client lets you connect to a IRC server enabling you to join chatrooms on that server. IRC servers do not by default store logs while you are not logged in. This can be annoying if you wish to keep informed of whats going in on the chatroom.
One solution to this is to never log out of the chat room. However this relies on constant access to the internet. Since I have a laptop this isnt feasible.
irssi and screen to the rescue
The solution for me was to install irssi on my raspberry pi and use that. irssi is a command line IRC client which means i can access it over SSH. This also means I can run it all the time on my raspberry pi and connect to it from wherever I am.
However, when you exit a ssh session it normally kills all the processes you are running, which means that irssi would stop.
To solve this, you can use a program called screen. This starts a new “screen” which can be detached and it will continue running even if you exit the ssh connection. This means you can run irssi all the time even when you are not connected.
On a raspberry pi (or any Debian type system) screen and irssi can be installed with the following command
sudo apt-get install screen irssi
Screen is relatively easy to use, to launch an instance you run “screen”. When you run screen you send commands to it by using ctrl-a and then pressing a third key. You can use screen like any terminal.
To disconnect from screen and keep it running in the background press ctrl-a d. To resume this you can type screen -r then press tab to get a list of all current screen sessions. Typing in the correct one will let you resume. Here screen will be used to keep irssi open when I disconnect from SSH.
When both have been installed you can run screen and then irssi from inside your new screen instance. Once irssi has been launched you can use it to join your IRC server. For full details of how to use irssi view the irssi website.