LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   USB keyboard and mouse not detected at boot with kernel 5.13.4, 5.12.11 is OK (https://www.linuxquestions.org/questions/slackware-14/usb-keyboard-and-mouse-not-detected-at-boot-with-kernel-5-13-4-5-12-11-is-ok-4175698287/)

Didier Spaier 07-28-2021 05:23 AM

kernel-generic 5.12.16 built on the affected machine allows to use all its 6 USB ports for input devices (at least keyboard and mouse). I plan to upload it today to the main Slint repository with its siblings: kernel-modules, kernel-headers and kernel-source.

marav 07-28-2021 05:35 AM

Quote:

Originally Posted by Didier Spaier (Post 6270356)
kernel-generic 5.12.16 built on the affected machine allows to use all its 6 USB ports for input devices (at least keyboard and mouse). I plan to upload it today to the main Slint repository with its siblings: kernel-modules, kernel-headers and kernel-source.

so we can deduce that the issue probably appeared with commits of 5.12.17, right ?

EDIT :
I think we will remain in the dark until we have a trace of what's going on at the boot

Didier Spaier 07-28-2021 11:50 AM

Quote:

Originally Posted by marav (Post 6270359)
so we can deduce that the issue probably appeared with commits of 5.12.17, right ?

Yes, but... I tried openSUSE Tumbleweed live KDE with 5.13.4 and all my USB ports worked. The difference in behavior could be due to the configuration and/or to a patched kernel. Will build a vanilla 5.13.5 with their config to check.

marav 07-28-2021 12:50 PM

2 Attachment(s)
You can diff these files ;-)

The Opensuse one came from :
https://download.opensuse.org/reposi...1.2.x86_64.rpm

Didier Spaier 07-28-2021 12:57 PM

Quote:

Originally Posted by marav (Post 6270442)
You can diff these files ;-)

I will, but only if my attempt is successful, which I should know in about one hour ;)

PS I copied the config file from the live system.

Didier Spaier 07-28-2021 02:47 PM

Quote:

Originally Posted by Didier Spaier (Post 6270443)
I will, but only if my attempt is successful, which I should know in about one hour ;)

Build failed. It looks seems that openSUSE patches their kernel, so their config file doesn't match a vanilla one. Now trying to build from the default Arch config file. If that doesn't succeed, I'll have at least learnt something today.

marav 07-28-2021 02:52 PM

Quote:

Originally Posted by Didier Spaier (Post 6270464)
Build failed. It looks seems that openSUSE patches their kernel, so their config file doesn't match a vanilla one. Now trying to build from the default Arch config file. If that doesn't succeed, I'll have at least learnt something today.

They also provide a vanilla one

https://download.opensuse.org/reposi...1.2.x86_64.rpm

Didier Spaier 07-28-2021 02:54 PM

Quote:

Originally Posted by marav (Post 6270466)

Thanks for the info. I'll first see what I come up with the Arch config.

LuckyCyborg 07-28-2021 03:01 PM

Mr. Didier, I suggest you to look for the openSUSE Tumbleweed sources.

https://download.opensuse.org/source.../repo/oss/src/

https://download.opensuse.org/source....4-1.2.src.rpm

This one will be more or less along with our slackware-current. The other variant of openSUSE is for enterprise or development.

And I suggest you to do your experiments with -current.

Your issues may be produced by the really old GCC of Slackware 14.2.

In other hand, yes. They patch the kernel heavily. For example, those are the openSUSE patches from that .src.rpm

Code:

