[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
** Changed in: libmtp (Debian) Status: Unknown => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
This bug was fixed in the package libmtp - 1.1.17-2ubuntu1 --- libmtp (1.1.17-2ubuntu1) focal; urgency=medium * In 69-libmtp.rules skip all printers, including some weird ones from HP as some test positive on mtp-probe (LP: #1863239). -- Till Kamppeter Sat, 21 Mar 2020 19:05:58 +0100 ** Changed in: libmtp (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
** No longer affects: pulseaudio (Ubuntu) ** No longer affects: systemd (Ubuntu) ** No longer affects: udev (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
Also reported to Debian https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954885 ** Bug watch added: Debian Bug tracker #954885 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954885 ** Also affects: libmtp (Debian) via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954885 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
Attached debdiff fixes this bug in the libmtp package, applying effectively the patch of the previous comment. ** Patch added: "libmtp_1.1.17-2_1.1.17-2ubuntu1.debdiff" https://bugs.launchpad.net/ubuntu/+source/udev/+bug/1863239/+attachment/5339786/+files/libmtp_1.1.17-2_1.1.17-2ubuntu1.debdiff ** Changed in: libmtp (Ubuntu) Status: Confirmed => Fix Committed ** Changed in: libmtp (Ubuntu) Status: Fix Committed => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
Correction for the patch, please use this one. ** Patch added: "69-libmtp.rules.patch" https://bugs.launchpad.net/ubuntu/+source/udev/+bug/1863239/+attachment/5339060/+files/69-libmtp.rules.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
The attached patch would fix this bug. It adds two rules to skip printers. The second skips all kinds of printers by checking whether the standard interface of a printer is present in the USB device. The first skips HP printers, it is the same rule as HPLIP uses. I have added it because it covers a second interface, which is probably of some weird proprietary HP printer devices. For my printer the bug goes away with this patch, also with any one of the two rules commented out. I think one can assume that there is no printer available which doubles as a media player. ** Patch added: "69-libmtp.rules.patch" https://bugs.launchpad.net/ubuntu/+source/udev/+bug/1863239/+attachment/5339056/+files/69-libmtp.rules.patch ** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
There was already a measure against wrongly identifying HP printers as media players, but it is a rather dirty workaround which does not work any more (therefore this bug). The rule in the end of 69-libmtp.rules checks the absence of the env variable libsane_matched and this variable is set for all HP printers by HPLIP. First, this rule fails miserably if HPLIP is not installed, and I cannot imagine that the libmtp package depends on HPLIP only to identify unsupported devices. Also the libmtp rules are applied for both "add" and "bind" actions, whereas the rules of HPLIP (56-hpmud.rules) are only applied for "add" and so the bug happens on a "bind" action, here the HPLIP rules do not set said env variable and so the libmtp rules probe the HP printers. One can theoretically work around this problem by mucking with the UDEV rules of HPLIP, but this is a REALLY DIRTY workaround, so please DO NOT add an hplip task to this bug report. In addition, HPLIP will not be installed by default any more in the not too far future, as prnting and scanning will get snapped. Also we want printer driver Snaps (Printer Applications) not to run as root if possible, so we need to be sure that USB printer device files always belong to the group "lp" for all printer manufacturers and without HPLIP. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
** Tags added: rls-ff-incoming -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
Now I tried to investigate from which UDEV rule the wrong setting comes from. First I searched all UDEV rules for the word "audio": till@till-x1yoga:~$ grep -l '\baudio\b' /*/udev/rules.d/*.rules /lib/udev/rules.d/50-udev-default.rules /lib/udev/rules.d/60-persistent-v4l.rules /lib/udev/rules.d/69-libmtp.rules /lib/udev/rules.d/70-uaccess.rules /lib/udev/rules.d/90-pulseaudio.rules till@till-x1yoga:~$ So I expect only one of these can be the culprit. Actually a 'GROUP="audio"' setting exists only in /lib/udev/rules.d/50-udev-default.rules and /lib/udev/rules.d/69-libmtp.rules The former is probably no problem as it assigns this group only to devices of 'SUBSYSTEM=="sound"" where the latter seems to be actually the culprit. First it includes some devices explicitly and then it lists thousands of supported devices. In the end there is some rule for passing a wide range of devices through an auto-probing: - # Autoprobe vendor-specific, communication and PTP devices ENV{ID_MTP_DEVICE}!="1", ENV{MTP_NO_PROBE}!="1", ENV{COLOR_MEASUREMENT_DEVICE}!="1", ENV{ID_GPHOTO}!="1", ENV{libsane_matched}!="yes", ATTR{bDeviceClass}=="00|02|06|ef|ff", PROGRAM="mtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}", RESULT=="1", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" - And this auto-probing tests positive on my printer: till@till-x1yoga:~$ /lib/udev/mtp-probe /sys/devices/pci:00/:00:14.0/usb1/1-1 001 012 1 till@till-x1yoga:~$ The device path of the printer I have taken from the blob in the udevadm output (attached to previous comment) which also contains "ID_MEDIA_PLAYER=1". So mtp-probe identifies my printer as a media player and assigns the device file to the "audio" group. I assume that this happens to most or even all HP printers, so an exclusion of only my device via Vendor and Product ID would not be the correct solution. Either mtp-probe needs to get fixed or before said rule in the end of the 69-libmtp.rules file and after the lines explicitly identifying media players from HP, there should be placed a line to exclude further HP devices, like -- ... # Exclude any further, not explicitly specified HP devices ATTR{idVendor}=="03f0", GOTO="libmtp_rules_end" # Autoprobe vendor-specific, communication and PTP devices ENV{ID_MTP_DEVICE}!="1", ENV{MTP_NO_PROBE}!="1", ENV{COLOR_MEASUREMENT_DEVICE}!="1", ENV{ID_GPHOTO}!="1", ENV{libsane_matched}!="yes", ATTR{bDeviceClass}=="00|02|06|ef|ff", PROGRAM="mtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}", RESULT=="1", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" LABEL="libmtp_rules_end" -- ** Changed in: systemd (Ubuntu) Status: Incomplete => Invalid ** Changed in: libmtp (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
Attached is the output of sudo udevadm monitor -e Output of lsusb: till@till-x1yoga:~$ lsusb Bus 002 Device 003: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 138a:0097 Validity Sensors, Inc. Bus 001 Device 004: ID 04f2:b5ce Chicony Electronics Co., Ltd Integrated Camera Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bus 001 Device 006: ID 056a:50b7 Wacom Co., Ltd Pen and multitouch sensor Bus 001 Device 012: ID 03f0:7a12 HP, Inc HP OfficeJet Pro 8730 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub till@till-x1yoga:~$ Device is on Bus 001, Device 012, the HP OfficeJet Pro 8730 Here one sees that it is assigned to the "audio" group: till@till-x1yoga:~$ ls -l /dev/bus/usb/*/* crw-rw-r-- 1 root root189, 0 Mar 17 11:45 /dev/bus/usb/001/001 crw-rw-r-- 1 root root189, 2 Mar 17 11:45 /dev/bus/usb/001/003 crw-rw-r-- 1 root root189, 3 Mar 17 11:45 /dev/bus/usb/001/004 crw-rw 1 root plugdev 189, 4 Mar 18 14:04 /dev/bus/usb/001/005 crw-rw-r-- 1 root root189, 5 Mar 17 11:45 /dev/bus/usb/001/006 crw-rw+ 1 root audio 189, 11 Mar 19 18:55 /dev/bus/usb/001/012 crw-rw-r-- 1 root root189, 128 Mar 17 11:45 /dev/bus/usb/002/001 crw-rw-r-- 1 root root189, 130 Mar 17 11:45 /dev/bus/usb/002/003 till@till-x1yoga:~$ ** Attachment added: "udevadm-monitor-e-plug-hp-officejet-pro-8730-20200319-log.txt" https://bugs.launchpad.net/ubuntu/+source/udev/+bug/1863239/+attachment/5338953/+files/udevadm-monitor-e-plug-hp-officejet-pro-8730-20200319-log.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
udev source package is obsolete and is not used since precise. ** Changed in: systemd (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
Please provide the udevadm database dump about the device in question a) when it has correct group b) when it does not. ** Changed in: udev (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
pulseaudio doesn't ship any udev rules that change group permissions of devices. Plus it doesn't run as root, but as an unprivileged user. ** Changed in: pulseaudio (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
An additional remark: If a Focal system is booted with the printer plugged in and turned on, the group ownership gets correctly set to "lp", but if the printer is only plugged in and/or turned on after boot, it gets "audio" group ownership. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
** Changed in: libmtp (Ubuntu) Importance: High => Critical ** Changed in: pulseaudio (Ubuntu) Importance: High => Critical ** Changed in: systemd (Ubuntu) Importance: High => Critical ** Changed in: udev (Ubuntu) Importance: High => Critical -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
** Tags added: focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1863239] Re: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group
** Changed in: systemd (Ubuntu) Milestone: None => ubuntu-20.04 ** Changed in: pulseaudio (Ubuntu) Milestone: None => ubuntu-20.04 ** Also affects: libmtp (Ubuntu) Importance: Undecided Status: New ** Changed in: libmtp (Ubuntu) Milestone: None => ubuntu-20.04 ** Changed in: libmtp (Ubuntu) Importance: Undecided => High -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863239 Title: /dev/bus/usb/*/* device file of HP multi-function printer assigned to "audio" group To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/1863239/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs