Laptop lost communications with peripherals

Ubuntu Support Template

Ubuntu Version:24.04.3 LTS

Desktop Environment (if applicable):
KDE Plasma

Problem Description:
I was doing a massive copy (88 GB or so) from a network device to an external SSD. It took 2 or 3 hours. It apparently completed successfully. But now I find myself in the following situation.

  1. My MX Mechanical Keyboard is no longer talking to my Laptop (Lenovo ThinkPad P16). Though the Kubuntu System Settings Bluetooth sees the keyboard, I can no longer connect to it or pair to it.

  2. My BenQ RD240Q external monitor is no longer recognized by System Settings Displays tab. If I unplug it from my laptop’s HDMI port and then plug it back in I get a display like this:

    but none of the controls do anything. The main Displays window doesn’t even show the second monitor:

Example:

Relevant System Information:
The laptop does have a NVidia RTX3500 GPU which has sometimes proved problematic but I am reluctant to suspect that here since there is also the issue of the keyboard not functioning. The one thing that unites these two issues besides when they happened is that both go through the KDE Plasma settings app.

Screenshots or Error Messages:
see above

What I’ve Tried:
Tried rebooting and power off, no luck there.

What I’m looking for from the community:

  • Command line ways of investigating these issues.
  • What to look for in logs, journalctl, for both of these problems, the bluetooth keyboard problem and the second monitor problem.
2 Likes

I would check these areas first:

:one: Look for kernel / driver errors

journalctl -b -p 3
dmesg | grep -iE "nvidia|bluetooth|usb|pcie|error|fail"

:two: Check if Bluetooth service is healthy

systemctl status bluetooth
rfkill list

:three: Check display / GPU state

nvidia-smi
xrandr

If xrandr does not list the external monitor, this suggests a GPU or display stack issue (possibly NVIDIA driver reset or PCIe hiccup).

Since both Bluetooth and HDMI rely on different buses (USB/PCIe), I’d also check for:

  • PCIe bus errors
  • IOMMU errors
  • Power management / suspend-like driver state

$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

I have had such difficulties before. The driver was installed and was running and now we get this. I think the driver is the reason for the monitor non-recognition. How can I tell if it is running?

$ journalctl -b -p 3
dmesg | grep -iE "nvidia|bluetooth|usb|pcie|error|fail"
Feb 05 14:59:07 aigas kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-95)
Feb 05 14:59:07 aigas kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-95)
Feb 05 14:59:07 aigas kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-95)
Feb 05 14:59:07 aigas kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-95)
Feb 05 14:59:07 aigas systemd-udevd[738]: /etc/udev/rules.d/60-brother-libsane-type1-inst.rules:14 Invalid key 'SYSFS'.
Feb 05 14:59:07 aigas systemd-udevd[738]: /etc/udev/rules.d/60-brother-mfp-brscan5-1.0.2-2.rules:17 Invalid key 'SYSFS'.
Feb 05 14:59:07 aigas kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-95)
Feb 05 14:59:07 aigas kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-95)
Feb 05 14:59:07 aigas kernel: spi-nor spi0.0: unrecognized JEDEC id bytes: f7 f0 30 09 03 00
Feb 05 14:59:09 aigas bluetoothd[1589]: profiles/sap/server.c:sap_server_register() Sap driver initialization failed.
Feb 05 14:59:09 aigas bluetoothd[1589]: sap-server: Operation not permitted (1)
Feb 05 14:59:09 aigas bluetoothd[1589]: src/device.c:set_wake_allowed_complete() Set device flags return status: Invalid Parameters
Feb 05 14:59:09 aigas bluetoothd[1589]: src/device.c:set_wake_allowed_complete() Set device flags return status: Invalid Parameters
Feb 05 14:59:10 aigas systemd-udevd[738]: /etc/udev/rules.d/60-brother-libsane-type1-inst.rules:14 Invalid key 'SYSFS'.
Feb 05 14:59:10 aigas systemd-udevd[738]: /etc/udev/rules.d/60-brother-mfp-brscan5-1.0.2-2.rules:17 Invalid key 'SYSFS'.
Feb 05 14:59:13 aigas systemd-udevd[738]: /etc/udev/rules.d/60-brother-libsane-type1-inst.rules:14 Invalid key 'SYSFS'.
Feb 05 14:59:13 aigas systemd-udevd[738]: /etc/udev/rules.d/60-brother-mfp-brscan5-1.0.2-2.rules:17 Invalid key 'SYSFS'.
Feb 05 14:59:30 aigas sddm-helper[2730]: gkr-pam: unable to locate daemon control file
Feb 05 15:03:17 aigas kernel: Bluetooth: hci0: Unknown advertising packet type: 0x40
Feb 05 15:34:17 aigas kernel: scsi 0:0:0:1: Failed to get diagnostic page 0x1
Feb 05 15:34:17 aigas kernel: scsi 0:0:0:1: Failed to bind enclosure -19
Feb 05 15:54:59 aigas kernel: Bluetooth: hci0: Hardware error 0x0c
Feb 05 15:54:59 aigas kernel: Bluetooth: hci0: Retrieving Intel exception info failed (-16)
Feb 05 16:00:00 aigas systemd[1]: Failed to start apport-autoreport.service - Process error reports when automatic reporting is enabled.
Feb 05 17:44:47 aigas kernel: Bluetooth: hci0: Unknown advertising packet type: 0x40
Feb 05 18:47:22 aigas kernel: Bluetooth: hci0: Hardware error 0x0c
Feb 05 18:47:22 aigas kernel: Bluetooth: hci0: Retrieving Intel exception info failed (-16)
Feb 05 18:47:44 aigas kernel: Bluetooth: hci0: Hardware error 0x0c
Feb 05 18:47:44 aigas kernel: Bluetooth: hci0: Retrieving Intel exception info failed (-16)
Feb 05 19:17:27 aigas kernel: audit: backlog limit exceeded
Feb 05 19:17:27 aigas kernel: audit: backlog limit exceeded
dmesg: read kernel buffer failed: Operation not permitted

