Camera -(Asus Laptop)- DMESG - Random times - XHCI - Controller

I installed nixOS recently but noticed that pre-installed cheese webcam application sometimes shows No devices found but sometimes it just works, I not know any workaround to resolve this…

My first idea would be to check dmesg for issues with the driver.

1 Like

webcam working in this login session.

Interestingly, i Noticed Even Night_light of gnome also worked just like webcam after second shutdown

More hardware information might be worthwhile. Then you could check if your webcam has some trouble on Linux generally.

i tried all unix-like, linux i.e debian, fedora, arch… never camera errors or maybe i not checked camera on every distro…

thanks … i will try debugging using your imp. suggestion. :relieved:

also check the output of dmesg when it is not working

when camera works… Only 2 red lines so far in dmesg(diagnostic message)…

  1. Failed to set apst feature
  2. Plymouth-quit.service
    But when not working state of camera … 1 new red error in dmesg
    xchi_hcd… XHCI Controller not responding, assume dead
    Hc died; cleaning up

xchi_hcd… XHCI Controller not responding … Random times- port get blockage … as per googled

For any hint why this happening on my system…

  1. Using tlp for power management
  2. system-d timer
  3. gnome(maybe conflicts)

[ 2343.093520] PM: suspend entry (deep)
[ 2343.099309] Filesystems sync: 0.005 seconds
[ 2343.152599] Freezing user space processes
[ 2343.155355] Freezing user space processes completed (elapsed 0.002 seconds)
[ 2343.155363] OOM killer disabled.
[ 2343.155365] Freezing remaining freezable tasks
[ 2343.156518] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[ 2343.156563] printk: Suspending console(s) (use no_console_suspend to debug)
[ 2343.219013] amdgpu 0000:03:00.0: amdgpu: free PSP TMR buffer
[ 2344.198108] ahci 0000:04:00.0: failed stop FIS RX (-16)


[ 2348.547525] xhci_hcd 0000:03:00.4: xHCI host not responding to stop endpoint command
[ 2348.547553] xhci_hcd 0000:03:00.4: xHCI host controller not responding, assume dead
[ 2348.547570] xhci_hcd 0000:03:00.4: HC died; cleaning up


[ 2348.549117] ACPI: EC: interrupt blocked
[ 2348.588522] ACPI: PM: Preparing to enter system sleep state S3
[ 2348.899981] ACPI: EC: event blocked
[ 2348.899987] ACPI: EC: EC stopped
[ 2348.899988] ACPI: PM: Saving platform NVS memory

Hardware name: ASUSTeK COMPUTER INC. VivoBook_ASUSLaptop X412DA_X412DA/X412DA, BIOS X412DA.316 10/08/2021

internal webcam is connected via USB (internally), xHCI is the interface

if this does not happen on other distro’s, try to use exactly the same kernel the other distro’s are using boot.kernelPackages

I not done tweaking like changing kernel before in config files… anyway :pray: thanks I plug the charger than switches on from now on… it not cause the internal-usb camera issue​:innocent:

interesting. Are you using something like ‘tlp’ to control power settings while in battery mode?
Could be that it cuts off power to the USB system

Yes
services.power-profiles-daemon.enable = false;

services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_BAT=“powersave”;
CPU_SCALING_GOVERNOR_ON_AC=“powersave”;

The following prevents the battery from charging fully to

preserve lifetime. Run tlp fullcharge to temporarily force

full charge.

https://linrunner.de/tlp/faq/battery.html#how-to-choose-good-battery-charge-thresholds

START_CHARGE_THRESH_BAT0=78;
STOP_CHARGE_THRESH_BAT0=80;

100 being the maximum, limit the speed of my CPU to reduce

heat and increase battery usage:

CPU_MAX_PERF_ON_AC=75;
CPU_MAX_PERF_ON_BAT=60;
};
};