Resending an email from Dan Ritter (from the Debian user list) -- he sent it 
to the rosegarden-user list (basically at my request), but I looked in the 
archives and didn't see it there, so I suspect it did not get to the list.

(I suspect the email threading will be wrong.) 

I think the genesis of the message is fairly well explained in what I wrote, 
and a way to deal with the changing MIDI ports is explained in what Dan wrote.


----------  Forwarded Message  ----------

Subject: 
Date: Tuesday, June 30, 2020, 11:32:34 AM
From: Dan Ritter <d...@randomstring.org>
To: rhkra...@gmail.com
CC: debian-u...@lists.debian.org, rosegarden-user@lists.sourceforge.net

rhkra...@gmail.com wrote: 
> (Intentionally cross posted)
> 
> The following quotes are from an email to a rosegarden mail list -- 
Rosegarden 
> is a music notation (mcow) program.
> 
> A user is describing a problem in which it appears the MIDI ports (connected 
> via USB ports) change on each boot (or maybe even each start of the 
Rosegarden 
> program).
> 
> I just wondered if this is similar to the current Linux behavior related to 
> disks wherein, in the old days, disks came up in a consistent order, but 
> nowadays (maybe because of systemd?) they (or some of them) can start in 
> parallel and thus their device numbers are not consistent.
> 
> If a similar problem does exist with USB ports, is there a way to force them 
> to be identified in a consistent way on each boot (i.e., something like using 
> UUIDs or labels for disks)?
> 

Yes, and yes-but-no.

You want to ignore the USB ports and focus on the attached
devices. udev is the mechanism here.

For example, in /etc/udev/rules.d/70-ups  I have:

SUBSYSTEM=="usb", ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", 
SYMLINK+="ups0", GROUP="nut"

Which means that /dev/ups0 will be assigned to the USB device
that has an idVendor of 0764 and an idProduct of 0501, and be
accessible by anyone in the group nut.

So if you have a MIDI keyboard with idVendor 0499 (Yamaha) and 
idProduct 1617 (PSR-E353 digital keyboard) then you could plug
those numbers into a rule like the one above and whenever it was
connected, it would appear at, say, "/dev/midikb0".

SUBSYSTEM=="usb", ATTR{idVendor}=="0499", ATTR{idProduct}=="1617", 
SYMLINK+="midikb0", GROUP="audio"

lsusb (possibly with a -v) will help you find the currently
attached devices and their numbers.

Does that help?



-----------------------------------------


_______________________________________________
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user

Reply via email to