Bug 1045821

Summary: ACER Chromebook C720P: touchpad and touchscreen do not work
Product: [Fedora] Fedora Reporter: Yannick Defais <sevmek>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: a.j.delaney, alexey.brodkin, binarybana, bjoern, bkozdemb, bugzilla, dgallowa, dkline, dmitry.torokhov, gansalmon, green, gregjo, guillaumepoiriermorency, itamar, jcatfour, jonathan, kernel-maint, madhu.chinakonda, michele, mjw, mspadaru, mwp.junk, ngwoosh, pbrobinson, rxguy, sergiodj, sevmek, stuohey, wierdlmate, work.eric, xavier
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-3.17.1-300.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-01 16:33:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch the kernel to get the touchpad working (and provide zram as well)
none
patch the actual kernel to add support for touchpad and touchscreen (add ZRAM too)
none
My script to install all kernel modules for kernels >=3.13 on Fedora 20
none
Updated script for kernel 3.14.x - Version 8
none
Updated script to fix suspend for kernel 3.14.x - Version 9
none
Updated script for kernel 3.14.6: removed the patch for the suspend issue.
none
updated script for kernel 3.15.4
none
Update's Yannick's v11 script for ZRAM changes in 3.15
none
Version 13, install kernel-modules-extra as this is necessary for suspend, and at least the KDE spin does not provide it by default
none
Version 14 for kernels 3.15.x (fix a mistaken URL: master2fixed_revision)
none
lsmod from rawhide 3.17 w/ non-working touchpad
none
diff between lsmod in 3.15 (working touchpad) and 3.17 (no touchpad)
none
Modified v14 for kernel 3.16.x. Can't test touchscreen only have touchpad.
none
dmesg log output none

Description Yannick Defais 2013-12-22 10:05:35 UTC
Description of problem:
In a full F20 installation, touchpad does not work.

Patches has been provided upstream that solves the issue:
https://plus.google.com/+BensonLeung/posts/EJUSUudzHb3

I made a script to patch/compile the patched modules for the kernel/install them (it includes ZRAM as well...). See the attachment.

Version-Release number of selected component (if applicable):
$ uname -r
3.12.5-302.fc20.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Just start the laptop and try the touchpad.
2.
3.

Actual results:
nothing

Expected results:
Should work

Additional info:
Please backport the patches to the official kernel in F20.

Best regards,
Yannick

Comment 1 Yannick Defais 2013-12-22 10:06:47 UTC
Created attachment 840306 [details]
patch the kernel to get the touchpad working (and provide zram as well)

Comment 2 Yannick Defais 2013-12-22 10:47:30 UTC
Once you have the patched modules, make them load at startup:

Create the file "touchpad-acer-c720.modules" in /etc/sysconfig/modules/

#!/bin/sh

exec /sbin/modprobe chromeos_laptop >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-core >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-pci >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-platform >/dev/null 2>&1

Make it executable:

$ su -c 'chmod +x /etc/sysconfig/modules/touchpad-acer-c720.modules'

Comment 3 Yannick Defais 2013-12-25 22:14:48 UTC
Default configuration raise a usability issue: it can be pretty hard to move the pointer. This additional xorg configuration seems to fix this issue.

/etc/X11/xorg.conf.d/50-cros-touchpad.conf

Section "InputClass" 
    Identifier      "touchpad peppy cyapa" 
    MatchIsTouchpad "on" 
    MatchDevicePath "/dev/input/event*" 
    MatchProduct    "cyapa" 
    Option          "FingerLow" "10" 
    Option          "FingerHigh" "10" 
EndSection

Comment 5 Yannick Defais 2013-12-30 10:55:02 UTC
Using this page https://plus.google.com/114358706658341629084/posts/Q9B4DiqWZ5E
I've modified my script to include a working driver for the touchscreen.

It modifies in the kernel tree :
drivers/input/touchscreen/atmel_mxt_ts.ko
drivers/platform/x86/chromeos_laptop.ko

using those patched versions:
# fetch the chromeos_laptop and atmel maxtouch source code
# Copy made from chromium.googlesource.com chromeos-3.8 branch
# https://chromium.googlesource.com/chromiumos/third_party/kernel-next/+/refs/heads/chromeos-3.8
wget https://googledrive.com/host/0BxMvXgjEztvAbEdYM1o0ck5rOVE --output-document=patch_atmel_mxt_ts.c
wget https://googledrive.com/host/0BxMvXgjEztvAdVBjQUljYWtiR2c --output-document=patch_chromeos_laptop.c

# copy source files into kernel tree replacing existing Ubuntu source
cp ./patch_atmel_mxt_ts.c drivers/input/touchscreen/atmel_mxt_ts.c
cp ./patch_chromeos_laptop.c drivers/platform/x86/chromeos_laptop.c

I'll attach the new script version.

Now the touchscreen works too.

Comment 6 Yannick Defais 2013-12-30 10:58:59 UTC
Created attachment 843339 [details]
patch the actual kernel to add support for touchpad and touchscreen (add ZRAM too)

After the script, create "touchpad-acer-c720.modules" in /etc/sysconfig/modules/

#!/bin/sh

exec /sbin/modprobe chromeos_laptop >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-core >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-pci >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-platform >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-platform >/dev/null 2>&1
exec /sbin/modprobe atmel_mxt_ts >/dev/null 2>&1

Make it runable :
$ su -c 'chmod +x /etc/sysconfig/modules/touchpad-acer-c720.modules'

Additional config for the touchpad (unless there is a usability issue):
/etc/X11/xorg.conf.d/50-cros-touchpad.conf

Section "InputClass" 
    Identifier      "touchpad peppy cyapa" 
    MatchIsTouchpad "on" 
    MatchDevicePath "/dev/input/event*" 
    MatchProduct    "cyapa" 
    Option          "FingerLow" "10" 
    Option          "FingerHigh" "10" 
EndSection

Comment 7 Oleg Drokin 2014-01-04 22:30:00 UTC
Yannick: note that in your modules loading script the first exec modprobe will preempt the script and all other modprobe commands would not be attempted.

Additionally the kernel update script is a bit contradictory.
First it downloads a bunch of patches and applies them (the for loop) and then you download 3.8 versions of files from chromeos kernel (According to the kernel) and overwrite the patched files back to the state where c720 is not known to the kernel.

Overall result is such that by following your steps touchpad still does not work at least on my acer c720.

Comment 8 Oleg Drokin 2014-01-04 23:31:20 UTC
After removing the spurious copy of 3.8 source it seems my touchpad does work, btw.

Comment 9 Yannick Defais 2014-01-05 09:09:23 UTC
Oleg,

About the modprobe script, I do not know what's wrong with it, it's beyond my skills... AFAIK I've all the needed modules loaded:
$ lsmod | grep i2c
i2c_i801               18135  0 
i2c_designware_pci     13135  0 
i2c_designware_core    14275  1 i2c_designware_pci
i2c_algo_bit           13257  1 i915
i2c_core               38302  10 drm,i2c_designware_pci,i915,i2c_i801,cyapa,drm_kms_helper,atmel_mxt_ts,i2c_algo_bit,chromeos_laptop,videodev
$ lsmod | grep atmel
atmel_mxt_ts           36926  0 
i2c_core               38302  10 drm,i2c_designware_pci,i915,i2c_i801,cyapa,drm_kms_helper,atmel_mxt_ts,i2c_algo_bit,chromeos_laptop,videodev
$ lsmod | grep chromeos
chromeos_laptop        14835  0 
i2c_core               38302  10 drm,i2c_designware_pci,i915,i2c_i801,cyapa,drm_kms_helper,atmel_mxt_ts,i2c_algo_bit,chromeos_laptop,videodev

If you have the C720 (no touchscreen), the script in the comment 1 should be enough ; it does not replace the chromeos file and do not add the atmel module (for the touchscreen). This additional step was necessary to get the touchscreen work on the C720P (which has a touchscreen).

It's weird to my you have a 3.8 kernel version, on F20 i've 3.12 atm...

Thank you a lot for trying and report here !

Comment 10 Yannick Defais 2014-01-05 09:13:53 UTC
Oops, my bad, I now understand the 3.8 stuff : you were refering to the patch for the chromeos module. Well, it works here...

