You are not logged in.

#26 2016-03-26 18:54:56

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

R00KIE wrote:

That is actually an idea to test, check if from a cold boot you can get into the bios/uefi setup or if you can do anything in grub before it loads the kernel and the initramfs.

If that works you will have to dig into which driver is in charge of usb hubs and check if it accepts any quirks to either increase or ignore the number of allowed ports, maybe then the enumeration will be able to proceed and the keyboard part will start to work.

Ok now then... I tried it and it worked fine in the bios and also the arch options screen.

Where to go from here smile?

Offline

#27 2016-03-26 21:42:56

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

MarthaParkin wrote:

Someone replied this:

I find it odd that in the bbs.archlinux.org thread you linked, someone noted that:

    It seems that Linux hub driver allocates memory only for 31 ports.

And no one commented on the lsusb output:

    nNbrPorts 85

Makes me suspect that compiling an updated USB hub driver that actually allocates space for all of the 127 ports allowed by the USB specification might solve your problem. It might not, but it seems like it's worth a shot.

if it is at all related.

You may want to have a look at /usr/lib/modules/4.4.5-1-ARCH/build/include/uapi/linux/usb/ch11.h. It seems the 31 port limit is arbitrary and most probably you want to complain about this in the kernel bugtracker. Given that the keyboard works before the kernel takes over control of the hardware (and it works on windows) this is a bug/problem with the linux driver.

You could change the limit to something higher than what is reported by the keyboard and try to recompile the kernel, if it works then I suppose you have all the information you need to file the bug report upstream if you haven't done so already. With a bit of luck nothing else will have to be changed for things to work and everyone will be happy smile


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#28 2016-03-26 23:18:53

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

R00KIE wrote:

You could change the limit to something higher than what is reported by the keyboard and try to recompile the kernel, if it works then I suppose you have all the information you need to file the bug report upstream if you haven't done so already. With a bit of luck nothing else will have to be changed for things to work and everyone will be happy smile

Hmm how do I go about this? sounds daunting or is it just a case of changing a line in vim and recompiling whatever that is...ah I see results on google; is it a straight forward matter of following a tutorial similar in scope to any other software setup procedure? and if i did there would be no need to file a bug report would there? I mean I am happy to do it to help others if it will be relevant but as you said it is a niche thing that probably noone else uses anyway.

Last edited by MarthaParkin (2016-03-26 23:23:21)

Offline

#29 2016-03-27 01:14:21

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

You can use the ABS[1] and add a small patch to the linux PKGBUILD. However you have to report the bug upstream so that the fix is included in the kernel source, otherwise you would have to recompile the kernel with your change every time there is an update.

[1] https://wiki.archlinux.org/index.php/Arch_Build_System


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#30 2016-04-28 21:36:09

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

R00KIE wrote:

You may want to have a look at /usr/lib/modules/4.4.5-1-ARCH/build/include/uapi/linux/usb/ch11.h.

Hi, I tried to have a look into that path you gave but I don't have it. Mine only goes to build directory and the only thing in there is vmlinux.

Am I looking in the wrong place? Just looking on the HD arch install. I tried looking on the iso as well and nothing looking like that path tree there either.

Offline

#31 2016-04-28 21:39:14

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

The file ROOKIE mentioned is in package [core]/linux-headers


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#32 2016-04-29 10:52:18

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

alphaniner wrote:

The file ROOKIE mentioned is in package [core]/linux-headers

Thanks.

-edited irrelevant bit-

Last edited by MarthaParkin (2016-04-29 10:53:16)

Offline

#33 2016-04-29 12:12:56

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

I am reading through the https://wiki.archlinux.org/index.php/Ar … to_use_ABS and I'm not sure how the file specified by ROOKIE slots into this tutorial? Since it says you denote the desired package to download from the abs thingy. However that file is already on my computer. I am unsure if that file is to be considered 'the package' that I am to work with. Please advise. Or should I be looking at the kernel abs section?

