Package: laptop-detect
Version: 0.13.8
Severity: normal

Dear Maintainer,

laptop-detect returns "We're a laptop..." if a desktop station uses bluetooth 
keyboard or mouse.
May be other w/less devices get the same F/P.


debug for 0.13.8:

$ bash -x /usr/sbin/laptop-detect
+ PRINTIT=/bin/true
+ '[' '' '!=' '' ']'
+ test -d /proc/pmu
+ '[' -r /dev/mem -a -x /usr/sbin/dmidecode ']'
+ /sbin/modprobe battery
+ '[' -d /sys/class/power_supply ']'
+ grep -q Battery /sys/class/power_supply/hid-f0:65:dd:7a:a1:26-battery/type
+ /bin/true 'We'\''re a laptop (ACPI batteries found)'
+ exit 0


debug for 0.14:

$ bash -x /usr/bin/laptop-detect
+ PRINTIT=/bin/true
+ '[' '' '!=' '' ']'
+ test -d /proc/pmu
++ command -v dmidecode
+ dmidecode=
+ '[' -r /dev/mem -a -x '' ']'
+ '[' -e /sys/devices/virtual/dmi/id/chassis_type ']'
++ cat /sys/devices/virtual/dmi/id/chassis_type
+ chassis_type=3
+ case "$chassis_type" in
+ /sbin/modprobe battery
+ '[' -d /sys/class/power_supply ']'
+ grep -q Battery /sys/class/power_supply/hid-f0:65:dd:7a:a1:26-battery/type
+ /bin/true 'We'\''re a laptop (ACPI batteries found)'
+ exit 0


$ cat /sys/class/power_supply/hid-f0:65:dd:7a:a1:26-battery/type
Battery

$ ls -l /sys/class/power_supply/
total 0
lrwxrwxrwx 1 root root 0 Apr 11 23:28 hid-f0:65:dd:7a:a1:26-battery -> 
../../devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.1/4-1.1:1.0/bluetooth/hci0/hci0:42/0005:17EF:6038.0005/power_supply/hid-f0:65:dd:7a:a1:26-battery

$ bluetoothctl
...
[NEW] Device F0:65:DD:7A:A1:26 ThinkPad Bluetooth Laser Mouse
...


Do '/sys/class/power_supply/*/scope' can help?

--
Thanks,
Damir

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages laptop-detect depends on:
ii  dmidecode  3.0-4

laptop-detect recommends no packages.

laptop-detect suggests no packages.

-- no debconf information

Reply via email to