My hope is the relevant part of this file will be pushed upstream/or backported by fedora and we will avoid messing with the source like that.

Comment 11 Yannick Defais 2014-01-05 10:06:24 UTC
Just a link for the bug report, and a FIX, I made about suspend to disk when closing the lid or pressing the power button on the keyboard for the Acer C720P:
https://bugzilla.redhat.com/show_bug.cgi?id=1048569

Comment 12 Oleg Drokin 2014-01-05 16:17:07 UTC
The modules are still loaded because the first chrome_laptop load does a request module and the rest are obtained via dependencies.
(btw need to run depmod after modules install).

But overall all of the underlying code changes in 3.13 kernel based on my cursory look, they split chromebook from x86 platform in there and did some various other reorganizations.

Additionally I think what really needs to be done here is not a script that replaces modules like this, but just an updated fedora kernel spec file with a few extra patches so that entire kernel could be built and installed properly.

Comment 13 Yannick Defais 2014-02-18 11:09:17 UTC
With the latest kernel on Fedora 20, the module for touchscreen I take from google fails at compiling with error.
$ uname -r
3.13.3-201.fc20.x86_64

With the previous kernels (3.12 serie) this patching method worked.

This is how I patch the kernel tree in a bash script:
wget https://googledrive.com/host/0BxMvXgjEztvAbEdYM1o0ck5rOVE --output-document=patch_atmel_mxt_ts.c
cp ./patch_atmel_mxt_ts.c drivers/input/touchscreen/atmel_mxt_ts.c
cd drivers/input/touchscreen/
mv Makefile Makefile.orig
echo 'KERNELVERSION = '$archkernver'
obj-m := atmel_mxt_ts.o

KDIR  := /lib/modules/$(shell uname -r)/build
PWD   := $(shell pwd)

default:
	$(MAKE) -C $(KDIR) M=$(PWD) modules' > Makefile
make -C /lib/modules/$archkernver/build M=$PWD modules

Result with 3.13.3-201.fc20.x86_64:
  CC [M]  /home/yannick/rpmbuild/BUILD/kernel-3.13.fc20/linux-3.13.3-201.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.o
/home/yannick/rpmbuild/BUILD/kernel-3.13.fc20/linux-3.13.3-201.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c: In function ‘mxt_enter_bl’:
/home/yannick/rpmbuild/BUILD/kernel-3.13.fc20/linux-3.13.3-201.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1114:2: erreur: implicit declaration of function ‘INIT_COMPLETION’ [-Werror=implicit-function-declaration]
  INIT_COMPLETION(data->bl_completion);
  ^
cc1: some warnings being treated as errors
make[1]: *** [/home/yannick/rpmbuild/BUILD/kernel-3.13.fc20/linux-3.13.3-201.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.o] Erreur 1
make: *** [_module_/home/yannick/rpmbuild/BUILD/kernel-3.13.fc20/linux-3.13.3-201.fc20.x86_64/drivers/input/touchscreen] Erreur 2
make: on quitte le répertoire « /usr/src/kernels/3.13.3-201.fc20.x86_64 »

I'm unable to fix this... Please help.

Comment 14 Yannick Defais 2014-02-18 17:28:00 UTC
Using the magic of "STFW" I blindly applied what I saw other have done:
wget https://googledrive.com/host/0BxMvXgjEztvAbEdYM1o0ck5rOVE --output-document=patch_atmel_mxt_ts.c
# Fix for kernel >=3.13
sed -i -e "s/INIT_COMPLETION(/reinit_completion(\&/g" patch_atmel_mxt_ts.c

This fix the compilation and I now have the touchscreen working on kernel 3.13.x

Comment 15 Yannick Defais 2014-02-18 17:33:36 UTC
Created attachment 864654 [details]
My script to install all kernel modules for kernels >=3.13 on Fedora 20

updated script for kernels >= 3.13.x