Last edited by MarthaParkin (2016-04-29 12:14:33)

Offline

#34 2016-04-29 13:36:03

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

For building your own kernel use https://wiki.archlinux.org/index.php/Ke … ild_System .

Are you familiar with makepkg / PKGBUILD ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#35 2016-04-29 15:30:35

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

Thanks.

Lone_Wolf wrote:

Are you familiar with makepkg / PKGBUILD ?

No. But looks like I better get familiar with them smile.

Offline

#36 2016-04-30 12:44:46

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

So I'm now up to the part on editing PKGBUILD in https://wiki.archlinux.org/index.php/Ke … ild_System but where it says changing prepare is where you add the desired patch I'm unclear how I am supposed to add in the edited /usr/lib/modules/4.4.5-1-ARCH/build/include/uapi/linux/usb/ch11.h file from linux-headers? The commented lines in the file didn't offer any insight and the wiki doesn't seem to point to anything that explains it.

Offline

#37 2016-04-30 13:04:30

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

Usually you provide a patch(1) with what needs to be changed and apply it with patch, for example: 'patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"'.

Alternatively you could add your modified ch11.h file and copy it over the original one, but I really don't want to encourage anyone to do this, consider it a quick and dirty solution just for testing.

(1) To create a patch you have two directories, a and b, inside a you have all the original untouched files, inside b you make your changes. Then you do 'diff -ur a b > my_changes.patch'. Then you use my_changes.patch in the prepare() section of the PKGBUILD. Don't forget to add my_changes.patch to the sources array.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#38 2016-05-01 20:22:56

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

R00KIE wrote:

Usually you provide a patch(1) with what needs to be changed and apply it with patch, for example: 'patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"'.

Alternatively you could add your modified ch11.h file and copy it over the original one, but I really don't want to encourage anyone to do this, consider it a quick and dirty solution just for testing.

(1) To create a patch you have two directories, a and b, inside a you have all the original untouched files, inside b you make your changes. Then you do 'diff -ur a b > my_changes.patch'. Then you use my_changes.patch in the prepare() section of the PKGBUILD. Don't forget to add my_changes.patch to the sources array.

I have put it in PKGBUILD is that correct and made an arbitrary path for sources.

 16 source=("https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
 17         "https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.sign"
 18         "https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
 19         "https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.sign"
 20         # the main kernel config files
 21         'config' 'config.x86_64'
 22         # standard config files for mkinitcpio ramdisk
 23         'linux.preset'
 24         'change-default-console-loglevel.patch')
 25 source=('/home/dilbert/build/sources/mypatch.patch')

see above where I placed it in th PKGBUILD file.

EDIT: So I also still need to make a package with pkgbuild of the patch I want to make as well as editing the pkgbuild of the linux kernel? confusing. Can't I just use the edited ch11.h file and point to it in sources? I mean what is the point of the a and b stuff? why not just make an edited file and skip that step? since I only need to change one value in that file?

For the kernel stuff I am just editing pkgbuild of the core build I got from the ABSROOT=. abs core/linux command I did from the kernel abs section. So where am I supposed to get the PGKBUILD file from for making a patch?

Last edited by MarthaParkin (2016-05-01 20:36:52)

Offline

#39 2016-05-01 20:29:45

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

PKGBUILD doesn't allow 2 source arrays.
makepkg searches for local files in the folder it's started from.

Use something like this :

source=(
         "https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
         "https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.sign"
         "https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
         "https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.sign"
         # the main kernel config files
         'config' 'config.x86_64'
         # standard config files for mkinitcpio ramdisk
         'linux.preset'
         'change-default-console-loglevel.patch'
         'mypatch.patch'
)

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#40 2016-05-01 20:37:44

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

Ah makes sense.


Lone_Wolf wrote:

PKGBUILD doesn't allow 2 source arrays.
makepkg searches for local files in the folder it's started from.

Use something like this :

