Hundreds of loop and tty devices on Core18?

My /dev directory is jam packed with hundreds of devices from a clean install. It looks like there are 256 loop devices, and probably just as many tty and pty devices.

autofs           loop12   loop164  loop208  loop252  loop67        pps0   ptycc  ptypd  ptyse  ptyvf  ptyz0   tty30  ttya7  ttyd8    ttyq4  ttyt5  ttyw6  ttyz7
block            loop120  loop165  loop209  loop253  loop68        pps1   ptycd  ptype  ptysf  ptyw0  ptyz1   tty31  ttya8  ttyd9    ttyq5  ttyt6  ttyw7  ttyz8
btrfs-control    loop121  loop166  loop21   loop254  loop69        ptmx   ptyce  ptypf  ptyt0  ptyw1  ptyz2   tty32  ttya9  ttyda    ttyq6  ttyt7  ttyw8  ttyz9
bus              loop122  loop167  loop210  loop255  loop7         ptp0   ptycf  ptyq0  ptyt1  ptyw2  ptyz3   tty33  ttyaa  ttydb    ttyq7  ttyt8  ttyw9  ttyza
char             loop123  loop168  loop211  loop26   loop70        pts    ptyd0  ptyq1  ptyt2  ptyw3  ptyz4   tty34  ttyab  ttydc    ttyq8  ttyt9  ttywa  ttyzb
console          loop124  loop169  loop212  loop27   loop71        ptya0  ptyd1  ptyq2  ptyt3  ptyw4  ptyz5   tty35  ttyac  ttydd    ttyq9  ttyta  ttywb  ttyzc
cpu_dma_latency  loop125  loop17   loop213  loop28   loop72        ptya1  ptyd2  ptyq3  ptyt4  ptyw5  ptyz6   tty36  ttyad  ttyde    ttyqa  ttytb  ttywc  ttyzd
disk             loop126  loop170  loop214  loop29   loop73        ptya2  ptyd3  ptyq4  ptyt5  ptyw6  ptyz7   tty37  ttyae  ttydf    ttyqb  ttytc  ttywd  ttyze
fd               loop127  loop171  loop215  loop3    loop74        ptya3  ptyd4  ptyq5  ptyt6  ptyw7  ptyz8   tty38  ttyaf  ttye0    ttyqc  ttytd  ttywe  ttyzf
full             loop128  loop172  loop216  loop30   loop75        ptya4  ptyd5  ptyq6  ptyt7  ptyw8  ptyz9   tty39  ttyb0  ttye1    ttyqd  ttyte  ttywf  ubi_ctrl
gpiochip0        loop129  loop173  loop217  loop31   loop76        ptya5  ptyd6  ptyq7  ptyt8  ptyw9  ptyza   tty4   ttyb1  ttye2    ttyqe  ttytf  ttyx0  urandom
gpiochip1        loop13   loop174  loop218  loop32   loop77        ptya6  ptyd7  ptyq8  ptyt9  ptywa  ptyzb   tty40  ttyb2  ttye3    ttyqf  ttyu0  ttyx1  vcs
gpiochip2        loop130  loop175  loop219  loop33   loop78        ptya7  ptyd8  ptyq9  ptyta  ptywb  ptyzc   tty41  ttyb3  ttye4    ttyr0  ttyu1  ttyx2  vcs1
gpiochip3        loop131  loop176  loop22   loop34   loop79        ptya8  ptyd9  ptyqa  ptytb  ptywc  ptyzd   tty42  ttyb4  ttye5    ttyr1  ttyu2  ttyx3  vcs2
gpiochip4        loop132  loop177  loop220  loop35   loop8         ptya9  ptyda  ptyqb  ptytc  ptywd  ptyze   tty43  ttyb5  ttye6    ttyr2  ttyu3  ttyx4  vcs3
gpiochip5        loop133  loop178  loop221  loop36   loop80        ptyaa  ptydb  ptyqc  ptytd  ptywe  ptyzf   tty44  ttyb6  ttye7    ttyr3  ttyu4  ttyx5  vcs4
gpiochip6        loop134  loop179  loop222  loop37   loop81        ptyab  ptydc  ptyqd  ptyte  ptywf  random  tty45  ttyb7  ttye8    ttyr4  ttyu5  ttyx6  vcs5
hwrng            loop135  loop18   loop223  loop38   loop82        ptyac  ptydd  ptyqe  ptytf  ptyx0  rfkill  tty46  ttyb8  ttye9    ttyr5  ttyu6  ttyx7  vcs6
i2c-0            loop136  loop180  loop224  loop39   loop83        ptyad  ptyde  ptyqf  ptyu0  ptyx1  rtc     tty47  ttyb9  ttyea    ttyr6  ttyu7  ttyx8  vcs9
i2c-1            loop137  loop181  loop225  loop4    loop84        ptyae  ptydf  ptyr0  ptyu1  ptyx2  rtc0    tty48  ttyba  ttyeb    ttyr7  ttyu8  ttyx9  vcsa
i2c-2            loop138  loop182  loop226  loop40   loop85        ptyaf  ptye0  ptyr1  ptyu2  ptyx3  shm     tty49  ttybb  ttyec    ttyr8  ttyu9  ttyxa  vcsa1
initctl          loop139  loop183  loop227  loop41   loop86        ptyb0  ptye1  ptyr2  ptyu3  ptyx4  stderr  tty5   ttybc  ttyed    ttyr9  ttyua  ttyxb  vcsa2
kmsg             loop14   loop184  loop228  loop42   loop87        ptyb1  ptye2  ptyr3  ptyu4  ptyx5  stdin   tty50  ttybd  ttyee    ttyra  ttyub  ttyxc  vcsa3
log              loop140  loop185  loop229  loop43   loop88        ptyb2  ptye3  ptyr4  ptyu5  ptyx6  stdout  tty51  ttybe  ttyef    ttyrb  ttyuc  ttyxd  vcsa4
loop-control     loop141  loop186  loop23   loop44   loop89        ptyb3  ptye4  ptyr5  ptyu6  ptyx7  tty     tty52  ttybf  ttymxc0  ttyrc  ttyud  ttyxe  vcsa5
loop0            loop142  loop187  loop230  loop45   loop9         ptyb4  ptye5  ptyr6  ptyu7  ptyx8  tty0    tty53  ttyc0  ttymxc1  ttyrd  ttyue  ttyxf  vcsa6
loop1            loop143  loop188  loop231  loop46   loop90        ptyb5  ptye6  ptyr7  ptyu8  ptyx9  tty1    tty54  ttyc1  ttymxc2  ttyre  ttyuf  ttyy0  vcsa9
loop10           loop144  loop189  loop232  loop47   loop91        ptyb6  ptye7  ptyr8  ptyu9  ptyxa  tty10   tty55  ttyc2  ttymxc3  ttyrf  ttyv0  ttyy1  vcsu
loop100          loop145  loop19   loop233  loop48   loop92        ptyb7  ptye8  ptyr9  ptyua  ptyxb  tty11   tty56  ttyc3  ttymxc4  ttys0  ttyv1  ttyy2  vcsu1
loop101          loop146  loop190  loop234  loop49   loop93        ptyb8  ptye9  ptyra  ptyub  ptyxc  tty12   tty57  ttyc4  ttyp0    ttys1  ttyv2  ttyy3  vcsu2
loop102          loop147  loop191  loop235  loop5    loop94        ptyb9  ptyea  ptyrb  ptyuc  ptyxd  tty13   tty58  ttyc5  ttyp1    ttys2  ttyv3  ttyy4  vcsu3
loop103          loop148  loop192  loop236  loop50   loop95        ptyba  ptyeb  ptyrc  ptyud  ptyxe  tty14   tty59  ttyc6  ttyp2    ttys3  ttyv4  ttyy5  vcsu4
loop104          loop149  loop193  loop237  loop51   loop96        ptybb  ptyec  ptyrd  ptyue  ptyxf  tty15   tty6   ttyc7  ttyp3    ttys4  ttyv5  ttyy6  vcsu5
loop105          loop15   loop194  loop238  loop52   loop97        ptybc  ptyed  ptyre  ptyuf  ptyy0  tty16   tty60  ttyc8  ttyp4    ttys5  ttyv6  ttyy7  vcsu6
loop106          loop150  loop195  loop239  loop53   loop98        ptybd  ptyee  ptyrf  ptyv0  ptyy1  tty17   tty61  ttyc9  ttyp5    ttys6  ttyv7  ttyy8  vcsu9
loop107          loop151  loop196  loop24   loop54   loop99        ptybe  ptyef  ptys0  ptyv1  ptyy2  tty18   tty62  ttyca  ttyp6    ttys7  ttyv8  ttyy9  vga_arbiter
loop108          loop152  loop197  loop240  loop55   mapper        ptybf  ptyp0  ptys1  ptyv2  ptyy3  tty19   tty63  ttycb  ttyp7    ttys8  ttyv9  ttyya  watchdog
loop109          loop153  loop198  loop241  loop56   mem           ptyc0  ptyp1  ptys2  ptyv3  ptyy4  tty2    tty7   ttycc  ttyp8    ttys9  ttyva  ttyyb  watchdog0
loop11           loop154  loop199  loop242  loop57   mmcblk0       ptyc1  ptyp2  ptys3  ptyv4  ptyy5  tty20   tty8   ttycd  ttyp9    ttysa  ttyvb  ttyyc  zero
loop110          loop155  loop2    loop243  loop58   mmcblk0boot0  ptyc2  ptyp3  ptys4  ptyv5  ptyy6  tty21   tty9   ttyce  ttypa    ttysb  ttyvc  ttyyd
loop111          loop156  loop20   loop244  loop59   mmcblk0boot1  ptyc3  ptyp4  ptys5  ptyv6  ptyy7  tty22   ttyS0  ttycf  ttypb    ttysc  ttyvd  ttyye
loop112          loop157  loop200  loop245  loop6    mmcblk0p1     ptyc4  ptyp5  ptys6  ptyv7  ptyy8  tty23   ttyS1  ttyd0  ttypc    ttysd  ttyve  ttyyf
loop113          loop158  loop201  loop246  loop60   mmcblk0p2     ptyc5  ptyp6  ptys7  ptyv8  ptyy9  tty24   ttya0  ttyd1  ttypd    ttyse  ttyvf  ttyz0
loop114          loop159  loop202  loop247  loop61   mmcblk0rpmb   ptyc6  ptyp7  ptys8  ptyv9  ptyya  tty25   ttya1  ttyd2  ttype    ttysf  ttyw0  ttyz1
loop115          loop16   loop203  loop248  loop62   mqueue        ptyc7  ptyp8  ptys9  ptyva  ptyyb  tty26   ttya2  ttyd3  ttypf    ttyt0  ttyw1  ttyz2
loop116          loop160  loop204  loop249  loop63   net           ptyc8  ptyp9  ptysa  ptyvb  ptyyc  tty27   ttya3  ttyd4  ttyq0    ttyt1  ttyw2  ttyz3
loop117          loop161  loop205  loop25   loop64   null          ptyc9  ptypa  ptysb  ptyvc  ptyyd  tty28   ttya4  ttyd5  ttyq1    ttyt2  ttyw3  ttyz4
loop118          loop162  loop206  loop250  loop65   port          ptyca  ptypb  ptysc  ptyvd  ptyye  tty29   ttya5  ttyd6  ttyq2    ttyt3  ttyw4  ttyz5
loop119          loop163  loop207  loop251  loop66   ppp           ptycb  ptypc  ptysd  ptyve  ptyyf  tty3    ttya6  ttyd7  ttyq3    ttyt4  ttyw5  ttyz6