Comment 16 David Galloway 2014-03-07 11:40:39 UTC
(In reply to Yannick Defais from comment #15)
> Created attachment 864654 [details]
> My script to install all kernel modules for kernels >=3.13 on Fedora 20
> 
> updated script for kernels >= 3.13.x

Just wanted to say "thank you" and confirm the script does enable touchpad and touchscreen after compiling the modules and rebooting on my C720p.

Comment 17 Aidan Delaney 2014-03-20 10:18:00 UTC
Would it be possible to get these patches into the stock Fedora kernel?

Comment 18 Xavier Bachelot 2014-03-20 15:13:25 UTC
(In reply to Aidan Delaney from comment #17)
> Would it be possible to get these patches into the stock Fedora kernel?

While I'd welcome to have a patched kernel for the C720 as it would ease usage of the one I own, I don't believe this will happen until the patches are in upstream kernel, as that would be a burden for the Fedora kernel's maintainers. 

As noted in comment 4, the patches are in patchwork, but I don't know what is needed to get them from there to mainline kernel. Probably asking nicely the maintainers of these parts of the kernel, but I'm not sure who they are. I would have expected the people from chromium.org to be more proactive in pushing their patches upstream.

Comment 19 Yannick Defais 2014-04-17 10:28:43 UTC
Hi,

I saw an increasing amount of blogs trying to install fedora 20 on the acer c720(p).

I made a thread including a lot of configuration to have almost everything covered, unfortunately in french. Here is an automatic translation:
http://translate.google.com/translate?sl=fr&tl=en&js=y&prev=_t&hl=fr&ie=UTF-8&u=http%3A%2F%2Fforums.fedora-fr.org%2Fviewtopic.php%3Fid%3D61252&edit-text=

The translation tool breaks the included scripts, thus make sure to copy those from the original thread here (in french):
http://forums.fedora-fr.org/viewtopic.php?id=61252

You'll certainly find those additional stuff useful.

Comment 20 Yannick Defais 2014-05-03 13:56:06 UTC
Created attachment 892143 [details]
Updated script for kernel 3.14.x - Version 8

Comment 21 Yannick Defais 2014-05-03 13:58:13 UTC
I added a new version of the install script for kernel 3.14.x
So far I've just tested touchscreen and touchpad. There has been some change in zram as it is not in staging anymore...

Comment 22 Yannick Defais 2014-05-04 23:18:02 UTC
Suspend is broken with 3.14.x

I'll work on it when I'll find time.
It seems there is a workaround here:
https://bbs.archlinux.org/viewtopic.php?pid=1411695#p1411695

Comment 23 Yannick Defais 2014-05-11 12:40:43 UTC
Created attachment 894420 [details]
Updated script to fix suspend for kernel 3.14.x - Version 9

Comment 24 Yannick Defais 2014-05-11 12:43:06 UTC
The above script fix suspend which is broken for kernel 3.14.x (tested on .2 and .3)

I opened a new bug report for this particular issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1096511

You should also add some options to grub:
in /etc/default/grub, add:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash tpm_tis.force=1 tpm_tis.interrupts=0"

Update grub:

# grub2-mkconfig -o /boot/grub2/grub.cfg

"tpm_tis.interrupts=0" is the necessary part. As my spare time is rare, I've not tested removing the other options.

Comment 25 Justin M. Forbes 2014-05-21 19:39:21 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 20 kernel bugs.

Fedora 20 has now been rebased to 3.14.4-200.fc20.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you experience different issues, please open a new bug report for those.

Comment 26 Yannick Defais 2014-05-21 20:28:54 UTC
This issue has not been resolved and is still present with kernel 3.14.4-200.fc20.x86_64

Comment 27 Yannick Defais 2014-06-12 18:59:46 UTC
Created attachment 908261 [details]
Updated script for kernel 3.14.6: removed the patch for the suspend issue.

Upstream kernel 3.14.6 has a fix for the suspend issue, thus I removed this particular patch from the script. At least a good news!

Comment 28 Dave Kline 2014-07-11 18:01:53 UTC
Since Fedora released kernel 3.15.x the script no longer works for me:

Excerpt attempting to patch 3.15.4-200:
....
patching file drivers/i2c/busses/i2c-designware-pcidrv.c
Hunk #1 FAILED at 54.
Hunk #2 succeeded at 168 with fuzz 2 (offset 36 lines).
Hunk #3 FAILED at 335.
2 out of 3 hunks FAILED -- saving rejects to file drivers/i2c/busses/i2c-designware-pcidrv.c.rej

Comment 29 Yannick Defais 2014-07-11 22:55:59 UTC
Created attachment 917452 [details]
updated script for kernel 3.15.4

Comment 30 Yannick Defais 2014-07-11 22:57:05 UTC
(In reply to Dave Kline from comment #28)
> Since Fedora released kernel 3.15.x the script no longer works for me:
> 
> Excerpt attempting to patch 3.15.4-200:
> ....
> patching file drivers/i2c/busses/i2c-designware-pcidrv.c
> Hunk #1 FAILED at 54.
> Hunk #2 succeeded at 168 with fuzz 2 (offset 36 lines).
> Hunk #3 FAILED at 335.
> 2 out of 3 hunks FAILED -- saving rejects to file
> drivers/i2c/busses/i2c-designware-pcidrv.c.rej

Thank you Dave!
The above script should work for kernel 3.15.4.

Best regards.

Comment 31 Dave Kline 2014-07-12 12:48:45 UTC
Yannick: v11 works well.  Thank you!

Comment 32 Jason Knight 2014-07-14 04:24:58 UTC
Created attachment 917673 [details]
Update's Yannick's v11 script for ZRAM changes in 3.15

I've modified Yannick's v11 script (Thanks again Yannick!) to get ZRAM working in 3.15 and building the optional lz4 compression backend.

Comment 33 Yannick Defais 2014-07-17 07:35:46 UTC
Created attachment 918624 [details]
Version 13, install kernel-modules-extra as this is necessary for suspend, and at least the KDE spin does not provide it by default

Comment 34 Yannick Defais 2014-07-17 07:37:16 UTC
(In reply to Jason Knight from comment #32)
> Created attachment 917673 [details]
> Update's Yannick's v11 script for ZRAM changes in 3.15
> 
> I've modified Yannick's v11 script (Thanks again Yannick!) to get ZRAM
> working in 3.15 and building the optional lz4 compression backend.

Thank you! Included in the scripts I will propose.

Comment 35 jcatfour 2014-07-29 15:58:53 UTC
(In reply to Yannick Defais from comment #0)

For the Transaction summary, I keep getting this error:

Transaction check error:
  file /usr/share/man/man1/vim.1.gz from install of vim-common-2:7.4.179-1.fc20.x86_64 conflicts with file from package vim-minimal-2:7.4.027-2.fc20.x86_64

What can I do? I'm still somewhat new to fedora, and am by no means a linux guru, so I don't quite know how to handle this problem. I think I understand what it's saying, I just don't know how to resolve it...

Comment 36 Jason Knight 2014-07-29 16:52:50 UTC
(In reply to jcatfour from comment #35)

This is really unrelated to the script. Typically this is due to a yum package inconsistency. I've had luck resolving these with either a 'sudo yum update' or changing all instances of yum to dnf which seems to handle these conflicts more gracefully.

Comment 37 Yannick Defais 2014-07-29 18:32:53 UTC
(In reply to jcatfour from comment #35)
> (In reply to Yannick Defais from comment #0)
> 
> For the Transaction summary, I keep getting this error:
> 
> Transaction check error:
>   file /usr/share/man/man1/vim.1.gz from install of
> vim-common-2:7.4.179-1.fc20.x86_64 conflicts with file from package
> vim-minimal-2:7.4.027-2.fc20.x86_64
> 
> What can I do? I'm still somewhat new to fedora, and am by no means a linux
> guru, so I don't quite know how to handle this problem. I think I understand
> what it's saying, I just don't know how to resolve it...

Seems you steped into this:
http://unix.stackexchange.com/questions/119310/transaction-check-error-in-installing-vim

Try this:
$ su -c 'yum remove vim-minimal'
$ su -c 'yum install vim'

Then you should good to go for the script.

Comment 38 jcatfour 2014-07-29 19:28:25 UTC
(In reply to Jason Knight from comment #36)
> (In reply to jcatfour from comment #35)
> 
> This is really unrelated to the script. Typically this is due to a yum
> package inconsistency. I've had luck resolving these with either a 'sudo yum
> update' or changing all instances of yum to dnf which seems to handle these
> conflicts more gracefully.

sudo yum update fixed the error, and the touchpad now MOSTLY works, however interestingly enough, clicking doesn't work; I can only move my cursor around and nothing more. 

wut

Comment 39 Yannick Defais 2014-07-29 22:57:21 UTC
(In reply to jcatfour from comment #38)
> (In reply to Jason Knight from comment #36)
> > (In reply to jcatfour from comment #35)
> > 
> > This is really unrelated to the script. Typically this is due to a yum
> > package inconsistency. I've had luck resolving these with either a 'sudo yum
> > update' or changing all instances of yum to dnf which seems to handle these
> > conflicts more gracefully.
> 
> sudo yum update fixed the error, and the touchpad now MOSTLY works, however
> interestingly enough, clicking doesn't work; I can only move my cursor
> around and nothing more. 
> 
> wut

If the script went to its end (until the "$ reboot" message), and you created the 2 files in comments #2 and #3, it should be ok. Be sure to use the script corresponding to your actual kernel:
$ uname -r
3.15.6-200.fc20.x86_64
I'm using kernel 3.15.6, thus I'll use version 13 of the script.

After that it depends on the configuration of the desktop you're using. e.g. I'm using Gnome and have tap-to-click activated, meaning I don't use the physical buttons. But physical buttons do work here.

Comment 40 jcatfour 2014-07-30 16:54:11 UTC
(In reply to Yannick Defais from comment #39)
> (In reply to jcatfour from comment #38)
> > (In reply to Jason Knight from comment #36)
> > > (In reply to jcatfour from comment #35)
> > > 
> > > This is really unrelated to the script. Typically this is due to a yum
> > > package inconsistency. I've had luck resolving these with either a 'sudo yum
> > > update' or changing all instances of yum to dnf which seems to handle these
> > > conflicts more gracefully.
> > 
> > sudo yum update fixed the error, and the touchpad now MOSTLY works, however
> > interestingly enough, clicking doesn't work; I can only move my cursor
> > around and nothing more. 
> > 
> > wut
> 
> If the script went to its end (until the "$ reboot" message), and you
> created the 2 files in comments #2 and #3, it should be ok. Be sure to use
> the script corresponding to your actual kernel:
> $ uname -r
> 3.15.6-200.fc20.x86_64
> I'm using kernel 3.15.6, thus I'll use version 13 of the script.
> 
> After that it depends on the configuration of the desktop you're using. e.g.
> I'm using Gnome and have tap-to-click activated, meaning I don't use the
> physical buttons. But physical buttons do work here.

Nevermind, the problem is fixed, however, using the touchpad is a little screwy... I think it's the multitouch features that keep acting out. The only "multitouch" feature, if you could call it that, that I want is the ability to click and drag. I find myself constantly switching workspaces and scrolling when I don't intend to! I'm using xfce, by the way.

Comment 41 jcatfour 2014-07-30 16:57:53 UTC
> Nevermind, the problem is fixed, however, using the touchpad is a little
> screwy... I think it's the multitouch features that keep acting out. The
> only "multitouch" feature, if you could call it that, that I want is the
> ability to click and drag. I find myself constantly switching workspaces and
> scrolling when I don't intend to! I'm using xfce, by the way.
 
*Sigh* Nevermind AGAIN, I think I just resolved my issue. Anyway, great job on the drivers, dude!

Comment 42 Yannick Defais 2014-08-11 12:00:48 UTC
Good news:
touchpad and touchscreen driver made it in Linux yesterday:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=58d08e3b2c2033354b91467da33deffa06360c28

It will be released in Linux 3.17

Comment 43 Yannick Defais 2014-08-11 12:08:45 UTC
And even the light sensor made it in the same commit! Sweet.

Comment 44 Guillaume Poirier-Morency 2014-08-12 13:36:42 UTC
There are still issues with the built-in microphone and the suspend function. I think we should open a new bug for each of these missing features.

Comment 45 Yannick Defais 2014-08-19 22:20:53 UTC
Created attachment 928540 [details]
Version 14 for kernels 3.15.x (fix a mistaken URL: master2fixed_revision)

I made a mistake in version 13 of the script: it pulls the master branch from a git repository which has since moved to kernel 3.16. With version 14 of the script, the URL is now fixed. This script apply to kernel 3.15.x

Comment 46 Guillaume Poirier-Morency 2014-08-21 03:26:34 UTC
3.17 in the rawhide repo still does not fix the touchpad issue.

Comment 47 Yannick Defais 2014-08-22 13:42:01 UTC
(In reply to Guillaume Poirier-Morency from comment #46)
> 3.17 in the rawhide repo still does not fix the touchpad issue.

Weird, did you check if the patch in comment 42 is in?

Comment 48 Guillaume Poirier-Morency 2014-08-22 16:50:04 UTC
I just cloned the kernel git repository and the commit is found in 3.17

git tag --contains 58d08e3b2c2033354b91467da33deffa06360c28

v3.17-rc1

I even removed the touchpad-acer-c720.modules as it should not be necessary anymore and it is still not working.

We should get this noticed by the kernel people before it get stable.

Comment 49 Jason Knight 2014-08-22 17:54:08 UTC
$ scripts/get_maintainer.pl -f drivers/platform/chrome/chromeos_laptop.c
Olof Johansson <olof> (maintainer:CHROME HARDWARE P...)

I pinged him through email (I hope I didn't break linux kernel protocol or anything). Let's see if he responds.

Comment 50 Olof Johansson 2014-08-24 18:16:00 UTC
This bug is long and vague in what it refers back for.

As far as I understand, it now probes the track pad and screen probes properly. Can someone give a fresh description of what the remaining issues are?

Comment 51 Jason Knight 2014-08-30 03:51:01 UTC
Sorry for the delay. I finally got around to testing 3.17 (from rawhide) on my own ACER C720 and I found that the touchpad was not working upon boot.

I'll attach the results of lsmod, and the version of the kernel was:
3.17.0-0.rc1.git3.2.fc22.1.x86_64 from the Fedora rawhide repository.

Comment 52 Jason Knight 2014-08-30 04:04:22 UTC
Created attachment 932840 [details]
lsmod from rawhide 3.17 w/ non-working touchpad

Comment 53 Jason Knight 2014-08-30 04:06:38 UTC
Created attachment 932841 [details]
diff between lsmod in 3.15 (working touchpad) and 3.17 (no touchpad)

Generated with diff  <(awk '{print $1}' GSP/misc/317kernelmodules_real.txt | sort) <(awk '{print $1}' GSP/misc/315kernelmodules.txt|sort) > GSP/misc/315_317_diff.txt

3.15 had modules added according to Yannick's patch script, and has working touchpad support.

Comment 54 Dmitry Torokhov 2014-08-31 19:04:42 UTC
(In reply to Olof Johansson from comment #50)
> This bug is long and vague in what it refers back for.
> 
> As far as I understand, it now probes the track pad and screen probes
> properly. Can someone give a fresh description of what the remaining issues
> are?

There are still bits in chromeos_laptop kernel module that are not in Fedora (need to check upstream), which means that there is no touchpad/touchscreen on Fedora by default:

insmod: ERROR: could not insert module /lib/modules/3.15.10-201.fc20.x86_64/kernel/drivers/platform/chrome/chromeos_laptop.ko: No such device

Comment 55 Eric Work 2014-09-10 08:50:11 UTC
Doesn't work with kernel-3.17.0-0.rc4.git0.1.fc22.x86_64.  I see the following errors in dmesg which may be related?

[  598.418550] find_i2c_adapter_num: i2c adapter i2c-designware-pci not found on system.
[  598.418556] find_i2c_adapter_num: i2c adapter i2c-designware-pci not found on system.
[  598.418559] find_i2c_adapter_num: i2c adapter i2c-designware-pci not found on system.
[  598.418566] platform chromeos_laptop: Driver chromeos_laptop requests probe deferral

Comment 56 Eric Work 2014-09-13 16:09:23 UTC
Some more changes will be needed for 3.16.2-200.fc20.x86_64.  See errors below while compiling the atmel_mxt_ts module.  Since I don't have a c720p I simply commented out line 92 so it doesn't replace the module source file and that worked for my needs.

  CC [M]  /home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.o
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c: In function ‘mxt_handle_pdata’:
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1247:9: error: ‘const struct mxt_platform_data’ has no member named ‘x_line’
    pdata->x_line);
         ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1249:9: error: ‘const struct mxt_platform_data’ has no member named ‘y_line’
    pdata->y_line);
         ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1253:9: error: ‘const struct mxt_platform_data’ has no member named ‘orient’
    pdata->orient);
         ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1257:25: error: ‘const struct mxt_platform_data’ has no member named ‘blen’
    MXT_TOUCH_BLEN, pdata->blen);
                         ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1261:27: error: ‘const struct mxt_platform_data’ has no member named ‘threshold’
    MXT_TOUCH_TCHTHR, pdata->threshold);
                           ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1265:32: error: ‘const struct mxt_platform_data’ has no member named ‘x_size’
    MXT_TOUCH_XRANGE_LSB, (pdata->x_size - 1) & 0xff);
                                ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1267:32: error: ‘const struct mxt_platform_data’ has no member named ‘x_size’
    MXT_TOUCH_XRANGE_MSB, (pdata->x_size - 1) >> 8);
                                ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1269:32: error: ‘const struct mxt_platform_data’ has no member named ‘y_size’
    MXT_TOUCH_YRANGE_LSB, (pdata->y_size - 1) & 0xff);
                                ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1271:32: error: ‘const struct mxt_platform_data’ has no member named ‘y_size’
    MXT_TOUCH_YRANGE_MSB, (pdata->y_size - 1) >> 8);
                                ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1274:11: error: ‘const struct mxt_platform_data’ has no member named ‘voltage’
  if (pdata->voltage) {
           ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1275:12: error: ‘const struct mxt_platform_data’ has no member named ‘voltage’
   if (pdata->voltage < MXT_VOLTAGE_DEFAULT) {
            ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1276:42: error: ‘const struct mxt_platform_data’ has no member named ‘voltage’
    voltage = (MXT_VOLTAGE_DEFAULT - pdata->voltage) /
                                          ^
/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.c:1280:20: error: ‘const struct mxt_platform_data’ has no member named ‘voltage’
    voltage = (pdata->voltage - MXT_VOLTAGE_DEFAULT) /
                    ^
make[1]: *** [/home/ework/rpmbuild/BUILD/kernel-3.16.fc20/linux-3.16.2-200.fc20.x86_64/drivers/input/touchscreen/atmel_mxt_ts.o] Error 1

Comment 57 Eric Work 2014-09-14 02:33:26 UTC
Created attachment 937274 [details]
Modified v14 for kernel 3.16.x.  Can't test touchscreen only have touchpad.

It turns out that the two downloaded files that are saved as patch_* in the root of the kernel source tree are not needed anymore for the touchpad at least.  I only have a c720 not a c720p so I have no idea if the touchscreen also works.  Without these files the installed modules still work as well as suspend (with the previous fixes for that).  I wonder if this means we are closer to getting the patches needed into the offical fedora kernel.

Comment 58 gregjo 2014-09-19 22:03:29 UTC
Thanks Eric. I want to add something that may help others.
I updated to the 3.16.x kernel, and ran the V14 script, which failed, of course. Then I found your V14a script. It ran, but the touchpad still wouldn't work after a reboot. So I completely removed /root/rpmbuild, then reran the V14a script. After a reboot, I was in working order again. So somehow the failure of the V14 script messed things up for me. I hope that's useful to anyone else struggling with it.

Comment 59 Sergio Durigan Junior 2014-09-22 16:12:38 UTC
Thanks for the incredible effort so far, guys :-).

I have followed the instructions on how to install Fedora on Acer C720P, and most things worked.  However, even after installing the necessary modules to make the touchpad work (I don't really want the touchscreen, so I left it off), I see some annoying behavior.  For example, sometimes (I still couldn't figure out *what* triggers that) the touchpad becomes very non-sensive, which makes it extremely hard to move and point to where you want.  As I said, I am not sure what causes it.  Have you experienced this as well?

I also could not get suspend to work yet, though that's a different issue...

Comment 60 Jason Knight 2014-09-22 16:17:26 UTC
Once in a blue moon I've had touchpad problems, but my suspicion is that it is a hardware problem with the edges of the plastic impinging on the sensor. Usually taking my fingers completely off the touchpad, flexing the case and trying again resolves any problems I've seen.

I also had some problems with suspend until I made sure that my kernel versions were all the same in the kernel-core kernel-modules-extra kernel-tools and kernel-devel packages. (See the output of rpm ql | grep kernel to check). I had tried installing 3.17 from rawhide which confused yum/dnf. 

HTH.

Comment 61 Sergio Durigan Junior 2014-09-22 17:54:25 UTC
Thanks, Jason.  What actually helped (so far) is the advice given in Comment 2.  But I've noticed that the plastic case is a bit problematic, so I will keep your advice in mind as well.

As for suspend, I will take a look at the versions I have installed.  Cheers.

Comment 62 Guillaume Poirier-Morency 2014-09-23 19:54:59 UTC
Created attachment 940593 [details]
dmesg log output

To complete Eric Work comment 55, I attach the my complete dmesg output. I run the 3.17.0-0.rc6.git0.1.fc22.x86_64 kernel.

Comment 63 Sergio Durigan Junior 2014-09-23 21:19:08 UTC
> I also had some problems with suspend until I made sure that my kernel
> versions were all the same in the kernel-core kernel-modules-extra
> kernel-tools and kernel-devel packages. (See the output of rpm ql | grep
> kernel to check). I had tried installing 3.17 from rawhide which confused
> yum/dnf. 

OK, I need to ask this :-).  I confirmed that everything is running on the same version here, as you suggested.  However, I cannot get suspend to work.  Do you have it working?  Are you providing a different Linux flag on the boot?  If it is needed, I will open a new bug for it (I don't want to hijack this one).

Comment 64 Jason Knight 2014-09-23 21:24:03 UTC
Yes, suspend is fully working for me. Unfortunately I should have taken better notes over all the little things I've done. One of them (following notes from [1]) is in my /etc/default/grub I have the last line as:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash tpm_tis.force=1 tpm.tis.interrupts=0"

I don't remember doing it myself, but maybe that could help?

[1] - https://wiki.archlinux.org/index.php/Chromebook#Fixing_suspend

Comment 65 Sergio Durigan Junior 2014-09-23 22:08:43 UTC
Thanks, Jason.  I can suspend it now, though it doesn't stay suspended for more than 2 seconds...  But I am trying to fix this other issue now.  Thanks!

Comment 66 Sergio Durigan Junior 2014-09-28 00:39:45 UTC
After some more time struggling with this, I managed to solve the suspend issue I had.  I also made a blog post about my experience configuring this machine: <http://blog.sergiodj.net/post/2014-09-26-fedora-on-acer-c720p/>.  I hope it can be useful for anyone trying to do the same.

Comment 67 Máté Wierdl 2014-10-01 18:28:19 UTC
The latest script (I followed Sergio"s blog) doesn't work on my system, which is a c720 without p.  What I mean is that neither the trackpad nor the suspend function works. 

As for the touchpad, nothing happens, though the script https://bugzilla.redhat.com/attachment.cgi?id=937274 linked to from sergio's blog exited without error.  I also have 

$ lsmod|grep i2c
i2c_i801               18146  0 
i2c_designware_pci     13100  0 
i2c_designware_platform    12979  0 
i2c_designware_core    14275  2 i2c_designware_pci,i2c_designware_platform
i2c_algo_bit           13257  1 i915
i2c_core               55486  9 drm,i2c_designware_pci,i915,i2c_i801,i2c_designware_platform,drm_kms_helper,i2c_algo_bit,v4l2_common,videodev

As for the suspend issue (sorry for posting here, but the bug was closed due to inactivity), right now I have (you can see the kernel version there)

$ dmesg |grep ehci
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.16.3-200.fc20.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet tpm_tis.interrupts=0 modprobe.blacklist=ehci_hcd,ehci_pci nmi_watchdog=0 quiet splash
[    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.16.3-200.fc20.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet tpm_tis.interrupts=0 modprobe.blacklist=ehci_hcd,ehci_pci nmi_watchdog=0 quiet splash
[    0.528819] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.528826] ehci-pci: EHCI PCI platform driver
[    0.528981] ehci-pci 0000:00:1d.0: EHCI Host Controller
[    0.529030] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 1
[    0.529044] ehci-pci 0000:00:1d.0: debug port 2
[    0.532946] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
[    0.532965] ehci-pci 0000:00:1d.0: irq 19, io mem 0xe051f800
[    0.538935] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[    0.539000] usb usb1: Manufacturer: Linux 3.16.3-200.fc20.x86_64 ehci_hcd
[    0.840919] usb 1-1: new high-speed USB device number 2 using ehci-pci


but after closing the lid and opening it, I get 

$ dmesg |tail
[  703.841548] ehci-pci 0000:00:1d.0: port 2 resume error -19
[  703.867540] ehci-pci 0000:00:1d.0: port 2 resume error -19
[  703.893537] ehci-pci 0000:00:1d.0: port 2 resume error -19
[  703.919506] ehci-pci 0000:00:1d.0: port 2 resume error -19
[  703.945529] ehci-pci 0000:00:1d.0: port 2 resume error -19
[  703.971525] ehci-pci 0000:00:1d.0: port 2 resume error -19
[  703.997521] ehci-pci 0000:00:1d.0: port 2 resume error -19
[  704.023514] ehci-pci 0000:00:1d.0: port 2 resume error -19
[  704.049514] ehci-pci 0000:00:1d.0: port 2 resume error -19
[  704.075430] ehci-pci 0000:00:1d.0: port 2 resume error -19

and the system will eventually hang.   I also have

$ cat /proc/acpi/wakeup 
Device	S-state	  Status   Sysfs node
TPAD	  S3	*disabled  platform:PNP0C0E:00
TSCR	  S3	*disabled  platform:PNP0C0E:01
HDEF	  S3	*disabled  pci:0000:00:1b.0
EHCI	  S3	*disabled  pci:0000:00:1d.0
XHCI	  S3	*enabled   pci:0000:00:14.0

I finally remark that when I close the lid for the second time, suspend doesn't work. 

Let me know what other data I should give.

Comment 68 Sergio Durigan Junior 2014-10-01 19:28:32 UTC
(In reply to Máté Wierdl from comment #67)
> The latest script (I followed Sergio"s blog) doesn't work on my system,
> which is a c720 without p.  What I mean is that neither the trackpad nor the
> suspend function works. 

Hi Máté,

Not sure if the procedure is the same for the model without "P".  Having said that...
 
> As for the touchpad, nothing happens, though the script
> https://bugzilla.redhat.com/attachment.cgi?id=937274 linked to from sergio's
> blog exited without error.  I also have 
> 
> $ lsmod|grep i2c
> i2c_i801               18146  0 
> i2c_designware_pci     13100  0 
> i2c_designware_platform    12979  0 
> i2c_designware_core    14275  2 i2c_designware_pci,i2c_designware_platform
> i2c_algo_bit           13257  1 i915
> i2c_core               55486  9
> drm,i2c_designware_pci,i915,i2c_i801,i2c_designware_platform,drm_kms_helper,
> i2c_algo_bit,v4l2_common,videodev

Are you running the same Linux as I am?  I mentioned the version in the blog post.

Also, I am not seeing the "cyapa" driver loaded.  I know this driver is necessary for the "P" model, and I suspect it is also necessary for the model without "P".

> As for the suspend issue (sorry for posting here, but the bug was closed due
> to inactivity), right now I have (you can see the kernel version there)
> 
> $ dmesg |grep ehci
> [    0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.16.3-200.fc20.x86_64
> root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap
> vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet
> tpm_tis.interrupts=0 modprobe.blacklist=ehci_hcd,ehci_pci nmi_watchdog=0
> quiet splash
> [    0.000000] Kernel command line:
> BOOT_IMAGE=/vmlinuz-3.16.3-200.fc20.x86_64 root=/dev/mapper/fedora-root ro
> rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root
> rhgb quiet tpm_tis.interrupts=0 modprobe.blacklist=ehci_hcd,ehci_pci
> nmi_watchdog=0 quiet splash
> [    0.528819] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    0.528826] ehci-pci: EHCI PCI platform driver
> [    0.528981] ehci-pci 0000:00:1d.0: EHCI Host Controller
> [    0.529030] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus
> number 1
> [    0.529044] ehci-pci 0000:00:1d.0: debug port 2
> [    0.532946] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
> [    0.532965] ehci-pci 0000:00:1d.0: irq 19, io mem 0xe051f800
> [    0.538935] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
> [    0.539000] usb usb1: Manufacturer: Linux 3.16.3-200.fc20.x86_64 ehci_hcd
> [    0.840919] usb 1-1: new high-speed USB device number 2 using ehci-pci
> 
> 
> but after closing the lid and opening it, I get 
> 
> $ dmesg |tail
> [  703.841548] ehci-pci 0000:00:1d.0: port 2 resume error -19
> [  703.867540] ehci-pci 0000:00:1d.0: port 2 resume error -19
> [  703.893537] ehci-pci 0000:00:1d.0: port 2 resume error -19
> [  703.919506] ehci-pci 0000:00:1d.0: port 2 resume error -19
> [  703.945529] ehci-pci 0000:00:1d.0: port 2 resume error -19
> [  703.971525] ehci-pci 0000:00:1d.0: port 2 resume error -19
> [  703.997521] ehci-pci 0000:00:1d.0: port 2 resume error -19
> [  704.023514] ehci-pci 0000:00:1d.0: port 2 resume error -19
> [  704.049514] ehci-pci 0000:00:1d.0: port 2 resume error -19
> [  704.075430] ehci-pci 0000:00:1d.0: port 2 resume error -19

Have you created the necessary scripts to unbind the EHCI bus?  I linked the Arch[GNU/]Linux post on my blog, but just in case: <https://bbs.archlinux.org/viewtopic.php?pid=1364521#p1364521>.  Those errors indicate that your EHCI is still bound when the system is resumed, and this is a known source of failures.

> and the system will eventually hang.   I also have
> 
> $ cat /proc/acpi/wakeup 
> Device	S-state	  Status   Sysfs node
> TPAD	  S3	*disabled  platform:PNP0C0E:00
> TSCR	  S3	*disabled  platform:PNP0C0E:01
> HDEF	  S3	*disabled  pci:0000:00:1b.0
> EHCI	  S3	*disabled  pci:0000:00:1d.0
> XHCI	  S3	*enabled   pci:0000:00:14.0

Strange, I also have "LID0" here, and it is enabled.  Anyway, I suspect that, for suspend/resume, the problem may be that you don't have the necessary scripts to unbind/bind EHCI.

Comment 69 Dave Kline 2014-10-01 19:44:32 UTC
I have a c720 and use the "14a" version of the script alone, with no other modifications. I cannot suspend properly, but the touchpad works just fine.

Comment 70 Máté Wierdl 2014-10-02 05:14:18 UTC
Hm, correct, I didn't have /usr/lib/systemd/system-sleep/cros-sound-suspend.sh, but now I do

# cat /usr/lib/systemd/system-sleep/cros-sound-suspend.sh
#!/bin/bash

case $1/$2 in
  pre/*)
    # Unbind ehci for preventing error 
    echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/unbind
    # Unbind snd_hda_intel for sound
    echo -n "0000:00:1b.0" | tee /sys/bus/pci/drivers/snd_hda_intel/unbind
    echo -n "0000:00:03.0" | tee /sys/bus/pci/drivers/snd_hda_intel/unbind
    ;;
  post/*)
    # Bind ehci for preventing error 
    echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/bind
    # bind snd_hda_intel for sound
    echo -n "0000:00:1b.0" | tee /sys/bus/pci/drivers/snd_hda_intel/bind
    echo -n "0000:00:03.0" | tee /sys/bus/pci/drivers/snd_hda_intel/bind
    ;;
esac

I also now load cyapa "by hand" 

# cat /etc/sysconfig/modules/touchpad-acer-c720.modules
#!/bin/sh

exec /sbin/modprobe cyapa >/dev/null 2>&1
exec /sbin/modprobe chromeos_laptop >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-core >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-pci >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-platform >/dev/null 2>&1

so 

# lsmod|grep i2c
i2c_i801               18146  0 
i2c_designware_pci     13100  0 
i2c_designware_platform    12979  0 
i2c_designware_core    14275  2 i2c_designware_pci,i2c_designware_platform
i2c_algo_bit           13257  1 i915
i2c_core               55486  10 drm,i2c_designware_pci,i915,i2c_i801,cyapa,i2c_designware_platform,drm_kms_helper,i2c_algo_bit,v4l2_common,videodev


Interestingly, suspend now works (even multiple times, so not just once).  On the other hand, touchpad doen't.  I have 

# uname -r
3.16.3-200.fc20.x86_64

while you had 3.16.3-201.  Could this be the problem?

Comment 71 Máté Wierdl 2014-10-02 11:25:26 UTC
Though in 

# cat /etc/sysconfig/modules/touchpad-acer-c720.modules
#!/bin/sh

exec /sbin/modprobe cyapa >/dev/null 2>&1
exec /sbin/modprobe chromeos_laptop >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-core >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-pci >/dev/null 2>&1
exec /sbin/modprobe i2c-designware-platform >/dev/null 2>&1

only the first line gets executed

Comment 72 Máté Wierdl 2014-10-04 00:42:12 UTC
Has anybody tried the latest 3.17 rc7 kernel to  see if it really supports the C720"s touchpad?  (Thanks for all your efforts!)

Comment 73 Sergio Durigan Junior 2014-10-04 01:26:34 UTC
(In reply to Máté Wierdl from comment #70)

> I also now load cyapa "by hand" 
> 
> # cat /etc/sysconfig/modules/touchpad-acer-c720.modules
> #!/bin/sh
> 
> exec /sbin/modprobe cyapa >/dev/null 2>&1
> exec /sbin/modprobe chromeos_laptop >/dev/null 2>&1
> exec /sbin/modprobe i2c-designware-core >/dev/null 2>&1
> exec /sbin/modprobe i2c-designware-pci >/dev/null 2>&1
> exec /sbin/modprobe i2c-designware-platform >/dev/null 2>&1

FWIW, I don't need to load any module by hand.  They all get loaded when I start the system.

> so 
> 
> # lsmod|grep i2c
> i2c_i801               18146  0 
> i2c_designware_pci     13100  0 
> i2c_designware_platform    12979  0 
> i2c_designware_core    14275  2 i2c_designware_pci,i2c_designware_platform
> i2c_algo_bit           13257  1 i915
> i2c_core               55486  10
> drm,i2c_designware_pci,i915,i2c_i801,cyapa,i2c_designware_platform,
> drm_kms_helper,i2c_algo_bit,v4l2_common,videodev
> 
> 
> Interestingly, suspend now works (even multiple times, so not just once). 

Nice!  One less problem :-).

> On the other hand, touchpad doen't.  I have 
> 
> # uname -r
> 3.16.3-200.fc20.x86_64
> 
> while you had 3.16.3-201.  Could this be the problem?

I actually have 3.16.2-201.

I don't know if it could be the cause, but it's possible.  By looking at the Fedora package, I see that only a few patches have been added/removed from 3.16.2-201 to 3.16.3-200, but I'm not sure about the Linux tar.xz itself (haven't investigated).

OTOH, since you haven't seen any problem when running the script, maybe that's not the issue.  What you can is to try to replicate the steps of the script by hand (shouldn't be hard) and see if you can get a more useful message or something like that...

Comment 74 Sergio Durigan Junior 2014-10-04 01:28:39 UTC
(In reply to Sergio Durigan Junior from comment #73)
> OTOH, since you haven't seen any problem when running the script, maybe
> that's not the issue.  What you can is to try to replicate the steps of the
> script by hand (shouldn't be hard) and see if you can get a more useful
> message or something like that...

Or, you could also downgrade your Linux package to 3.16.2-201, which is the same I'm using, and see if it works.  Just don't forget to comment here when you find something!  :-)

Comment 75 Máté Wierdl 2014-10-04 03:34:31 UTC
I can add this: I made a fresh install of Fedora 20, I then installed the latest kernel without any modification, and I have 

$ uname -r
3.17.0-0.rc7.git0.1.playground.fc22.x86_64
$ lsmod |grep -e i2c -e chr -e cyapa
cyapa                  13148  0 
chromeos_laptop        14304  0 
i2c_i801               18146  0 
i2c_designware_platform    12979  0 
i2c_designware_core    14275  1 i2c_designware_platform
i2c_algo_bit           13250  1 i915


but touchpad doesn't work.  The modules loaded automatically except I had to add cyapa manually (I have no idea what it does).

I"ll try now what you suggest.

Comment 76 Máté Wierdl 2014-10-05 14:28:16 UTC
No dice.  Could it because I'm using John Lewis custom coreboot?

https://johnlewis.ie/custom-chromebook-firmware/rom-download/

I remark that I was able to make the touchpad work perfectly by compiling the touchpad support into the kernel.

Comment 77 Sergio Durigan Junior 2014-10-05 15:57:48 UTC
(In reply to Máté Wierdl from comment #76)
> No dice.  Could it because I'm using John Lewis custom coreboot?
> 
> https://johnlewis.ie/custom-chromebook-firmware/rom-download/

Not sure.  As I wrote in my blog, I'm still using the default SeaBIOS.

> I remark that I was able to make the touchpad work perfectly by compiling
> the touchpad support into the kernel.

OK, so the problem was solved?

Comment 78 Máté Wierdl 2014-10-10 02:58:36 UTC
No. I made the touchpad work on ubuntu by compiling the support into the kernel (so not via i2c modules).  But on ubuntu couldn't make the suspend work at all.  So what I have is fedora with a 3.17 kernel, bbut touchpad isn't working.  John Lewis told me that the reason the 3.17 kernel still doesn't work is because it is compiled with the line 

# CONFIG_I2C_DESIGNWARE_PCI is not set

in the config file.  So this needs to be changed to 

CONFIG_I2C_DESIGNWARE_PCI=m

and build the kernel.  But perhaps I can get by with just building this module... Advice?

Comment 79 Máté Wierdl 2014-10-10 03:12:07 UTC
How does one reopen the bug 

https://bugzilla.redhat.com/show_bug.cgi?id=1048569

(Sry for asking here)

Comment 80 Máté Wierdl 2014-10-10 12:07:01 UTC
OK, so the script in the attachment https://bugzilla.redhat.com/attachment.cgi?id=937274 worked for the stock 3.16.3-200 kernel: touchpad works on c720 (no P, so no touch screen).  

For kernel guys: it applies patches 3074401 3074431 3074411, and the one at 

https://raw.githubusercontent.com/masmullin2000/arch-c720p/240e660602df3ea8de90fdfb4fe5a6d8cf953e92/i2c-designware-pcidrv.patch

I now have

# lsmod | grep -e i2c -e cyapa
cyapa                  13148  0 
regmap_i2c             13150  1 isl29018
i2c_i801               18146  0 
i2c_designware_pci     13100  0 
i2c_designware_platform    12979  0 
i2c_designware_core    14275  2 i2c_designware_pci,i2c_designware_platform
i2c_algo_bit           13257  1 i915
i2c_core               55486  13 drm,i2c_designware_pci,i915,i2c_i801,cyapa,i2c_designware_platform,regmap_i2c,drm_kms_helper,i2c_algo_bit,isl29018,v4l2_common,chromeos_laptop,videodev

Comment 81 George Sapkin 2014-10-11 21:52:30 UTC
I've compiled kernel 3.17.0 for F20 x86-64 with CONFIG_I2C_DESIGNWARE_PCI=m and can confirm it is working on C720P with both touchpad and touchscreen.

If anybody is interested it's available here: https://copr.fedoraproject.org/coprs/georgespk/kernel-c720/

Comment 82 Eric Work 2014-10-11 22:03:47 UTC
@George, Did you base your package off the rawhide 3.17 kernel package and just change CONFIG_I2C_DESIGNWARE_PCI=m?

Comment 83 George Sapkin 2014-10-11 22:15:50 UTC
@Erik, the SRPM is from fc21 and CONFIG_I2C_DESIGNWARE_PCI=m and the version/build number (added c720) are the only changes.

Comment 84 Eric Work 2014-10-11 22:19:12 UTC
That's great news!  Can we get the Fedora kernel maintainers to enable this in the official 3.17 kernel package maybe?  I noticed ARCH already has this config option set to 'm' in their release kernel package.  I read somewhere that 3.17 might also fix suspend issues.

Comment 85 Eric Work 2014-10-11 23:34:26 UTC
Confirmed that the touchpad is working using the kernel package from George's copr repo.  Suspend still does not work.  You need to follow the "systemd" section on the ARCH Chromebook wiki to fix suspend.  The kernel command line parameters are not enough.

Comment 86 Josh Boyer 2014-10-12 13:52:10 UTC
I've enabled CONFIG_I2C_DESIGNWARE_PCI in f21 and rawhide.  It will be turned on in the next builds of each.

Comment 87 George Sapkin 2014-10-12 16:28:17 UTC
@Josh, so 3.17 is not coming to FC20?

Comment 88 Peter Robinson 2014-10-13 09:05:20 UTC
(In reply to George Sapkin from comment #87)
> @Josh, so 3.17 is not coming to FC20?

It'll come to F-20 later, likely in the 3.17.2 timeframe like all new kernels coming to stable releases.

Comment 89 Fedora Update System 2014-10-16 11:40:32 UTC
kernel-3.17.1-300.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/kernel-3.17.1-300.fc21

Comment 90 Fedora Update System 2014-10-16 17:19:25 UTC
Package kernel-3.17.1-300.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.17.1-300.fc21'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12955/kernel-3.17.1-300.fc21
then log in and leave karma (feedback).

Comment 91 Dave Kline 2014-10-17 20:13:11 UTC
(In reply to Fedora Update System from comment #90)
> Package kernel-3.17.1-300.fc21:
> * should fix your issue,
> * was pushed to the Fedora 21 testing repository,
> * should be available at your local mirror within two days.
> Update it with:
> # su -c 'yum update --enablerepo=updates-testing kernel-3.17.1-300.fc21'
> as soon as you are able to, then reboot.
> Please go to the following url:
> https://admin.fedoraproject.org/updates/FEDORA-2014-12955/kernel-3.17.1-300.
> fc21
> then log in and leave karma (feedback).

Once I'm back at my Chromebook, I will try the following:

sudo yum update --releasever=21 --enablerepo=updates-testing kernel-3.17.1-300.fc21

I'm running Fedora 20, hence the need for releasever. I'll report my findings.

Comment 92 Dave Kline 2014-10-17 22:30:16 UTC
After running the above command, I can confirm the touchpad works. Thanks!

Comment 93 Fedora Update System 2014-11-01 16:33:04 UTC
kernel-3.17.1-300.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 94 Simon Tuohey 2014-11-07 22:14:47 UTC
I have a Toshiba CB30 ChromeBook and can confirm that  kernel-3.17.1-300.fc21 works fixed the issue, working in fed20 release.

Steps:

1. Stock Fedora 20 install
2. yum update all, restart
3. install 3.17.1 from fc21 as per above:

yum install --releasever=21 --enablerepo=updates-testing kernel-3.17.1-300.fc21

Worked perfectly on reboot, thank you very much.

Comment 95 mwp.junk 2014-11-14 19:58:31 UTC
- Fedora 20
- 3.17.2-200

- Touchpad will lose sync mid movement causing the pointer to just just stop.
- Mouse clicks will not register every time.

Touchpad Works beautifully on Ubuntu though; therefore, I recommend that this issue be re-opened or another be created.

Comment 96 Sergio Durigan Junior 2014-11-14 20:07:05 UTC
(In reply to mwp.junk from comment #95)
> - Fedora 20
> - 3.17.2-200
> 
> - Touchpad will lose sync mid movement causing the pointer to just just stop.
> - Mouse clicks will not register every time.
> 
> Touchpad Works beautifully on Ubuntu though; therefore, I recommend that
> this issue be re-opened or another be created.

Have you tried following the instructions on Comment 3?  I'm not saying we shouldn't open another bug report, but it would be nice if we knew whether these instructions work for your case.

Comment 97 mwp.junk 2014-11-15 17:32:42 UTC
(In reply to Sergio Durigan Junior from comment #96) 
> Have you tried following the instructions on Comment 3?  I'm not saying we
> shouldn't open another bug report, but it would be nice if we knew whether
> these instructions work for your case.

Yes, it would seem that comment 3 does resolve my issue. Will this be implemented by default in a later revision or is this something I will need to maintain?

Comment 98 Björn Ruberg 2014-11-15 18:50:14 UTC
I've applied the Xorg configuration from comment 3. The touchpad was working accetable after booting into kernel 3.17.2. It's still no great touchpad, but compiling modules is not necessary anymore.

Comment 99 Sergio Durigan Junior 2014-11-15 19:06:58 UTC
(In reply to mwp.junk from comment #97)
> Yes, it would seem that comment 3 does resolve my issue. Will this be
> implemented by default in a later revision or is this something I will need
> to maintain?

I don't know.  In fact, I had the same problems with the touchpad, and solved them using Comment 3 as well.  Maybe a bug could be filed against xorg asking what is the best approach in this case.

Comment 100 Yannick Defais 2014-11-16 00:51:38 UTC
I confirm as well with kernel 3.17.2 touchpad, touchscreen and sleep mode are working fine without the need for a script patching some kernel's modules. I do have the configuration files for touchpad and sleep mode. This is a huge progress! Thanks to all people involved.

We should indeed now work on some bug reports to get automated configuration. AFAIK there is a need for some configuration for:
-touchpad
-sleep/hibernate
-microphone
-multimedia keys (the one replacing F1, F2 etc.)
-hdmi screen output
-battery life

I do not have much spare time atm, and I've not tested if there is some improvement with kernel 3.17 with those issues...

Comment 101 Mike Spadaru 2014-11-19 06:58:36 UTC
(In reply to Yannick Defais from comment #100)
> I confirm as well with kernel 3.17.2 touchpad, touchscreen and sleep mode
> are working fine without the need for a script patching some kernel's
> modules. I do have the configuration files for touchpad and sleep mode. 

What configuration files did you use?
I can't get suspend to work. Whenever I wake the computer from suspend it restarts.
I have an Acer c720 with an Intel Celeron CPU.
I tried the fixes here: https://wiki.archlinux.org/index.php/Chromebook#Fixing_suspend at the "With systemd" section, but no result.

On Ubuntu I used this fix (source: http://www.reddit.com/r/chrubuntu/comments/1rsxkd/list_of_fixes_for_xubuntu_1310_on_the_acer_c720/ch8eq2o ):
  1. Create file /etc/initramfs-tools/scripts/init-top/unbind_ehci with following content http://pastebin.com/yk52qfKz 
  2. Change mode sudo chmod a+x /etc/initramfs-tools/scripts/init-top/unbind_ehci
  3. Update initramfs sudo update-initramfs -k all -u
  4. Add  "tpm_tis.interrupts=0" to /etc/default/grub and rebuild the grub configuration.
But this doesn't work on Fedora.

Comment 102 Mike Spadaru 2014-11-19 10:41:05 UTC
This is my list of fixes for Acer c720 on Fedora 20 32bit:

Fixes for c720 on Fedora 20:
1. Update: sudo yum -y update
2. Restart
3. Log in as root: sudo -i 

4. gedit /usr/lib/systemd/system-sleep/cros-sound-suspend.sh
Add:
#!/bin/bash

case $1/$2 in
  pre/*)
    # Unbind ehci for preventing error 
    echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/unbind
    # Unbind snd_hda_intel for sound
    echo -n "0000:00:1b.0" | tee /sys/bus/pci/drivers/snd_hda_intel/unbind
    echo -n "0000:00:03.0" | tee /sys/bus/pci/drivers/snd_hda_intel/unbind
    ;;
  post/*)
    # Bind ehci for preventing error 
    echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/bind
    # bind snd_hda_intel for sound
    echo -n "0000:00:1b.0" | tee /sys/bus/pci/drivers/snd_hda_intel/bind
    echo -n "0000:00:03.0" | tee /sys/bus/pci/drivers/snd_hda_intel/bind
    ;;
esac

5. chmod +x /usr/lib/systemd/system-sleep/cros-sound-suspend.sh

6. gedit /etc/default/grub
Add:
GRUB_CMDLINE_LINUX_DEFAULT="quiet tpm_tis.interrupts=0"

7.Rebuild GRUB configuration: grub2-mkconfig -o /boot/grub2/grub.cfg

To fix touchpad sensitivity:
8. gedit /usr/share/X11/xorg.conf.d/50-synaptics.conf
Replace the first section with:
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        Option "TapButton1" "1"
        Option "TapButton2" "3"
        Option "TapButton3" "2"
        Option "MaxTapMove" "20"
        Option "MaxTapTime" "140"
        Option "ClickTime" "5"
        Option "FingerHigh" "12"
        Option "FingerLow" "10"
        Option "LockedDrags" "true"
        Option "LockedDragTimeout" "100"
        Option "ClickFinger1" "1"
        Option "ClickFinger2" "3"
        Option "ClickFinger3" "2"
        Option "SingleTapTimeout" "140"
EndSection


Thise fixes don't work on Fedora 21!!! Can someone please help with getting Fedora 21 to work on Acer c720?

Comment 103 Máté Wierdl 2015-09-18 13:33:53 UTC
(In reply to Mike Spadaru from comment #102)
> This is my list of fixes for Acer c720 on Fedora 20 32bit:
> 
> Fixes for c720 on Fedora 20:
> 1. Update: sudo yum -y update
> 2. Restart
> 3. Log in as root: sudo -i 
> 
> 4. gedit /usr/lib/systemd/system-sleep/cros-sound-suspend.sh
> Add:
> #!/bin/bash
> 
> case $1/$2 in
>   pre/*)
>     # Unbind ehci for preventing error 
>     echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/unbind
>     # Unbind snd_hda_intel for sound
>     echo -n "0000:00:1b.0" | tee /sys/bus/pci/drivers/snd_hda_intel/unbind
>     echo -n "0000:00:03.0" | tee /sys/bus/pci/drivers/snd_hda_intel/unbind
>     ;;
>   post/*)
>     # Bind ehci for preventing error 
>     echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/bind
>     # bind snd_hda_intel for sound
>     echo -n "0000:00:1b.0" | tee /sys/bus/pci/drivers/snd_hda_intel/bind
>     echo -n "0000:00:03.0" | tee /sys/bus/pci/drivers/snd_hda_intel/bind
>     ;;
> esac
> 
> 5. chmod +x /usr/lib/systemd/system-sleep/cros-sound-suspend.sh
> 
> 6. gedit /etc/default/grub
> Add:
> GRUB_CMDLINE_LINUX_DEFAULT="quiet tpm_tis.interrupts=0"
> 
> 7.Rebuild GRUB configuration: grub2-mkconfig -o /boot/grub2/grub.cfg
> 
> To fix touchpad sensitivity:
> 8. gedit /usr/share/X11/xorg.conf.d/50-synaptics.conf
> Replace the first section with:
> Section "InputClass"
>         Identifier "touchpad catchall"
>         Driver "synaptics"
>         MatchIsTouchpad "on"
>         Option "TapButton1" "1"
>         Option "TapButton2" "3"
>         Option "TapButton3" "2"
>         Option "MaxTapMove" "20"
>         Option "MaxTapTime" "140"
>         Option "ClickTime" "5"
>         Option "FingerHigh" "12"
>         Option "FingerLow" "10"
>         Option "LockedDrags" "true"
>         Option "LockedDragTimeout" "100"
>         Option "ClickFinger1" "1"
>         Option "ClickFinger2" "3"
>         Option "ClickFinger3" "2"
>         Option "SingleTapTimeout" "140"
> EndSection
> 
> 
> Thise fixes don't work on Fedora 21!!! Can someone please help with getting
> Fedora 21 to work on Acer c720

What part doesn't work?  Suspend?  If that's the case, what's the output of 

sudo cat /proc/acpi/wakeup