source=(
         "https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
         "https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.sign"
         "https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
         "https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.sign"
         # the main kernel config files
         'config' 'config.x86_64'
         # standard config files for mkinitcpio ramdisk
         'linux.preset'
         'change-default-console-loglevel.patch'
         'mypatch.patch'
)

Last edited by MarthaParkin (2016-05-01 21:09:46)

Offline

#41 2016-05-01 22:51:40

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

I am not understanding the patch part yet from reading the wiki it sounds the same as what is involved in the kernel editing I've already been doing.

Does that mean the the patching part is already done in terms of  the edits I need to do or that I need to make PKGBUILD just to make the patch besides doing it for the kernel?

If it is the latter then I don't get where I get PKGBUILD file from because the one I've been editing from the core is just made for the kernel isn't it? Since there is only one value I'm changing is there a more straight forward way? Been reading a bit on sed...is that the most direct route?

Last edited by MarthaParkin (2016-05-01 22:52:38)

Offline

#42 2016-05-01 22:53:14

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

Can't I just use the edited ch11.h file and point to it in sources? I mean what is the point of the a and b stuff? why not just make an edited file and skip that step? since I only need to change one value in that file?

Yes, in this case you could just edit that one file and have it overwrite the original one.

Now let's check some things that could occcur :
- a new kernel version is released - change needs to be applied again.
- you find that to make things work another file needs to be changed
- someone else wants to apply your changes to their kernel

In all these situations creating a unified diff file that can be applied with the patch command makes things easier.

-------------

For the kernel stuff I am just editing pkgbuild of the core build I got from the ABSROOT=. abs core/linux command I did from the kernel abs section. So where am I supposed to get the PGKBUILD file from for making a patch?

The pkgbuild from core was just your starting point.
The PKGBUILD in that folder you've been editing no longer describes how to build archlinux stock kernel.
Instead it now describes how to build your customkernel .


--------------

EDITED :
sed is useful for small changes, but it can be tricky to see what is changed.
patch-files tend to be very readable, both for humans and for machines.

Last edited by Lone_Wolf (2016-05-01 22:55:46)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#43 2016-05-02 10:23:22

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

Is it safe to do -k for this error? or is there a problem which would have caused that error? I am up to the respective part in the kernel abs wiki.

$ updpkgsums
==> Retrieving sources...
  -> Downloading linux-4.5.tar.xz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: certificate is not yet valid
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
==> ERROR: Failure while downloading https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.5.tar.xz
    Aborting...
==> ERROR: Failed to generate new checksums

contents of that directory

$ ls
change-default-console-loglevel.patch  config.x86_64  linuxusb.install  usbpatch.patch
config                                 linux.preset   PKGBUILD

Last edited by MarthaParkin (2016-05-02 10:39:56)

Offline

#44 2016-05-02 11:20:12

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

The certificate used by kernel.org has been issued by StartCom Ltd, and is valid from 8 march 2016 to 8 march 2019 (according to firefox ) .

It looks like your system has a problem , don't use curl' -k option.
SSL verification problems are often caused by wrong time/date, have you setup time synchronization ?

Last edited by Lone_Wolf (2016-05-02 11:20:44)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#45 2016-05-02 11:39:05

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

No not done anything with the time on this install. Ah the date is wrong.

]$ date
Fri 19 Feb 04:48:27 UTC 2016

I am on UK GMT.

Last edited by MarthaParkin (2016-05-02 11:39:48)

Offline

#46 2016-05-02 13:14:00

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

Ok, Correct the date & time manually, then try downloading again.
If it still doesn't work, setup time synchronization .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#47 2016-05-02 13:40:33

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

I have an error on attempting to compile of:

