motion package stops upgrade

Bug #220924 reported by Tom
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
motion (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: motion

The "motion" package ends up running in the foreground during the upgrade, causing the upgrade process to stop (it did record images of me while trying to fix the problem, however!).

Furthermore, in my case, when I ^C'ed out of motion, the system was in a state where I couldn't sudo anymore and hence couldn't continue with the upgrade.

Revision history for this message
Geoff Hickey (ardri) wrote :

I ran into this also. You can reproduce it without running an upgrade though: just install motion with a webcam plugged in. If the default settings in the new /etc/motion.conf script installed with the package will work with the webcam, the process won't return. It looks like the default should be changed to "daemon yes".

There seems to be another problem though: if I just set "daemon yes" and then do "sudo /etc/init.d/motion start", I get this:

Starting motion detection : motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.9 Started
[0] Exit motion, cannot create process id file (pid file) /var/run/motion.pid: Permission denied
[0] Motion going to daemon mode
.

It doesn't actually start: ps -e | grep motion shows nothing.

Revision history for this message
deeGraYve (deegrayve) wrote :

exactly the same has happened to me...
furthermore none of the webcam applications are working, camorama, cheeze, wxcam, motion all stopped working. What makes it worse the application I was working on that uses openCV (and the one I just compiled and tested 2 days ago) fails to grab video from webcam as well....
have to go back to 7.10 and install everything once again

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 198292, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

Revision history for this message
kriss (kszmurlo) wrote :

To run motion as a daemon you need set:
daemon yes
and!!!
process_id_file /var/run/motion/motion.pid (I think someone should change default config in pack)

/etc/init.d/motion script trying to run motion as a motion user, but /var/run/ has root owner.

Also you need to have /var/run/motion folder as user:group motion:motion (I don't know whether this folder is created by installer or not)

also script /etc/init.d/motion
need to be change from:
PIDFILE=/var/run/$NAME.pid
to
PIDFILE=/var/run/motion/$NAME.pid
but it's only cosmetic change

Revision history for this message
kriss (kszmurlo) wrote :

I've got 8.10 ubuntu, motion 3.2.9-7

Revision history for this message
Brian C (brianwc) wrote :

Comment #4 by kriss on 2009-03-24 fixed this error for me on Debian Lenny. I agree that the default /etc/motion/motion.conf and the /etc/init.d/motion script should be changed to what kriss suggested.

Revision history for this message
Hernâni Ribeiro Pereira de Moura (hernanimoura) wrote :

Dear friends!

I had exactly the same problem and I solved the problem this way:

Go to aplications – accessories – terminal

Here, in the terminal, you rite: sudo gedit /etc/motion/motion.conf

This will open the window of gedit. Now, in this window change this lines as I show:

"############################################################
# Daemon
############################################################

# Start in daemon (background) mode and release terminal (default: off)
daemon off

# File to store the process ID, also called pid file. (default: not defined)
process_id_file /var/run/motion/motion.pid

Now, click in File . In the menu that apears choose “save as”. This will open another window for you to choose where to save the file. Then choose the folder “home” (or personal folder) and save there this file. The new location of the motion .conf will be something like this: /home/the_name_that_you_gave_to_your_computer/motion.conf

May be in your case it can be only: /home/motion.conf. In my case the result was as fallows:

prof@prof:~$ sudo motion

[sudo] password for prof:

[0] Processing thread 0 - config file /home/prof/motion.conf

[0] Motion 3.2.11 Started

[0] ffmpeg LIBAVCODEC_BUILD 3412993 LIBAVFORMAT_BUILD 3415808

[0] Thread 1 is from /home/prof/motion.conf

[1] Thread 1 started

[0] motion-httpd/3.2.11 running, accepting connections

[0] motion-httpd: waiting for data on port TCP 8080

[1] cap.driver: "uvcvideo"

[1] cap.card: "CNF7051"

[1] cap.bus_info: "usb-0000:00:1a.7-2"

[1] cap.capabilities=0x04000001

[1] - VIDEO_CAPTURE

[1] - STREAMING

[1] Supported palettes:

[1] 0: YUYV (YUV 4:2:2 (YUYV))

[1] index_format 6 Test palette YUYV (320x240)

[1] Using palette YUYV (320x240) bytesperlines 640 sizeimage 153600 colorspace 00000008

[1] found control 0x00980900, "Brightness", range -64,64

[1] "Brightness", default 0, current 0

[1] found control 0x00980901, "Contrast", range 0,95

[1] "Contrast", default 25, current 25

[1] found control 0x00980902, "Saturation", range 0,128

[1] "Saturation", default 64, current 64

[1] found control 0x00980903, "Hue", range -40,40

[1] "Hue", default 0, current 0

[1] found control 0x00980910, "Gamma", range 72,500

[1] "Gamma", default 100, current 100

[1] mmap information:

[1] frames=4

[1] 0 length=153600

[1] 1 length=153600

[1] 2 length=153600

[1] 3 length=153600

[1] Using V4L2

[1] Resizing pre_capture buffer to 1 items

[1] Started stream webcam server in port 8081

Now my Motion works perfectly. I'm very happy with it.

Regards

Hernâni

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.