0001-apparmor-fix-unnecessary-creation-of-net-compat.patch
0001-regulator-mt6360-Add-OF-match-table.patch
0001-usb-Add-Xen-pvUSB-protocol-description.patch
0002-regulator-mt6358-Add-OF-match-table.patch
0002-usb-Introduce-Xen-pvUSB-frontend-xen-hcd.patch
0003-regulator-mt6323-Add-OF-match-table.patch
Revert-netfilter-conntrack-remove-helper-hook-again.patch
Revert-usb-renesas-xhci-Fix-handling-of-unknown-ROM-state.patch
acpi_thermal_passive_blacklist.patch
acpi_thinkpad_introduce_acpi_root_table_boot_param.patch
add-product-identifying-information-to-vmcoreinfo.patch
apparmor-compatibility-with-v2.x-net.patch
arm64-dts-rockchip-Disable-CDN-DP-on-Pinebook-Pro.patch
b43-missing-firmware-info.patch
brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
btrfs-8447-serialize-subvolume-mounts-with-potentially-mi.patch
btrfs-fs-super.c-add-new-super-block-devices-super_block_d.patch
btrfs-provide-super_operations-get_inode_dev
btrfs-use-the-new-VFS-super_block_dev.patch
crasher.patch
dm-mpath-leastpending-path-update
dm-mpath-no-partitions-feature
dm-table-switch-to-readonly
genksyms-add-override-flag.diff
kbd-ignore-gfx.patch
kernel-add-product-identifying-information-to-kernel-build.patch
kernel-add-release-status-to-kernel-build.patch
megaraid-mbox-fix-SG_IO
misdn-add-support-for-group-membership-check
mmc-sdhci-iproc-cap-min-clock-frequency-on-bcm2711.patch
mmc-sdhci-iproc-set-sdhci_quirk_cap_clock_base_broken-on-bcm2711.patch
panic-do-not-print-uninitialized-taint_flags.patch
perf_timechart_fix_zero_timestamps.patch
pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
proc-Avoid-mixing-integer-types-in-mem_rw.patch
pstore_disable_efi_backend_by_default.patch
readahead-request-tunables.patch
reset-raspberrypi-don-t-reset-usb-if-already-up.patch
rpm-kernel-config
s390-export-symbols-for-crash-kmp.patch
scsi-retry-alua-transition-in-progress
setuid-dumpable-wrongdir
supported-flag
supported-flag-external
supported-flag-modverdir
supported-flag-underscores
supported-flag-wildcards
suse-hv-guest-os-id.patch
uapi-add-a-compatibility-layer-between-linux-uio-h-and-glibc
vfs-add-super_operations-get_inode_dev
x86-apic-force-bigsmp-apic-on-IBM-EXA3-4.patch

Also, please note that they start with the base release, i.e. 5.13.0 then they patches up the sources, until they arrive to wanted version.

I for one, I suspect that they also skip some of patches from kernel.org.

LuckyCyborg 07-28-2021 03:26 PM

What I find interesting for your issue is this patch:

Revert-usb-renesas-xhci-Fix-handling-of-unknown-ROM-state.patch
Code:

From: Moritz Fischer <mdf@kernel.org>
Subject: [PATCH] Revert "usb: renesas-xhci: Fix handling of unknown ROM state"
Date: Mon, 19 Jul 2021 00:05:19 -0700
Message-id: <20210719070519.41114-1-mdf@kernel.org>
Patch-mainline: Submitted, linux-usb ML
References: bsc#1188485, bsc#1188515

This reverts commit d143825baf15f204dac60acdf95e428182aa3374.

Justin reports some of his systems now fail as result of this commit:

 xhci_hcd 0000:04:00.0: Direct firmware load for renesas_usb_fw.mem failed with error -2
 xhci_hcd 0000:04:00.0: request_firmware failed: -2
 xhci_hcd: probe of 0000:04:00.0 failed with error -2

The revert brings back the original issue the commit tried to solve but
at least unbreaks existing systems relying on previous behavior.

Cc: stable@vger.kernel.org
Cc: Mathias Nyman <mathias.nyman@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Justin Forbes <jmforbes@linuxtx.org>
Reported-by: Justin Forbes <jmforbes@linuxtx.org>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/usb/host/xhci-pci-renesas.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/host/xhci-pci-renesas.c b/drivers/usb/host/xhci-pci-renesas.c
index 1da647961c25..5923844ed821 100644
--- a/drivers/usb/host/xhci-pci-renesas.c
+++ b/drivers/usb/host/xhci-pci-renesas.c
@@ -207,8 +207,7 @@ static int renesas_check_rom_state(struct pci_dev *pdev)
                        return 0;
 
                case RENESAS_ROM_STATUS_NO_RESULT: /* No result yet */
-                        dev_dbg(&pdev->dev, "Unknown ROM status ...\n");
-                        break;
+                        return 0;
 
                case RENESAS_ROM_STATUS_ERROR: /* Error State */
                default: /* All other states are marked as "Reserved states" */
@@ -225,12 +224,13 @@ static int renesas_fw_check_running(struct pci_dev *pdev)
        u8 fw_state;
        int err;
 
