View previous topic :: View next topic |
Author |
Message |
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Thu Jun 08, 2017 6:46 pm Post subject: laptop webcam not working |
|
|
my laptop has a built-in webcam on top of the screen. i used to use it a while ago, but not recently. today i wanted to use it, but found that i can't.
Code: | $ luvcview
luvcview 0.2.6
SDL information:
Video driver: x11
A window manager is available
Device information:
Device path: /dev/video0
ERROR opening V4L interface: No such file or directory |
Code: | $ ls /dev/video*
ls: cannot access '/dev/video*': No such file or directory |
Code: | $ dmesg | grep -i video
[ 0.469737] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[ 11.633511] ACPI: Video Device [OVGA] (multi-head: yes rom: no post: no)
[ 11.648102] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input9
[ 123.164140] Linux video capture interface: v2.00
[ 123.194218] usbcore: registered new interface driver uvcvideo
[ 123.194220] USB Video Class driver (1.1.1) |
Code: | $ lsmod | grep video
uvcvideo 65536 0
videobuf2_vmalloc 12288 1 uvcvideo
videobuf2_memops 12288 1 videobuf2_vmalloc
videobuf2_v4l2 16384 1 uvcvideo
videodev 98304 2 uvcvideo,videobuf2_v4l2
videobuf2_core 28672 2 uvcvideo,videobuf2_v4l2
usbcore 135168 4 uvcvideo,ehci_hcd,uhci_hcd,ehci_pci |
Code: | $ /usr/sbin/lspci
00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.3 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801IBM/IEM (ICH9M/ICH9M-E) 4 port SATA Controller [AHCI mode] (rev 03)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
03:00.0 Network controller: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express) (rev 01)
04:06.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)
04:06.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)
04:06.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)
04:06.3 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12) |
what am i missing? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54615 Location: 56N 3W
|
Posted: Thu Jun 08, 2017 7:25 pm Post subject: |
|
|
josephg,
You webcam must be a USB device. Show us your lsusb output please. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Thu Jun 08, 2017 7:41 pm Post subject: |
|
|
Jaglover wrote: | Do you have CONFIG_VIDEO_V4L2 enabled in kernel? |
Code: | CONFIG_VIDEO_V4L2=m |
Code: | $ lsmod | grep v4l2
videobuf2_v4l2 16384 1 uvcvideo
videodev 98304 2 uvcvideo,videobuf2_v4l2
videobuf2_core 28672 2 uvcvideo,videobuf2_v4l2 |
|
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Thu Jun 08, 2017 7:42 pm Post subject: |
|
|
NeddySeagoon wrote: | You webcam must be a USB device. Show us your lsusb output please. |
Code: | $ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub |
i have only 3 usb ports on this laptop, and lsusb reporting 8 root hubs.
Last edited by josephg on Thu Jun 08, 2017 8:12 pm; edited 1 time in total |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Thu Jun 08, 2017 7:55 pm Post subject: |
|
|
/proc/bus/input/devices: | I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input9
U: Uniq=
H: Handlers=kbd event7
B: PROP=0
B: EV=3
B: KEY=3e000b 0 0 0 0 0 0 0 |
Code: | $ xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=10 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=9 [slave keyboard (3)] |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54615 Location: 56N 3W
|
Posted: Thu Jun 08, 2017 8:00 pm Post subject: |
|
|
josephg,
It not on the USB bus either. Is it disabled in the BIOS or with Fn key sequence? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Thu Jun 08, 2017 8:10 pm Post subject: |
|
|
NeddySeagoon wrote: | It not on the USB bus either. Is it disabled in the BIOS or with Fn key sequence? |
i see no option in the bios or symbol on the fn keys.
i do see "video bus" mentions, as in my previous post. is that relevant? |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Thu Jun 08, 2017 9:58 pm Post subject: |
|
|
Code: | $ mpv tv://
Playing: tv://
[tv] Selected driver: v4l2
[tv] name: Video 4 Linux 2 input
[tv] unable to open '/dev/video0': No such file or directory
[tv] ioctl set mute failed: Bad file descriptor
[tv] 0 frames successfully processed, 0 frames dropped.
Failed to recognize file format.
Exiting... (Errors when loading file) |
who/what creates /dev/video0 and how? i suspect therein lies my problem.. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54615 Location: 56N 3W
|
Posted: Thu Jun 08, 2017 10:27 pm Post subject: |
|
|
josephg,
The kernel DEVTMPFS creates the /dev nodes when devices appear and removes them when they vanish.
udev fixes permissions when the devices appear.
If lspci or lsusb, the kernel cannot see the webcam.
That means the webcam is either faulty or disabled.
The driver is not required to read the vendor and device IDs.
What laptop do you have - make and model, so I can download the manual. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Thu Jun 08, 2017 10:29 pm Post subject: |
|
|
Device node is not created if the hardware is not found. Did you try to boot with SystemRescueCD? You need to figure out if this is the hardware or your Gentoo. Since it is not showing up in lsusb I'd think it is either disabled in hardware or plain dead.
Edit. Neddy beat me. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54615 Location: 56N 3W
|
Posted: Fri Jun 09, 2017 9:12 am Post subject: |
|
|
josephg,
It seems you have a Chicony webcam. The manual doesn't say anything about it but I could not find any description of the BIOS, nor any enable/disable soft keys.
A few straws to clutch at. Your kernel has
Code: | CONFIG_USB_EHCI_HCD=m
CONFIG_USB_UHCI_HCD=m | which are the correct drivers for your USB root hubs.
However they are built as modules. Dot they appear in lsmod?
If not, nothing USB will work until you modprobe them.
If they are both loaded, remove them both, (modprobe -r) then try one at a time and both together in both load orders.
That's four tests. Some systems are picky about module load order.
Your webcam driver Code: | CONFIG_USB_VIDEO_CLASS=m | is also a module.
The automagic kernel module loading should take care of loading all these thing as the hardware appears.
Is it listed in lsmod, if not modprobe it.
One possible thing that comes to mind is that you have made a mess of a kernel update and are running one kernel binary with modules built for another.
In such cases the modules will not load and there is a lot of noise in dmesg about it.
Pastebin the entire dmesg output after you have done the above. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Fri Jun 09, 2017 11:41 am Post subject: |
|
|
thanks again for persisting with me. i'm away for the weekend now.. back next week, when i can report back. _________________ "Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Wed Jun 14, 2017 10:04 am Post subject: |
|
|
NeddySeagoon wrote: | It seems you have a Chicony webcam. The manual doesn't say anything about it but I could not find any description of the BIOS, nor any enable/disable soft keys. |
i can find no chicony in the kernel config. do i need to enable something to have that option?
i don't see anything relevant in the bios config either, nor any soft keys.
NeddySeagoon wrote: | A few straws to clutch at. Your kernel has
Code: | CONFIG_USB_EHCI_HCD=m
CONFIG_USB_UHCI_HCD=m | which are the correct drivers for your USB root hubs.
However they are built as modules. Dot they appear in lsmod?
If not, nothing USB will work until you modprobe them. |
yes they appear in lsmod
Code: | $ lsmod | grep -E "ehci|uhci"
uhci_hcd 24576 0
ehci_pci 12288 0
ehci_hcd 45056 1 ehci_pci
usbcore 139264 3 ehci_hcd,uhci_hcd,ehci_pci |
NeddySeagoon wrote: | If they are both loaded, remove them both, (modprobe -r) then try one at a time and both together in both load orders.
That's four tests. Some systems are picky about module load order. |
it seems my system may be picky. i can't remove ehci_hcd on it's own. removing uhci_hcd removes both. but i can load ehci_hcd on it's own. loading uhci_hcd loads both.
Code: | # modprobe -r ehci_hcd
modprobe: FATAL: Module ehci_hcd is in use.
# modprobe -r uhci_hcd
# lsmod | grep -E "ehci|uhci"
# modprobe ehci_hcd
# lsmod | grep -E "ehci|uhci"
ehci_hcd 45056 0
usbcore 139264 1 ehci_hcd
# modprobe -r ehci_hcd
# modprobe uhci_hcd
# lsmod | grep -E "ehci|uhci"
uhci_hcd 24576 0
ehci_pci 12288 0
ehci_hcd 45056 1 ehci_pci
usbcore 139264 3 ehci_hcd,uhci_hcd,ehci_pci
# modprobe -r uhci_hcd
# lsmod | grep -E "ehci|uhci"
# modprobe ehci_hcd
# lsmod | grep -E "ehci|uhci"
ehci_hcd 45056 0
usbcore 139264 1 ehci_hcd
# modprobe uhci_hcd
# lsmod | grep -E "ehci|uhci"
uhci_hcd 24576 0
ehci_pci 12288 0
ehci_hcd 45056 1 ehci_pci
usbcore 139264 3 ehci_hcd,uhci_hcd,ehci_pci |
did i do all four combinations?
NeddySeagoon wrote: | Your webcam driver Code: | CONFIG_USB_VIDEO_CLASS=m | is also a module.
The automagic kernel module loading should take care of loading all these thing as the hardware appears.
Is it listed in lsmod, if not modprobe it. |
uvcvideo is not listed in lsmod. automagic is not loading it. i can modprobe it when i want to use webcam.
Code: | # lsmod | grep uvcvideo
a300-2c2 jgv.gentoo32 # modprobe uvcvideo
a300-2c2 jgv.gentoo32 # lsmod | grep uvcvideo
uvcvideo 65536 0
videobuf2_vmalloc 12288 1 uvcvideo
videobuf2_v4l2 16384 1 uvcvideo
videodev 94208 2 uvcvideo,videobuf2_v4l2
videobuf2_core 28672 2 uvcvideo,videobuf2_v4l2
usbcore 139264 4 uvcvideo,ehci_hcd,uhci_hcd,ehci_pci |
Code: | $ luvcview
luvcview 0.2.6
SDL information:
Video driver: x11
A window manager is available
Device information:
Device path: /dev/video0
ERROR opening V4L interface: No such file or directory |
NeddySeagoon wrote: | One possible thing that comes to mind is that you have made a mess of a kernel update and are running one kernel binary with modules built for another.
In such cases the modules will not load and there is a lot of noise in dmesg about it.
Pastebin the entire dmesg output after you have done the above. |
i have recompiled 4.9.16-gentoo many times over. how would i know if the current build didn't wipe out and recreate all the modules again? and what could i do to ensure it does? i always do
Code: | # make && make modules_install && make install |
my dmesg after your four tests followed by modprobe uvcvideo
i don't have any /dev/video*. how critical is /dev/video0? while researching, i saw some saying it is not needed now. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54615 Location: 56N 3W
|
Posted: Wed Jun 14, 2017 10:32 am Post subject: |
|
|
josephg,
/dev/video0 or /dev/video/0 is created by the kernel when it spots a video capture device.
udev may then change the permissions.
Its essential. Its the interface between the kernel and userspace for the device.
Your video applications read a stream of characters from it to get the video data.
Device nodes are not created until the devices are detected.
That's done by reading the vendor and device IDs from the devices.
You can use mknod to create the /dev/video0 character device, with major number 81, minor number 0 but it won't help.
There will be nothing behind it in the kernel.
Everything looks OK - it just doesn't work.
I would be interested in your links that suggest that the /dev node is no longer required. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Wed Jun 14, 2017 11:49 am Post subject: |
|
|
NeddySeagoon wrote: | /dev/video0 or /dev/video/0 is created by the kernel when it spots a video capture device.
udev may then change the permissions.
Its essential. Its the interface between the kernel and userspace for the device.
Your video applications read a stream of characters from it to get the video data. |
thank you. that's what i thought too. so no luck for me till /dev/video* gets created.
NeddySeagoon wrote: | Device nodes are not created until the devices are detected.
That's done by reading the vendor and device IDs from the devices.
You can use mknod to create the /dev/video0 character device, with major number 81, minor number 0 but it won't help.
There will be nothing behind it in the kernel. |
and so i did. and you're right.
Code: | # mknod /dev/video0 c 81 0 |
i had to change permissions
Code: | $ luvcview
luvcview 0.2.6
SDL information:
Video driver: x11
A window manager is available
Device information:
Device path: /dev/video0
ERROR opening V4L interface: No such device or address |
NeddySeagoon wrote: | Everything looks OK - it just doesn't work. |
NeddySeagoon wrote: | I would be interested in your links that suggest that the /dev node is no longer required. |
i'll search for them again. i thought i saw something like that few weeks ago. as you say above, i must be mistaken. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54615 Location: 56N 3W
|
Posted: Wed Jun 14, 2017 12:21 pm Post subject: |
|
|
josephg wrote: |
NeddySeagoon wrote: | Everything looks OK - it just doesn't work. |
:(
NeddySeagoon wrote: | I would be interested in your links that suggest that the /dev node is no longer required. |
i'll search for them again. i thought i saw something like that few weeks ago. as you say above, i must be mistaken. |
Not at all. Things do change. For example. USB printers were always connected to /dev/usb... something using the kernel option Code: | < > USB Printer support |
For a long time now there has been libusb support for printers, so there is a choice.
The kernel module usblp or libusb. Choosing both is a bad thing.
Its therefore quite possible that the device node is no longer required, as with USB printer support.
However, the devices will still show up in lsusb. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Wed Jun 14, 2017 9:15 pm Post subject: |
|
|
i'm pretty sure my webcam was working in the past as i used to skype with video and remember a blue light coming on too. i don't do video chats anymore.. not in the past year i think.
i fired up ubuntu (usually includes everything under the sun) on another subvolume and i don't have /dev/video0 on that either guess i should reconcile myself with a possibly kaput hardware. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54615 Location: 56N 3W
|
Posted: Wed Jun 14, 2017 9:33 pm Post subject: |
|
|
josephg,
Its rarely that hardware fails so that it falls off the bus.
Its certainly possible.
Webcam lights are usually white rather than blue - they illuminate your face.
My money is on the webcam being disabled somehow. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Wed Jun 14, 2017 10:03 pm Post subject: |
|
|
NeddySeagoon wrote: | My money is on the webcam being disabled somehow. |
you must be my guardian angel, NeddySeagoon you continue to motivate me to not give up!
i must confess that i have wanted to disable webcam previously, and had blacklisted uvcvideo in /etc/modprobe.d for the past year or so. it used to automatically fire up webcam when i didn't want to on facebook, google, skype, etc.
if you wanted to disable the webcam device, how would you do so? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54615 Location: 56N 3W
|
Posted: Wed Jun 14, 2017 10:31 pm Post subject: |
|
|
josephg,
Its often in the BIOS. The webcam wants 500mA from the USB bus. Thats 2.5W. Its a lot of battery life, so its difficult to believe it can't be disabled.
The webcam will come with a Mic. Does that work?
To the kernel, they are two separate devices, it just happens that they are often used/controlled together.
If both the mic and webcam don't work, I bet a bacon buttie that they are disabled. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Wed Jun 14, 2017 11:00 pm Post subject: |
|
|
the integrated mic works. no idea if it's part of webcam. |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
|
Back to top |
|
|
|