Nothing there about nvidia.

So how do I get nvidia running again?

1 Like

I think I figured out what was going on.

I was using the machine to flash an SSD that is used in a Raspberry Pi-like device. I had to flash a new OS onto the device’s SSD. I was told to use something called rpi-imager. (https://github.com/raspberrypi/rpi-imager). This required a lengthy build which included several installations of stuff that probably fouled up my dependencies.

I tried reinstalling my nvidia driver but it wouldn’t because depencencies.

And then it turned out I didn’t need this d****d program at all. The new image came with its own imager.

So now I have to figure out how to uninstall this piece of crap and get my machine back to the correct dependencies.

Any help there would be appreciated.

Here are the fouled up dependencies that the RPi imager created. How can I undo this damage?

For next time, there is a very well maintained snap of rpi-imager that the Canonical Rpi maintainer actually keeps up to date 
 that will definitely not mess up your system :wink:

2 Likes

Nice to know, thanks, but can anyone tell me how to remove the bad one and restore my system to what it should be? My screenshot above tells me everything I need to install to get the driver working that the system won’t install. Is there some sort of “apt downgrade” command that would revert the system to what it was?

The link to the github page shows more than one method to install the rpi-imager
Did you install the imager_2.0.6_amd64.AppImage?
Did you build your own AppImage?
Or something else?

1 Like

Built my own. With the script. I followed these directions:

I think in particular that the Qt install script (the third step) is the most likely culprit here.

sudo ./qt/build-qt.sh

I would suggest that you work in reverse order to the GitHub instructions:-
You’ll need elevated privileges (sudo) to remove some files if they are not stored in your user directory.

  • Remove the Appimage
  • Remove build-qt.sh (should be in opt/Qt according to GitHub)
    You need to be careful here because you have Plasma which is built using QT framework
  • Delete the source code (from wherever you stored it)
  • Remove the following
 sudo apt remove build-essential cmake git libgnutls28-dev
  • Remove unwanted dependencies etc.
sudo apt autoremove

This is the approach I would use, but tread cautiously because I don’t know the exact state of your PC.

Always have a back up of your personal data.

1 Like

Hmmm. it looks like this Qt that was installed in /opt was not my main, previous Qt, which still exists. The new one is Qt6, the previous one is Qt5.

$ sudo find / -type d -name 'Qt'
/usr/lib/x86_64-linux-gnu/qt5/qml/Qt
/usr/lib/python3/dist-packages/orca/scripts/toolkits/Qt
find: ‘/proc/1056526/task/1056526/net’: Invalid argument
find: ‘/proc/1056526/net’: Invalid argument
find: ‘/home/scohen/wopa’: Permission denied
/home/scohen/setiastrosuitepro/.venv/lib/python3.12/site-packages/pyqtgraph/Qt
/home/scohen/rpi-imager/AppDir-x86_64/usr/qml/Qt
/home/scohen/rpi-imager/qt-build/qtbase/qml/Qt
/home/scohen/setiastrosuitepro-0/venv/lib/python3.12/site-packages/pyqtgraph/Qt
find: ‘/run/user/1001/gvfs’: Permission denied
find: ‘/run/user/1001/doc’: Permission denied
/snap/kf6-core24/33/usr/lib/x86_64-linux-gnu/qt6/qml/Qt
/snap/kf6-core24/34/usr/lib/x86_64-linux-gnu/qt6/qml/Qt
/opt/zoom/Qt
/opt/zoom/Qt/qml/Qt
/opt/Qt
/opt/Qt/6.9.3/gcc_64/qml/Qt
/var/lib/flatpak/runtime/org.kde.Platform/x86_64/5.15-24.08/ca531f435f2a16f9487cdce9727d7f20c9fd1c489bf89c2a581e3aa47c4772a3/files/lib/qml/Qt
/var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.9/f930fae18cfc829f51db18b9324905a3bebee0ec7e9d4d62afbb17f696fb20d0/files/lib/qml/Qt
/var/lib/flatpak/runtime/org.kde.Sdk/x86_64/5.15-24.08/6f4b6de0e4d528b689691c6c7e4ece9439b90955a1896e658953dba6f8d31d7c/files/lib/qml/Qt

Try a different search
This should provide the date modified.

cd /opt/Qt
ls -llt
1 Like

/opt/Qt$ ls -llt
total 4
drwxr-xr-x 3 root root 4096 Feb 5 10:49 6.9.3

As I thought, it didn’t exist before yesterday.

Doing what you suggested did help. I removed all the things you said I should remove, except I don’t do sudo apt autoremove after a bad experience with that. Additionally I got rid of /opt/Qt entirely based on your suggestion of looking at the directory.

Then I did a sudo apt remove of the driver, after which I could reinstall it and everything works again. Thanks.

sudo apt autoremove will first list the packages to be considered for removal.
It offers a Yes/No prompt - nothing is removed without user approval.

Anyway, if the topic is now solved, please mark the relevant post as the solution.
The platform software will automatically close the thread to prevent the discussion meandering off-topic in the future.

1 Like

This topic was automatically closed 18 hours after the last reply. New replies are no longer allowed.