-        /*
-        * Only if device has ROM and loaded FW we can skip loading and
-        * return success. Otherwise (even unknown state), attempt to load FW.
-        */
-        if (renesas_check_rom(pdev) && !renesas_check_rom_state(pdev))
-                return 0;
+        /* Check if device has ROM and loaded, if so skip everything */
+        err = renesas_check_rom(pdev);
+        if (err) { /* we have rom */
+                err = renesas_check_rom_state(pdev);
+                if (!err)
+                        return err;
+        }
 
        /*
          * Test if the device is actually needing the firmware. As most
--
2.32.0

The Renesas chips drives tons of cheap USB 3.0 adapters.

Didier Spaier 07-28-2021 03:30 PM

Quote:

Originally Posted by LuckyCyborg (Post 6270468)
Mr. Didier, I suggest you to look for the openSUSE Tumbleweed sources.

https://download.opensuse.org/source.../repo/oss/src/

https://download.opensuse.org/source....4-1.2.src.rpm

This one will be more or less along with our slackware-current. The other variant of openSUSE is for enterprise.

And I suggest you to do your experiments with -current.

Your issues may be produced by the really old GCC of Slackware 14.2.

In other hand, yes. They patch the kernel heavily. For example, those are the openSUSE patches from that .src.rpm

<snip>

Thanks LuckyCyborg. The build failed too with the config from Arch. The age of gcc is something I also have in mind, although according to the kernel documentation the minimal requirements to compile the kernel mention a minimum version of 4.9 for GCC (withy a caveat: "The gcc version requirements may vary depending on the type of CPU in your computer".

Yes I could experiment on Slackware64-current, but if I am successful there and not in Slint that won't help much.

Which leads to two newbie questions:
  • Can I upgrade gcc from 5.5 to the version shipped in -current (10.3.0 at time of writing) without rebuilding or upgrading any other package? Else what should be rebuilt or upgraded (glibc?) ?
  • Can I build only the kernel with a new gcc?

LuckyCyborg 07-28-2021 03:36 PM

In my humble opinion, a heavy upgrade of GCC like you describe may lead in a need for a mass rebuild.

In other hand, regarding building the kernel (and even the external modules) with a dedicated GCC is a question to which response makes me also interested.

I did in the past some experiments with using a x86_64 kernel from Slackware64 under the i586 Slackware. Yes, it's possible, at least in theory.

Didier Spaier 07-28-2021 03:52 PM

Quote:

Originally Posted by LuckyCyborg (Post 6270479)
In my humble opinion, a heavy upgrade of GCC like you describe may lead in a need for a mass rebuild.

In other hand, regarding building the kernel (and even the external modules) with a dedicated GCC is a question to which response makes me also interested.

I did in the past some experiments with using a x86_64 kernel from Slackware64 under the i586 Slackware. Yes, it's possible, at least in theory.

Thanks for your answers. I will provide 5.12.16 for Slint which is ready for upload for now, then explore my options going further. Maybe someone more skilled than me (not a big challenge, that) will solve the issue for Slackware -current in a way I can apply to Slint, which would be ideal. In any case I am of course ready to test a proposed solution in Slackware64-current.

drumz 07-28-2021 04:29 PM

Quote:

Originally Posted by Didier Spaier (Post 6270475)
  • Can I build only the kernel with a new gcc?

Yes, you can install a newer gcc in /opt and use it to compile the kernel. But then you also have to remember to compile any kernel modules with the same compiler - that's why it's best to just use the system gcc to compile the kernel.

On my work work computer I have /opt/gcc-{4.9.4,6.3.0,7.3.0,8.4.0,10.2.0} At least a few of the versions are for MATLAB.

Didier Spaier 07-29-2021 11:43 AM

Good news
 
With the kernel 5.13.6 released by Patrick used in Slackware64-current as well as the one built for and installed in Slint my mouse and keyboard are usable when connected to any of the six USB ports of my tower.

Chris[1] and anyone having suffered from this issue, please test to confirm that it is also solved for you.

Then I will mark this thread as [SOLVED].

[1]I know it's 3 AM in Brisbane. So do it when you can...

Franklin 07-29-2021 03:33 PM

Still having the same behavior here unfortunately.

Applied update to 5.13.6. Rebooted without shutting down to verify no issues - mouse and keyboard worked fine. Then shut down completely and restarted - no response from keyboard and mouse. Hit reset button to restart and mouse and keyboard worked fine again.

The only time things seemed "fixed" for me was with the 5.13.5 upgrade, but that broke with the subsequent -current update even though no kernel update was included and I can't see anything else in the update that might have caused the change in behavior.

It's very odd and seems random with few other folks reporting similar issues. Maybe it's a random hardware problem? I'm just happy I can get things to work easily, but would interested to figure out why this is happening. Curious minds want to know ...

Oh well.

Didier Spaier 07-29-2021 03:54 PM

Quote:

Originally Posted by Franklin (Post 6270781)
Still having the same behavior here unfortunately.

Applied update to 5.13.6. Rebooted without shutting down to verify no issues - mouse and keyboard worked fine. Then shut down completely and restarted - no response from keyboard and mouse. Hit reset button to restart and mouse and keyboard worked fine again.

The only time things seemed "fixed" for me was with the 5.13.5 upgrade, but that broke with the subsequent -current update even though no kernel update was included and I can't see anything else in the update that might have caused the change in behavior.

It's very odd and seems random with few other folks reporting similar issues. Maybe it's a random hardware problem? I'm just happy I can get things to work easily, but would interested to figure out why this is happening. Curious minds want to know ...

Oh well.

The issue you describe doesn't look like the one reported in this thread as behaviors differ. Still eager to get reports to know if now (with kernel 5.13.6) all USB ports work, from folks for whom it was not the case.

DryFalls 07-29-2021 04:12 PM

k5.13.6
 
Code:

Machine:  Type: Desktop Mobo: Acer model: Aspire XC-603G serial: <filter> UEFI: American Megatrends v: P11-A2
          date: 01/23/2014
CPU:      Info: Quad Core model: Intel Celeron J1900 bits: 64 type: MCP arch: Silvermont rev: 3 cache: L2: 1024 KiB
          flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 16000
          Speed: 1528 MHz min/max: 1333/2416 MHz Core speeds (MHz): 1: 1528 2: 1333 3: 1333 4: 1333
Graphics:  Device-1: Intel Atom Processor Z36xxx/Z37xxx Series Graphics & Display vendor: Acer Incorporated ALI
          driver: i915 v: kernel bus-ID: 00:02.0
          Display: server: X.Org 1.20.12 driver: loaded: intel resolution: 1600x900~60Hz
          OpenGL: renderer: Mesa DRI Intel HD Graphics (BYT) v: 4.2 Mesa 21.1.5 direct render: Yes

upgraded kernel 5.13.6 and it dropped the (usb) mouse and keyboard during the installation. Had to reinstall 5.13.5 from a live install to recover. Installation is on a usb sdd 500G external drive.

Franklin 07-29-2021 04:25 PM

Quote:

Originally Posted by Didier Spaier (Post 6270787)
The issue you describe doesn't look like the one reported in this thread as behaviors differ. Still eager to get reports to know if now (with kernel 5.13.6) all USB ports work, from folks for whom it was not the case.


Well, you may be correct that it's not the same issue. It is odd though that we are both having keyboard and mouse USB problems that seem to have started at the same time after a kernel update. I'm not convinced we aren't seeing different symptoms of the same cause. I'm just not technical enough to know where to begin with respect to diagnosing.


I will continue follow this thread and refrain from chiming in so as not to gum up the discussion in case it is truly a separate problem.

Didier Spaier 07-29-2021 04:45 PM

Quote:

Originally Posted by DryFalls (Post 6270789)
upgraded kernel 5.13.6 and it dropped the (usb) mouse and keyboard during the installation. Had to reinstall 5.13.5 from a live install to recover. Installation is on a usb sdd 500G external drive.

Not sure it's the same issue either. What do you mean exactly writing "it dropped the (usb) mouse and keyboard during installation?" Do you really mean that you lost the keyboard and mouse before rebooting? In this case this is indeed another issue as the new kernel won't be used before you reboot. Or do you mean that you lost the keyboard and mouse after reboot? Then it could be because the package kernel-modules-5.13.6 has not been installed. How did you install the 5.13.6 packages: manually or using slackpkg?

chris.willing 07-29-2021 05:35 PM

Quote:

Originally Posted by Didier Spaier (Post 6270721)
Chris[1] and anyone having suffered from this issue, please test to confirm that it is also solved for you.

Yes, good news. The update to 5.13.6 has fixed the problem for me.

I also tried the warm/cold boot scenario but it made no difference here - all USB2 and 3 ports now work correctly in both cases.

chris

Didier Spaier 07-29-2021 06:06 PM

Quote:

Originally Posted by chris.willing (Post 6270801)
Yes, good news. The update to 5.13.6 has fixed the problem for me.

I also tried the warm/cold boot scenario but it made no difference here - all USB2 and 3 ports now work correctly in both cases.

chris

Thanks for the report. I mark this thread as [SOLVED].

DryFalls 07-29-2021 09:36 PM

Quote:

Originally Posted by Didier Spaier (Post 6270793)
Not sure it's the same issue either. What do you mean exactly writing "it dropped the (usb) mouse and keyboard during installation?" Do you really mean that you lost the keyboard and mouse before rebooting? In this case this is indeed another issue as the new kernel won't be used before you reboot. Or do you mean that you lost the keyboard and mouse after reboot? Then it could be because the package kernel-modules-5.13.6 has not been installed. How did you install the 5.13.6 packages: manually or using slackpkg?

I really lost the keyboard and mouse before rebooting. In fact, it was while slackpkg was installing the kernel modules package after the kernel was installed. But you're right, it could be an old problem which used to occur (intel_idle.max_cstate) similarly, but coincidentally crashing my box.


All times are GMT -5. The time now is 03:28 PM.