dell/

Disable USB device

To disable USB device (audio device from Dell WD-19TB dock station in the example) when connecting it to your laptop, find it’s ids:

sudo lsusb -v

For example:

...
Bus 005 Device 007: ID 0bda:402e Realtek Semiconductor Corp. USB Audio
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x402e 
  bcdDevice            0.01
  iManufacturer           3 Generic
  iProduct                1 USB Audio
  iSerial                 2 200901010001
...

Save idVendor and idProduct values.

Create new file /lib/udev/rules.d/90-delldock.rules with the following content:

ACTION=="add", ATTR{idVendor}=="0bda", ATTR{idProduct}=="402e", RUN="/bin/sh -c 'echo 1 >/sys/\$devpath/remove'"

When the device is connected it will be automatically removed and your system won’t know about it

| 18 Mar 2022

Dell Precision 5540 - Battery drains in sleep mode

Run the following command to check the suspend mode:

cat /sys/power/mem_sleep

If the output looks like this:

[s2idle] deep

It means that very inefficient suspend mode is active (drains battery from 100% to 0 in 9 hours). To enable “deep” mode, edit file /etc/default/grub and append mem_sleep_default=deep to GRUB_CMDLINE_LINUX:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet mem_sleep_default=deep"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

Apply changes:

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Restart your laptop and verify changes:

$ cat /sys/power/mem_sleep
s2idle [deep]
| 1 Jan 2020