What’s up with this?

the kernel creates by default 255 loop devices (that’s a build config option) and since snaps are all loop mounted this is correct and desired (it would slow down teh boot a lot if you would always have to call losetup for each snap)… having 63 tty[0-9*] (as well as matching pty) devices is normal too …

the ones with tty[a-z][0-9*] are very weird though … likewise for the pty[a-z][0-9*] ones …

1 Like

Is my kernel misconfigured, then?

does it misbehave in any way ? (i mean … after all thats just cosmetic)

Not sure yet. I’m messing with some ACM devices and how they enumerate on my device. I haven’t really gotten into the thick of it yet. I am having some odd behavior with usbutils-lool.

unable to initialize libusb: -99

Though I might just be missing a few drivers. Any advice on getting USB drivers you can offer?

did you connect the interfaces like

snap info usbutils-lool 

says ?

Ah, that would help.


error: snap "usbutils" has no plug named "network-control"
error: snap "usbutils" has no plug named "raw-usb"

I could just be a complete fool though.

Ah, doing usbutils-lool works.

I think this error message should inform the user that their snap doesn’t exist. Because this implies that I have a snap called whatisligma

error: snap "whatisligma" has no plug named "raw-usb"

I’ll open a PR after work today.

This looks like a bug in your kernel, we have seen similar issues with the kernel on Arch before and it was fixed a while ago IIRC, searching around the forum should help you find what that issue was, it was fixed in a newer kernel revision, so maybe easiest thing to do is to just try a newer kernel revision ?

I’m on Kernel 5.4. Do you think that’s new enough?

Ah yes that should be new enough, the issue I was thinking of was Mounts broken with kernel 5.2

1 Like

@willnilges have you ever booted that device with the same kernel in a non-UbuntuCore setup ?

perhaps it is simply how this kernel populates /dev normally ?

I have not. It’s pretty close to the mainline kernel, though. I guess I could try it out with OpenWrt if I have some spare time at work…