Questions about compiling the chromeos kernel

240 views
Skip to first unread message

Ruidong Xu

unread,
Apr 9, 2023, 10:14:54 PM4/9/23
to ChromiumOS Development
First:Can the chrome os kernel be compiled? If so, I want to compile my driver into it, what do I need to do, can you help me?

Second:I can't find /dev/hidraw* in the chromeos Linux development environment.
The touch driver I'm developing needs hidraw* support and I don't know if compiling the kernel will bring up /dev/hidraw*. I desperately need my product to support 20 point multi-touch, or rather a custom chromeos system that supports 20 point multi-touch.
Can you help me with this?

Harry Cutts

unread,
Apr 11, 2023, 7:51:10 AM4/11/23
to ChromiumOS Development, Ruidong Xu
On Monday, April 10, 2023 at 3:14:54 AM UTC+1 Ruidong Xu wrote:
First:Can the chrome os kernel be compiled? If so, I want to compile my driver into it, what do I need to do, can you help me?

Check out the Kernel Development page in the docs. That should explain everything about how to compile the Kernel. (It assumes you've already set up a ChromiumOS development environment following the main developer guide.)
 
Second:I can't find /dev/hidraw* in the chromeos Linux development environment.

The Linux development environment is a VM; it doesn't have direct access to input devices. If you're developing Kernel modules you'll need to put your Chromebook into developer mode, and then open a shell on the Chromebook itself (e.g. with Ctrl+Alt+T and running "shell"). That shell should have access to /dev/hidraw* nodes.
 
The touch driver I'm developing needs hidraw* support and I don't know if compiling the kernel will bring up /dev/hidraw*. I desperately need my product to support 20 point multi-touch, or rather a custom chromeos system that supports 20 point multi-touch.
Can you help me with this?

There's no reason that 20-point multitouch shouldn't be supported by the HID driver built in to Linux. Have you checked that the problem you're trying to solve is actually in the Kernel? For example, have you tried running the testers I linked to in your "questions about chromeos multi-touch" thread?

If you haven't already, I suggest you read the input stack documentation, then follow the "How to watch it" instructions for evdev. (You'll want the Chromebook to be in developer mode for this; run the commands in the dev mode terminal, not the Linux development environment.) Look at the output of evtest and see if it's reporting all 20 touches. (See the Linux multi-touch protocol docs for reference.)

Ruidong Xu

unread,
Apr 12, 2023, 10:55:01 PM4/12/23
to ChromiumOS Development, Harry Cutts

Thank you for your reply, I will study your ideas

Ruidong Xu

unread,
Apr 13, 2023, 2:04:24 AM4/13/23
to ChromiumOS Development, Ruidong Xu, Harry Cutts

Could you try the touchscreen with a Web-based tester, like this one or this other one? I'm wondering if this limitation is specific to Android apps running on ChromeOS.
I'm sorry, I forgot to click in when I read your reply earlier, I tried it today and it's still at 16.

Ruidong Xu

unread,
Apr 13, 2023, 4:50:07 AM4/13/23
to ChromiumOS Development, Ruidong Xu, Harry Cutts

I don't have a chromebook, I only have the ops computer with chromeos flex installed, I used Ctrl+Alt+T to get into crosh but I typed the shell command and it showed ERROR : unknown conmmond:shell.
I think it's because I'm not in developer mode, but I don't have a keyboard like a chromebook, is there any other way to get into developer mode on chromeos?

Harry Cutts

unread,
Apr 13, 2023, 12:49:23 PM4/13/23
to ChromiumOS Development, Ruidong Xu, Harry Cutts
A quick search on the Web found this forum post about enabling developer mode on ChromeOS Flex. However, it looks like a lot of work, and actually I think you can learn enough from the redacted version of evtest that you get in crosh. If you run evtest in crosh, choose your touchscreen, then move 20 fingers on the screen at once, you should be able to see how many fingers the Kernel is reporting just by counting the number of ABS_MT_SLOT lines you see between each pair of SYN_REPORT lines. (Since your fingers will be lifted over a number of different frames, make sure to scroll up in the output a bit; maybe count the number of ABS_MT_SLOTs in a few different frames and take the maximum.)

dragon788