==> ERROR: One or more PGP signatures could not be verified![
$ makepkg -s
....
(5/5) checking keys in keyring                             [################################] 100%
(5/5) checking package integrity                           [################################] 100%
(5/5) loading package files                                [################################] 100%
(5/5) checking for file conflicts                          [################################] 100%
(5/5) checking available disk space                        [################################] 100%
:: Processing package changes...
(1/5) installing libxslt                                   [################################] 100%
(2/5) installing xmlto                                     [################################] 100%
(3/5) installing docbook-xml                               [################################] 100%
(4/5) installing docbook-xsl                               [################################] 100%
(5/5) installing bc                                        [################################] 100%
:: Running post-transaction hooks...
(1/1) Updating the info directory file...
==> Retrieving sources...
  -> Found linux-4.5.tar.xz
  -> Found linux-4.5.tar.sign
  -> Found patch-4.5.1.xz
  -> Found patch-4.5.1.sign
  -> Found config
  -> Found config.x86_64
  -> Found linux.preset
  -> Found change-default-console-loglevel.patch
  -> Found usbpatch.patch
==> Validating source files with sha256sums...
    linux-4.5.tar.xz ... Passed
    linux-4.5.tar.sign ... Skipped
    patch-4.5.1.xz ... Passed
    patch-4.5.1.sign ... Skipped
    config ... Passed
    config.x86_64 ... Passed
    linux.preset ... Passed
    change-default-console-loglevel.patch ... Passed
    usbpatch.patch ... Passed
==> Verifying source file signatures with gpg...
    linux-4.5.tar ... FAILED (unknown public key 79BE3E4300411886)
    patch-4.5.1 ... FAILED (unknown public key 38DBBDC86092693E)
==> ERROR: One or more PGP signatures could not be verified!

I had a quick google and saw some different suggestions for solutions but since I do not know what I'm doing I don't have any compass on which is the best one.

Last edited by MarthaParkin (2016-05-02 13:41:57)

Offline

#48 2016-05-02 13:50:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

At this rate you'll be an expert soon.

https://wiki.archlinux.org/index.php/Ma … e_checking

Edit
Not sarcasm, kernel packages are imo the hardest ones to create/maintain .
I do remember how much i had to learn to create my first package, and that was A LOT simpler then building a customkernel.

MarthaParkin, you have earned my respect .

Last edited by Lone_Wolf (2016-05-02 14:26:30)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#49 2016-05-02 14:11:56

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

Lone_Wolf wrote:

At this rate you'll be an expert soon.

Sarcasm sad?

I had indeed just read that but as you noted in a previous suggestion it was bad form to disable the -k check in the case of the

$ updpkgsums

I was going by the previous trend tongue.

Offline

#50 2016-05-02 14:41:23

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: [Solved] Point of sale keyboard shows up as usb hub and doesn't work

Seems there is something I've failed to do here

==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums...
    linux-4.5.tar.xz ... Passed
    linux-4.5.tar.sign ... Skipped
    patch-4.5.1.xz ... Passed
    patch-4.5.1.sign ... Skipped
    config ... Passed
    config.x86_64 ... Passed
    linux.preset ... Passed
    change-default-console-loglevel.patch ... Passed
    usbpatch.patch ... Passed
==> Extracting sources...
  -> Extracting linux-4.5.tar.xz with bsdtar
  -> Extracting patch-4.5.1.xz with xz
==> Starting prepare()...
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- ch11.h     2016-02-19 03:04:10.254791335 +0000
|+++ ch11new.h  2016-02-19 03:06:42.020471684 +0000
--------------------------
File to patch:

I was unsure about the paths of where the files should go. I think I have done something wrong in PKGBUILD and/or not provided the right paths. For sources do I need to put the path of the .patch file with the diffs or the new ch11.h file or both?

When doing

diff -aur package.pristine package.new

should mine be

diff -aur ch11new.h ./src/linux-4.5/include/uapi/linux/usb/ch11.h

. When I first made the diff I didn't do that since I didn't understand that the second file will be the source.

Getting mental fatigue from thinking about it now. Time for a break.

Oh yes looking at file

change-default-console-loglevel.patch

the top couple of lines contain filepaths indicating I my surmise may be correct.

Last edited by MarthaParkin (2016-05-02 14:52:18)

Offline

Board footer

Powered by FluxBB