You are not logged in.

#26 2018-08-24 01:52:54

ComeTOValhllaWithMe
Member
Registered: 2018-08-17
Posts: 23

Re: Unable to use trackpad on asus fx504

Ok so I recompiled the kernel and trackpad seems to work now but I have to modify kernel parameter

systemd.unit=multi-user.target

as suggested by seth. That means everytime I boot I have to start lightdm manually. Is there any workaround for this? Also when kernel update comes do i have to repatch and recompile kernel everytime? Heres the output of git diff

diff --git a/drivers/pinctrl/intel/pinctrl-cannonlake.c b/drivers/pinctrl/intel/pinctrl-cannonlake.c
index 6243e7d95e7e..b294de0b661a 100644
--- a/drivers/pinctrl/intel/pinctrl-cannonlake.c
+++ b/drivers/pinctrl/intel/pinctrl-cannonlake.c
@@ -447,12 +447,8 @@ static const struct intel_function cnlh_functions[] = {
 static const struct intel_community cnlh_communities[] = {
 	CNL_COMMUNITY(0, 0, 50, cnlh_community0_gpps),
 	CNL_COMMUNITY(1, 51, 154, cnlh_community1_gpps),
-	/*
-	 * ACPI MMIO resources are returned in reverse order for
-	 * communities 3 and 4.
-	 */
-	CNL_COMMUNITY(3, 155, 248, cnlh_community3_gpps),
-	CNL_COMMUNITY(2, 249, 298, cnlh_community4_gpps),
+	CNL_COMMUNITY(2, 155, 248, cnlh_community3_gpps),
+	CNL_COMMUNITY(3, 249, 298, cnlh_community4_gpps),
 };
 
 static const struct intel_pinctrl_soc_data cnlh_soc_data = {
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 1e24a6b8a64e..d526cd0bedde 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -875,6 +875,34 @@ static int intel_gpio_to_pin(struct intel_pinctrl *pctrl, unsigned offset,
 	return -EINVAL;
 }
 
+static int intel_gpio_irq_reqres(struct irq_data *d)
+{
+	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
+	struct intel_pinctrl *pctrl = gpiochip_get_data(gc);
+	int pin;
+
+	pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), NULL, NULL);
+	if (pin >= 0) {
+		if (gpiochip_lock_as_irq(gc, pin)) {
+			dev_err(pctrl->dev, "unable to lock HW IRQ %d for IRQ\n",
+				pin);
+			return -EINVAL;
+		}
+	}
+	return 0;
+}
+
+static void intel_gpio_irq_relres(struct irq_data *d)
+{
+	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
+	struct intel_pinctrl *pctrl = gpiochip_get_data(gc);
+	int pin;
+
+	pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), NULL, NULL);
+	if (pin >= 0)
+		gpiochip_unlock_as_irq(gc, pin);
+}
+
 static void intel_gpio_irq_ack(struct irq_data *d)
 {
 	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
@@ -985,10 +1013,13 @@ static int intel_gpio_irq_type(struct irq_data *d, unsigned type)
 	 * cannot be used as IRQ because GPI_IS status bit will not be
 	 * updated by the host controller hardware.
 	 */
+#if 0
 	if (intel_pad_acpi_mode(pctrl, pin)) {
 		dev_warn(pctrl->dev, "pin %u cannot be used as IRQ\n", pin);
 		return -EPERM;
 	}
+#endif
+	dev_info(pctrl->dev, "pin %u for irq (hwirq=%ld)\n", pin, irqd_to_hwirq(d));
 
 	raw_spin_lock_irqsave(&pctrl->lock, flags);
 
@@ -1090,6 +1121,8 @@ static irqreturn_t intel_gpio_irq(int irq, void *data)
 
 static struct irq_chip intel_gpio_irqchip = {
 	.name = "intel-gpio",
+	.irq_request_resources = intel_gpio_irq_reqres,
+	.irq_release_resources = intel_gpio_irq_relres,
 	.irq_enable = intel_gpio_irq_enable,
 	.irq_ack = intel_gpio_irq_ack,
 	.irq_mask = intel_gpio_irq_mask,

Last edited by ComeTOValhllaWithMe (2018-08-24 02:04:34)

Offline

#27 2018-08-24 05:48:45

seth
Member
Registered: 2012-09-03
Posts: 51,323

Re: Unable to use trackpad on asus fx504

https://wiki.archlinux.org/index.php/Li … TTY_output ?

I would assume that some iteration of the patch will make it into the repo kernel (watch the bug).
Until then you could ignore the linux package in pacman.conf (since the kernel is pretty self-contained, you'll usually get away w/ partial updates here, just remember to un-ignore it at time.

Online

#28 2018-08-24 10:50:22

ComeTOValhllaWithMe
Member
Registered: 2018-08-17
Posts: 23

Re: Unable to use trackpad on asus fx504

That patch seems too be kind of buggy. Touchpad randomly disconnects(temporarily fixed by rmmod hid-multitouch && modprobe hid-multitouch) and tap to click doesn't work. Still great work. Thanks! Also I have already enabled

 [LightDM]
   logind-check-graphical=true

in lightdm config still it doesn't work. I think this problem is not related to lightdm because I'm not even able to get any tty session without setting

systemd.unit=multi-user.target

For some reason this problem occurs only on patched custom kernel not standard arch kernel. I also tried linux-ck and linux-pf kernels. In those cases too kernel hangs after reaching graphical target. Is it related to some systemd parameters that have to be enabled in pkgbuild before compilation?

Last edited by ComeTOValhllaWithMe (2018-08-24 11:05:38)

Offline

Board footer

Powered by FluxBB