Re: USB TrackPoint mouse non-functional with dock; works if direct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Josh Triplett <josh@xxxxxxxxxxxxxxxx> writes:
> On Mon, Dec 07, 2015 at 03:03:40PM -0600, Felipe Balbi wrote:
>> Josh Triplett <josh@xxxxxxxxxxxxxxxx> writes:
>> >> > Looking at the sysfs path for the input device as shown in dmesg,
>> >> > /sys/devices/pci0000\:00/0000\:00\:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2\:1.1/supports_autosuspend
>> >> > did say "1".  However, the device didn't actually appear to have
>> >> > autosuspend *enabled*.
>> >> >
>> >> > I'd appreciate any suggestions for how to debug this issue.
>> >> 
>> >> what does 'control' on the power directory show ?
>> > I don't have a file "control" in the power directory when plugged in through
>> > the dock.  The contents of all the files under power when plugged in via dock:
>> 
>> huh ???
>> 
>> > ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.1/0003:17EF:6009.002D/power/control <==
>> > auto
>> 
>> here's one enabling autosuspend
>> 
>> > ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.1/0003:17EF:6009.002D/power/control <==
>> > auto
>> 
>> and another, also enabling runtime pm. Change both of these from 'auto'
>> to 'on' and see if that helps.
>
> Copy/paste error; notice that both of those have the same path.

okay.

> The following files appear under the power directory when plugged in via
> the dock:

if those are not enabled, then the device doesn't have pm_runtime
callbacks, see:

int dpm_sysfs_add(struct device *dev)
{
	int rc;

	rc = sysfs_create_group(&dev->kobj, &pm_attr_group);
	if (rc)
		return rc;

	if (pm_runtime_callbacks_present(dev)) {
		rc = sysfs_merge_group(&dev->kobj, &pm_runtime_attr_group);
		if (rc)
			goto err_out;
	}
	if (device_can_wakeup(dev)) {
		rc = sysfs_merge_group(&dev->kobj, &pm_wakeup_attr_group);
		if (rc)
			goto err_runtime;
	}
	if (dev->power.set_latency_tolerance) {
		rc = sysfs_merge_group(&dev->kobj,
				       &pm_qos_latency_tolerance_attr_group);
		if (rc)
			goto err_wakeup;
	}
	return 0;

 err_wakeup:
	sysfs_unmerge_group(&dev->kobj, &pm_wakeup_attr_group);
 err_runtime:
	sysfs_unmerge_group(&dev->kobj, &pm_runtime_attr_group);
 err_out:
	sysfs_remove_group(&dev->kobj, &pm_attr_group);
	return rc;
}

It seems like usbcore always calls pm_runtime_no_callbacks() (which
makes pm_runtime_callbacks_present() above fail) for all interfaces, but
I can't seem to find where that's undone. Alan, any hints ?

> ~$ head /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/*
> ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/async <==
> enabled

enabled

> ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/runtime_active_kids <==
> 0
>
> ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/runtime_enabled <==
> enabled
>
> ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/runtime_status <==
> suspended
>
> ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/runtime_usage <==
> 0
>
>
> Notice that no file named "control" exists.
>
> By contrast, the following files appear under the power directory when
> plugged in directly:
>
> ~$ head /sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.1/0003:17EF:6009.0032/power/*
> ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.1/0003:17EF:6009.0032/power/async <==
> disabled

disabled :-)

see if setting the other case to disabled changes anything.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux