Yesterday I lost all my system sounds after a new install (done as an upgrade ) of Mint Sarah.
Actually it had been lost in 17.3 and I had done the upgrade after screwing it up there while trying to change the sound inputs to accept a 5.1 surround sound system. I had hoped with the new Kernel it would fix it.
Lot's of complicated advice out there for this issue and ideas for fault finding.
Turns out all I had to do was open Synaptic Package manager and search for libcanberra-pulse, it was not installed so I ticked it and applied the change. Voila I now have desktop sounds again.
Incidentally the issued with the Creative 5.1 surround sound system was a fixed to an extent, after screwing everything up by following several different fixes first.
My internal sound card on the motherboard has three, three-pin phono input/outputs.
My Sub woofer was connected to PINK (mic) connection nearest the board.
Next to that was FRONT connecting to the middle LIME (line-out).
Finally REAR was connected to LIGHT BLUE (line-in).
With these connections set up correctly from the manual's of both the ASROCK 960GM motherboard and the CREATIVE Inspire T6300 surround sound system it was just the software to tackle.
It seems like you have to change the options in the /etc/modprobe.d folder. there can be found the text file alsa-base.conf
By changing (as root) and adding the yellow highlighted line to the file I seem to have made the sound chip on the motherboard's connection be recognised as an analogue 3 pin phono connector thus enabling it to send the correct signals out and not expecting a microphone signal in and line in to be received.
# Prevent abnormal drivers from grabbing index 0
options snd_hda_intel model=3stack
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
I still have some work to do on this as I'm not sure if everything is working OK but I am getting there.
Finally I checked that the option of 5.1 was now there in the sound options of the control panel and moved the option from 2 channel stereo to 5.1 stereo.
I also checked alsamixer from the Terminal which seemed to only show the first 5 channel volume options by moving across with the right arrow the other options appeared from the edge of the screen to check also. I made sure the correct options for volume were set here also.
Thats where I'm up to.
Just a page logging various tasks and problems I've had to overcome in my discovery of Linux Mint plus other random tips and hints I've found useful.
Monday, 9 January 2017
Thursday, 28 July 2016
XBOX 360 gamepad Install
Finally found a good driver install for Ubuntu/Mint that works correctly for this gamepad.
From:
http://www.noobslab.com/2014/08/configure-xbox-controller-on-your.html
sudo add-apt-repository ppa:rael-gc/ubuntu-xboxdrv
sudo apt-get update
sudo apt-get install ubuntu-xboxdrv
sudo service xboxdrv restart
From:
http://www.noobslab.com/2014/08/configure-xbox-controller-on-your.html
sudo add-apt-repository ppa:rael-gc/ubuntu-xboxdrv
sudo apt-get update
sudo apt-get install ubuntu-xboxdrv
sudo service xboxdrv restart
Saturday, 6 February 2016
Makerbot Desktop Unable to install from instructions on their site
Just trying to install Makerbot Desktop on Mint 17.3 from their website instructions.
Lesson learnt, don't trust cut and paste
This guys answer is a bit over the top but I like that, explained it perfectly
http://askubuntu.com/questions/528051/makerbot-won-t-install
Answer 2
Lesson learnt, don't trust cut and paste
This guys answer is a bit over the top but I like that, explained it perfectly
http://askubuntu.com/questions/528051/makerbot-won-t-install
Answer 2
Sunday, 13 December 2015
D-Link IP Camera setup on Linux Mint
Well last night I gave in to shopping temptation and got a D-Link DCS-932LB1
It was cheap and on offer and although it only said Windows / Mac use I thought I would take a chance to get it working under Mint. That BUY NOW button eh !
So first I found Zone Minder, which looks a great program but I had real trouble setting it up so I gave up trying after following a few guides. Something to do with systemd and systemctl I could not figure out.
So I looked for something simpler and I found it.
Motion
I've just started to play with it but I need to get this down before I move on to saving video and using it via my android phone & other places, so the basics of setting it up.
First I found a guide on how to just set up the camera with my router at sensor.org
This was basically connect by ethernet cable to my router
plug the camera in
navigate to my router setup homepage where I found the WPS connection button,
then press the button on the back of the camera and the WPS button on the setup page
The router found the IP camera and I was away.
I found the new connection on the list of active connections on the router info page
copied the internal IP address 192.168.x.x
and pasted it into my browser
This brought up the IP cameras setup page where I entered the supplied username and password
from the manual. The first thing I did was change this and follow the setup from there
keeping the simplest options for now.
I was now ready to install Motion
sudo apt-get install motion
sudo apt-get update
apparently this should automatically create a
motion group (I learnt a bit from trial and error about there from installing Plex !)
it should also add a motion user
This info is on Linux.com at how to operate linux spycams with motion
after making sure this was right I started motion
$: motion
mistake it wouldn't give permission to use
silly me
$: sudo motion
and it started up. I then found it had failed to find the video device
I followed the instructions on Linux.com down to the point where the author talked about
permissions again.
Her name was carla so I noticed she gave the instructions
I replaced the carla with my group name and user name so it all worked.
I followed the info to make more directories then saved localhost:8081 and localhost:8080 to my browser favourites
The first port 8081 is the feed to see the camera output and the second port 8080 is the configuration
file where you can enter and change different set up options.
I went to config then list and all the changable options were there
To see my camera I then went back to the IP Camera's setup page and found the link to the feed by
right clicking on the video feed and using inspect on my chromium browser to pick up the link as shown on Linux.com.
pasting that link into netcam_url =
and then pasting admin:mypassword
into netcam_userpass =
Bang. the feed came up on the hocalhost:8081 webpage
Now I can mess about with other options another day to add functionality
It was cheap and on offer and although it only said Windows / Mac use I thought I would take a chance to get it working under Mint. That BUY NOW button eh !
So first I found Zone Minder, which looks a great program but I had real trouble setting it up so I gave up trying after following a few guides. Something to do with systemd and systemctl I could not figure out.
So I looked for something simpler and I found it.
Motion
I've just started to play with it but I need to get this down before I move on to saving video and using it via my android phone & other places, so the basics of setting it up.
First I found a guide on how to just set up the camera with my router at sensor.org
This was basically connect by ethernet cable to my router
plug the camera in
navigate to my router setup homepage where I found the WPS connection button,
then press the button on the back of the camera and the WPS button on the setup page
The router found the IP camera and I was away.
I found the new connection on the list of active connections on the router info page
copied the internal IP address 192.168.x.x
and pasted it into my browser
This brought up the IP cameras setup page where I entered the supplied username and password
from the manual. The first thing I did was change this and follow the setup from there
keeping the simplest options for now.
I was now ready to install Motion
sudo apt-get install motion
sudo apt-get update
apparently this should automatically create a
motion group (I learnt a bit from trial and error about there from installing Plex !)
it should also add a motion user
This info is on Linux.com at how to operate linux spycams with motion
after making sure this was right I started motion
$: motion
mistake it wouldn't give permission to use
silly me
$: sudo motion
and it started up. I then found it had failed to find the video device
I followed the instructions on Linux.com down to the point where the author talked about
permissions again.
Her name was carla so I noticed she gave the instructions
~$ sudo chown carla:carla .motion/motion.confHer group name was obviously carla and so was her user name.
I replaced the carla with my group name and user name so it all worked.
I followed the info to make more directories then saved localhost:8081 and localhost:8080 to my browser favourites
The first port 8081 is the feed to see the camera output and the second port 8080 is the configuration
file where you can enter and change different set up options.
I went to config then list and all the changable options were there
To see my camera I then went back to the IP Camera's setup page and found the link to the feed by
right clicking on the video feed and using inspect on my chromium browser to pick up the link as shown on Linux.com.
pasting that link into netcam_url =
and then pasting admin:mypassword
into netcam_userpass =
Bang. the feed came up on the hocalhost:8081 webpage
Now I can mess about with other options another day to add functionality
Sunday, 25 October 2015
Mupen64plus
Just a little about setting up Mupen64plus, the Nintendo 64 emulator.
It seems this puts files everywhere and none of the Ubuntu places that are suggested in most tutorials.
So easiest after installing the deb file, do a search in the Nautilus file manager for Mupen64 and watch all the places its stuck itself show up.
Install the frontend "M64py" to make it a little easier to point to where the Rom's are stored along with where the executable is and Data files / Plugins. Leave the search results handy so you can see where everything is.
One problem I had was setting up my controller. I used a Xbox360 Pad and tried to follow the joystick setup walkthru that is an easy find online.
https://code.google.com/p/mupen64plus/wiki/ControllerSetup
Two things to point out about this, the config.ini file it talks about is in the $HOME/.config hidden file in your home directory.
(Dot). files need to be seen in a folder by going to the menu bar and selecting View then scrolling down to hidden files and selecting so they are shown. There also may be other config.ini files for other emulators there also.
This file is nice to view and only needs a little amending (as root).
The parameter needs to be changed in the Core section of mupen64plus.cfg. It should look something like this:
Joy Mapping Stop = "j0b10"
That's for joystick 0, button 10
This gives you an ESCAPE from the emulator mapped to button 10.
The InputAutoCfg.ini file which is the file used to set various joypads up was harder to find thus the Nautilus search. The controller Setup info was wrong for me. I found it at /usr/share/games/mupen64plus
Before I go any further I have to say I had lots of trouble getting the controller to work until I realised my controller itself was not connecting correctly. I was forced to try a few different USB ports for it to connect. I checked that the system was seeing it by doing a lsusb command at the terminal until it showed up.
I grabbed the Xbox 360 controller configuration file and pasted it into the InputAutoCfg.ini and tried and tried to get it to work with the controller setup GUI in M64py frontend. No luck
Finally I found a post on the Ubuntu forums that had the answer. Call the programme from a Terminal window. I did this and all the setup configuration options were there to be changed and saved. easy when you know how.
One final thing I've been finding with emulators in general. Quite a few I've used have been opening in full screen and I've had trouble escaping from the full screen view.
There have been some quite bad tempered replies to posts from people who had this problem from some unsympathetic dicks. They should just be nice and tell them on some emulators to escape full screen it is ALT and ENTER. Even with random pushes that was hard to find and when its buried somewhere in the midst of a manual its even harder to work out.
It seems this puts files everywhere and none of the Ubuntu places that are suggested in most tutorials.
So easiest after installing the deb file, do a search in the Nautilus file manager for Mupen64 and watch all the places its stuck itself show up.
Install the frontend "M64py" to make it a little easier to point to where the Rom's are stored along with where the executable is and Data files / Plugins. Leave the search results handy so you can see where everything is.
One problem I had was setting up my controller. I used a Xbox360 Pad and tried to follow the joystick setup walkthru that is an easy find online.
https://code.google.com/p/mupen64plus/wiki/ControllerSetup
Two things to point out about this, the config.ini file it talks about is in the $HOME/.config hidden file in your home directory.
(Dot). files need to be seen in a folder by going to the menu bar and selecting View then scrolling down to hidden files and selecting so they are shown. There also may be other config.ini files for other emulators there also.
This file is nice to view and only needs a little amending (as root).
The parameter needs to be changed in the Core section of mupen64plus.cfg. It should look something like this:
Joy Mapping Stop = "j0b10"
That's for joystick 0, button 10
This gives you an ESCAPE from the emulator mapped to button 10.
The InputAutoCfg.ini file which is the file used to set various joypads up was harder to find thus the Nautilus search. The controller Setup info was wrong for me. I found it at /usr/share/games/mupen64plus
Before I go any further I have to say I had lots of trouble getting the controller to work until I realised my controller itself was not connecting correctly. I was forced to try a few different USB ports for it to connect. I checked that the system was seeing it by doing a lsusb command at the terminal until it showed up.
I grabbed the Xbox 360 controller configuration file and pasted it into the InputAutoCfg.ini and tried and tried to get it to work with the controller setup GUI in M64py frontend. No luck
Finally I found a post on the Ubuntu forums that had the answer. Call the programme from a Terminal window. I did this and all the setup configuration options were there to be changed and saved. easy when you know how.
One final thing I've been finding with emulators in general. Quite a few I've used have been opening in full screen and I've had trouble escaping from the full screen view.
There have been some quite bad tempered replies to posts from people who had this problem from some unsympathetic dicks. They should just be nice and tell them on some emulators to escape full screen it is ALT and ENTER. Even with random pushes that was hard to find and when its buried somewhere in the midst of a manual its even harder to work out.
Saturday, 22 August 2015
Setting up my Time lapse Raspberry Pi Camera with a shut down switch
Lets do it !
Well this post is a little bit about Linux Mint as I'm using it to set up and transfer files to my Time Lapse Camera I have made from a "Raspberry Pi" Micro computer but also because it links in to my last post which was about joining the shots I'd made into a short time lapse Video.
Let's get this down while I have the tabs open on my browser I've used and it's fresh, in case I need to do it again.
About the Camera
I set up a simple camera time lapse using the camera module for the Pi and set it off connected to a mobile phone battery back up pack.
These are ridiculously cheap on e-bay from China without the batteries inside, currently about £2 including shipping. They're searchable as Rechargeable USB LED Mobile Power Bank Charger 4pcs 18650 Li-ion Battery Case
People give me old out of date or none working Laptops and so I ripped the Lithium batteries out of the battery pack of one of these. The nice Panasonic batteries were checked on my multimeter and they all seemed OK so I put 6 of them inside the battery pack casing and set it on charge through the USB port of my PC.
By the way most laptops seem to hold battery packs of the type 18650. You can buy them on e-bay but there are types with a nipple on the plus end and types that are flat on both ends. My batteries from the laptop fitted in the case but some new ones I also bought 4x 4200mAh UltraFire 18650 3.7V Rechargeable Li-ion Battery were shorter and were loose when put in so I did not use them.
I now had a portable time lapse camera I can take anywhere and it will take a picture every one minute for as long as the batteries last.
The set up for the Camera time lapse is available as a worksheet on the Raspberry Pi learning website
https://www.raspberrypi.org/resources/
This is just a prototype and I want to add other features to it as I go along so nice start.
What now
After setting up the Camera to capture the scene outside my window onto the street I left it running overnight to see how long the batteries would last before they cut power to the Pi. The shots were saved as in the worksheet instructions to save date and time so I would know how many hours by just checking the time stamp on the pictures.
Well that all worked and I took the mini SD card (or TF card if you're from China) from out of the Pi and connected it to my PC, copying over the "Camera" folder to my Linux desktop and then using imagemagic in TERMINAL as described in my last post.
Now to the crux
The battery lasted enough time to get a nice sunrise over my car and onto the street but then I had the issue of shutting down the Pi. (Switches to present tense)
I don't want to damage the file system on the SD card by too many hard close downs from loss of power. I can do this by adding something to my script to fix the time and amount of shots taken before the script tells the Pi to shutdown the operating system (don't know how to do that yet but it is something I will research and learn).
I also would like to be able to just press a button and ask the Pi to stop taking shots and shutdown the operating system itself before the battery does it for it by dying.
The little portable setup won't be connected to a monitor and keyboard and also I don't want to always have it connected to a ethernet cable or have a WiFi receiver plugged in.
The only choice is a soft shutdown button.
Now there are a load of pages on the Internet on how to do this but my problem with them is if they are written by experts, they forget the simple stuff or miss vital bits out expecting you to know it.
If they are written by novices they seem to do everything the longwinded way with un-neccsary steps that just add to the confusion.
It's difficult to find something at my "tinkering" level. Oh well, that's life.
So this is How I have done it after lots of wasted hours.
The actual Process
This is for the Raspberry Pi model B+. I have one of the earlier models, the B but I don't like doing anything that could screw it up with it.
First all the pages I looked at had everybody doing the complicated stuff on the Pi first connected to a monitor. For desktop stuff I think the Pi is just way to slow to do these things. After my initial setup of the card and Pi using a monitor I noted the IP address of the Pi and enabled SSH in (sudo) raspi-config so I could access it from my main computer.
All my editing of files were done by cutting the code from my browser then pasting into gedit the linux mint notepad, saving this file to my desktop and using Filezilla the FTP program to transfer that file to the correct folder on the Pi.
I used PUTTY to do any other things such as making the files I had sent over read or writable using chmod to change the permissions, and for shutdowns.
The best resource I found was an article on the Rasbperry Pi forum but to me I felt it was over complicated. There were lots of comments made to improve the result but all left out important bits leaving a guide which seemed to be do it wrong then change this bit by bit until it works this way.
I had to go through everything to pull out a relevant and simple process.
First rip a small monetary switch from some old press button electronics board or buy new. They are tiny and just connect when pressed down for a moment.
Then check they open and close forming a circuit. I used a light and battery to create a simple series circuit to check the legs of the switch as I could only find square 4 leg switches in my scrap box and didn't know which leg connected to which.
I then cut of the wires from an old PC fan connector that fits into the headers on a motherboard. They are small and thin black power connectors. You'll see them and know they are perfect to connect to the headers on the Pi.
Solder the micro switch to the two wires from the flat black connector (it may have two or 3 holes in it depending where you got it from) and you have your plug in switch. This should just slide gently over the pins 5 and 6 on the Model B+
Count in from the top left by the mounting hole, use a guide first to see where they are. 2 , 4 , 5 and 6.
Now cut and paste the code from the forum post below into gedit. I used the code by "ame" at the end of page one as the later code didn't work for me.
Save it as shutdown.py.
FTP the file to the Home/Pi/ folder
Use PUTTY to access the Pi and in TERMINAL go to the Home/Pi/ folder where everything is and chmod +x shutdown.py to change file permissions.
Then enter the Cron system that sets up timed events by crontab -e
Go to the bottom of the file and add at the end
Save this. Shutdown the Pi and disconnect, fit the switch wherever you want it and connect it all up again.
After the reboot you should just be able to press the microswitch quickly and the Pi will shutdown from within with a shutdown call. the lights will flicker then go to a solid red. One more tap and the Pi will come out of hibernate.
Links to resources I've used and were useful.
https://www.raspberrypi.org/documentation/usage/gpio-plus-and-raspi2/
Shows GPIO points on the Raspberry Pi B+ I used, they're different from the B model
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=106410
Called "Solderless clean shutdown/boot switch" if it moves.
http://www.trevorappleton.blogspot.co.uk/2013/11/creating-time-lapse-camera-with.html
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=67109
Friday, 21 August 2015
Rotating timelapse Images in bulk & converting to AVI using ImageMagic
CD to your folder eg.
TERMINAL
cd Desktop/camera/
Make a bash script. My images are upside down so I need the rotation 180% using ImageMagic's convert.
TERMINAL
for file in *.jpg; do convert $file -rotate 180 rotated-$file; done
This script takes files all files (* wildcard) within the folder that are jpg format and rotates them 180 degrees. It then renames the file by adding a "rotated-" to the start of the file name.
I just remove the unrotated jpg's cos I'm lazy then
TERMINAL
ls *.jpg > stills.txt
List all jpg files and send that down a pipe to a text file called stills.txt
I can then use memcoder (if installed) to convert the timelapse pictures to a short avi video
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -o timelapse.avi -mf type=jpeg:fps=24 mf://@stills.txt
TERMINAL
cd Desktop/camera/
Make a bash script. My images are upside down so I need the rotation 180% using ImageMagic's convert.
TERMINAL
for file in *.jpg; do convert $file -rotate 180 rotated-$file; done
This script takes files all files (* wildcard) within the folder that are jpg format and rotates them 180 degrees. It then renames the file by adding a "rotated-" to the start of the file name.
I just remove the unrotated jpg's cos I'm lazy then
TERMINAL
ls *.jpg > stills.txt
List all jpg files and send that down a pipe to a text file called stills.txt
I can then use memcoder (if installed) to convert the timelapse pictures to a short avi video
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -o timelapse.avi -mf type=jpeg:fps=24 mf://@stills.txt
Subscribe to:
Posts (Atom)