unread,
Apr 13, 2023, 8:03:56 PM4/13/23
to Harry Cutts, ChromiumOS Development, Ruidong Xu
There's actually an easier way I think, that doesn't require Developer mode and can be toggled fairly easily.

Open Chrome://flags then search for 'input diagnostics' and enable the flag that allows showing input devices in the diagnostics app, then search for 'touchscreen' and enable the flag to show the touchscreen in the diagnostics. Click the Restart button which may or may not require you to log back in.

Now open Settings, then on the far left side at the bottom click About Chrome OS and then click on Diagnostics, click on Keyboard, then when you click the test button for the touchscreen it says you can use up to five fingers but I've tested with 10 and it shows you the detected touches as well as makes trails so you can see how many were detected and how they move.

I haven't created a jig yet for testing 20 inputs but you might already have some ideas for that.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev
---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Ruidong Xu

unread,
Apr 13, 2023, 11:26:01 PM4/13/23
to ChromiumOS Development, Harry Cutts, Ruidong Xu
The number of ABS_MT_SLOT lines seen between each pair of SYN_REPORT lines in the evtest with 20 fingers is at most 17.

Ruidong Xu

unread,
Apr 13, 2023, 11:29:50 PM4/13/23
to ChromiumOS Development, dragon788, ChromiumOS Development, Ruidong Xu, Harry Cutts
I appreciate the method you have provided, but still only 16 points can be measured using this method. I regret to inform you that this project has been temporarily discontinued and I am speechless, but I have no choice, and I would still love to have your support if it is subsequently reinstated. Thank you very much!

Harry Cutts

unread,
May 2, 2023, 2:57:56 PM5/2/23
to ChromiumOS Development, Ruidong Xu, dragon788, ChromiumOS Development, Harry Cutts
On Friday, April 14, 2023 at 4:29:50 AM UTC+1 Ruidong Xu wrote:
I appreciate the method you have provided, but still only 16 points can be measured using this method.

OK, that confirms that the issue is in the Kernel, or possibly below.
 
I regret to inform you that this project has been temporarily discontinued and I am speechless, but I have no choice, and I would still love to have your support if it is subsequently reinstated. Thank you very much!

Ah, that's a shame. If it does get reinstated, you might want to try the touchscreen with another desktop Linux distro where it's easier to mess around with the Kernel (such as Ubuntu). If the issue occurs on that distro, it'll probably be quicker to fix it there and then send the fix upstream.

Dmitry Torokhov

unread,
May 2, 2023, 4:50:01 PM5/2/23
to Harry Cutts, ChromiumOS Development, Ruidong Xu, dragon788
On Tue, May 2, 2023 at 11:58 AM Harry Cutts <hcu...@chromium.org> wrote:
On Friday, April 14, 2023 at 4:29:50 AM UTC+1 Ruidong Xu wrote:
I appreciate the method you have provided, but still only 16 points can be measured using this method.

OK, that confirms that the issue is in the Kernel, or possibly below.

So I assume the driver that is being used is hid-multitouch. On certain 3M touch screens it declares 60 contacts, Egalax ones use 32, Flatprox 40. But in general it limits number of contacts to what is reported as the logical maximum for HID_DG_CONTACTMAX usage coming from the device.
 
--

dragon788

unread,
May 2, 2023, 8:43:38 PM5/2/23
to Dmitry Torokhov, Harry Cutts, ChromiumOS Development, Ruidong Xu
I'll have to test the actual count seen by my up to date Chromebox on my C5518QT via evtest but it does seem like I can't get to the 20 touch points supported by my display even with my little helper lending his digits to the cause.


I did find out with his help that the wheels of Duplo cars show up as touch inputs so that makes it easier to get 20 by holding 5 cars to the screen with one arm.


dragon788 (dragon788)

unread,
May 3, 2023, 11:59:48 AM5/3/23
to ChromiumOS Development, dragon788, Harry Cutts, ChromiumOS Development, Ruidong Xu, Dmitry Torokhov
Could a Chromium dev confirm whether this limit in Blink was ever lifted, and does it apply to all of ChromiumOS or only web windows/apps?

https://bugs.chromium.org/p/chromium/issues/detail?id=392959
Reply all
Reply to author
Forward
0 new messages