Re: [gentoo-user] Why is "mtp-probe" running when I plug in a USB device?
On Fri, Jan 21, 2022 at 4:23 PM Grant Edwards wrote: > > Why does that library think it should be probing every USB device I > plug in? Is that automatic probing required for libmtp and mtpfs to > work? I'm guessing that MTP cannot be detected by just looking at a device ID/etc and requires some kind of interrogation. It looks like libmtp is designed to create a device node /dev/libmtp-1-4 which I'm guessing it uses for later operations like mounting/etc. Doing this at time of insertion makes the most sense, since that is how most device nodes work. Note that anytime you plug in a USB device, or just about any other device, code tends to run. When a sound device raises an IRQ to call attention to its buffer being exhausted, code tends to run. When a hard drive is asked to read a block off the disk and has it available to read, it likely raises an interrupt, and code runs. Much of this code is in the kernel, but there is a general trend towards moving more of this stuff into userspace, so now you notice it more, vs it just showing up as a system % cpu figure in top with little transparency into what is going on if you aren't actually doing traces of some kind. With tools like udev more of this is configurable as you've noticed. I wouldn't view any of this as a bad thing. You're more aware of it now, and you have more control over it now, and if the code does the run thing it is more likely to be running as nobody instead of as the kernel. Why should it be strange that when you plug in a device, the operating system tries to figure out what sort of device it is, and set it up so that you can access it from userspace? > I do _not_ want anything to happen "automagically" when I plug in a > USB mtp device. I know if a device is an MTP device, and if I want it > mounted, I'll mount it manually. Well, you can of course disable the udev rule. I'm not sure if there are issues with running device probing on demand. Obviously the whole udev framework is designed to dynamically create and destroy device nodes as devices are plugged in or removed. Would you want /dev/sdb to not exist until you're ready to mount the disk drive? Perhaps you would want to run some command line identifying the disk by its host and port or something, so that it can create /dev/sdb, and then you can mount it normally from there? Should ALSA devices not exist until the first time you're ready to play a sound? Then you run something as root to configure them? -- Rich
[gentoo-user] Re: Why is "mtp-probe" running when I plug in a USB device?
On 2022-01-21, Grant Edwards wrote: > [...] > > This appears to be triggered by a rule in > >/lib/udev/rules.d/69-libmtp.rules > > which is owned by media-libs/libmtp > > Why does that library think it should be probing every USB device I > [...] Oh, and tell those damn kids to GET OFF MY LAWN! -- Grant
[gentoo-user] Why is "mtp-probe" running when I plug in a USB device?
I've noticed that whenever I plug in any sort of USB device, "mtp-probe" runs and logs the fact that the newly attached thing "was not an MTP device". This appears to be triggered by a rule in /lib/udev/rules.d/69-libmtp.rules which is owned by media-libs/libmtp Why does that library think it should be probing every USB device I plug in? Is that automatic probing required for libmtp and mtpfs to work? I do _not_ want anything to happen "automagically" when I plug in a USB mtp device. I know if a device is an MTP device, and if I want it mounted, I'll mount it manually. -- Grant
Re: [gentoo-user] how to restart the network, no net.enp1s0
On 2022.01.21 07:48, n952162 wrote: The point is, something has changed in openrc, and I was hoping somebody knew about it. It used to be that you could restart the network with: rc-service net.enp1s0 restart which would use the link in /etc/init.d. But that link is now gone, although the network works. Something fundamental has changed, I think, and I thought it would pop out here, but I guess I'm the only one still using openrc. I use openrc, and that link is still present (enp25s0 for me). I'm on kernel 5.15.3, and am currently compiling 5.16.1. Up to date amd64 system with a select set of ~amd64 packages. On 1/16/22 19:06, Mark Knecht wrote: On Sun, Jan 16, 2022 at 1:50 AM n952162 wrote: Hello all, my system runs fine, but when I want to restart my network, I find there's no /etc/init.d/net.enp1s0 link or other interesting candidate. Do something change here? What do I need to do to restart my network? Obviously the answers depends completely on how you are managing services and what executables you have on your highly customizable Gentoo machine, but possibly: sudo service network-manager restart sudo systemctl restart NetworkManager.service sudo nmcli networking off && sudo nmcli networking on sudo ifdown -a && sudo ifup -a If you are using systemctl then sudo systemctl status is a good place to start, along with nmcli HTH, Mark
[gentoo-user] grub 0.97-r18 fails sanity check, stage2 larger than 1MB
I think emerge wants to rebuild grub because of a changed USE flag. [ebuild R] sys-boot/grub-0.97-r18::Skippy USE="ncurses -custom-cflags -netboot -static" KERNEL="(-linux%*)" 0 KiB When doing so it fails. * Sanity check failed: stage2 (/var/tmp/portage/sys-boot/grub-0.97-r18/work/grub-0.97/stage2/stage2) is larger than 1MB (268959736 bytes)! * Please check your CFLAGS and/or file a bug report at https://bugs.gentoo.org. * ERROR: sys-boot/grub-0.97-r18::Skippy failed (install phase): * stage2 sanity check failed I've done some googling about and found nothing that helps me out. Here is the full emerge output: https://pastebin.com/XAjAiQFp Suggestions please and thank you! Skippy
Re: [gentoo-user] how to restart the network, no net.enp1s0
On Friday, 21 January 2022 12:48:51 GMT n952162 wrote: > It used to be that you could restart the network with: > >rc-service net.enp1s0 restart > > which would use the link in /etc/init.d. But that link is now gone, > although the network works. Something fundamental has changed, I think, > and I thought it would pop out here, but I guess I'm the only one still > using openrc. Au contraire; my /etc/init.d/net.eth0 is still present. Or are you talking about a ~amd64 system? Mine's not ~. This machine faces no prospect of net interfaces coming and going, so I specify net.ifnames=0 on the kernel command line to keep the eth0 name. -- Regards, Peter.
Re: [gentoo-user] how to restart the network, no net.enp1s0
There was a news item on network naming - it might be that. A couple of people got caught by it. BillK On 21/1/22 20:48, n952162 wrote: The point is, something has changed in openrc, and I was hoping somebody knew about it. It used to be that you could restart the network with: rc-service net.enp1s0 restart which would use the link in /etc/init.d. But that link is now gone, although the network works. Something fundamental has changed, I think, and I thought it would pop out here, but I guess I'm the only one still using openrc. On 1/16/22 19:06, Mark Knecht wrote: On Sun, Jan 16, 2022 at 1:50 AM n952162 wrote: Hello all, my system runs fine, but when I want to restart my network, I find there's no /etc/init.d/net.enp1s0 link or other interesting candidate. Do something change here? What do I need to do to restart my network? Obviously the answers depends completely on how you are managing services and what executables you have on your highly customizable Gentoo machine, but possibly: sudo service network-manager restart sudo systemctl restart NetworkManager.service sudo nmcli networking off && sudo nmcli networking on sudo ifdown -a && sudo ifup -a If you are using systemctl then sudo systemctl status is a good place to start, along with nmcli HTH, Mark
Re: [gentoo-user] how to restart the network, no net.enp1s0
The point is, something has changed in openrc, and I was hoping somebody knew about it. It used to be that you could restart the network with: rc-service net.enp1s0 restart which would use the link in /etc/init.d. But that link is now gone, although the network works. Something fundamental has changed, I think, and I thought it would pop out here, but I guess I'm the only one still using openrc. On 1/16/22 19:06, Mark Knecht wrote: On Sun, Jan 16, 2022 at 1:50 AM n952162 wrote: Hello all, my system runs fine, but when I want to restart my network, I find there's no /etc/init.d/net.enp1s0 link or other interesting candidate. Do something change here? What do I need to do to restart my network? Obviously the answers depends completely on how you are managing services and what executables you have on your highly customizable Gentoo machine, but possibly: sudo service network-manager restart sudo systemctl restart NetworkManager.service sudo nmcli networking off && sudo nmcli networking on sudo ifdown -a && sudo ifup -a If you are using systemctl then sudo systemctl status is a good place to start, along with nmcli HTH, Mark
Re: [gentoo-user] how to restart the network, no net.enp1s0
I guess openrc has fallen out of favor ... On 1/16/22 19:06, Mark Knecht wrote: On Sun, Jan 16, 2022 at 1:50 AM n952162 wrote: Hello all, my system runs fine, but when I want to restart my network, I find there's no /etc/init.d/net.enp1s0 link or other interesting candidate. Do something change here? What do I need to do to restart my network? Obviously the answers depends completely on how you are managing services and what executables you have on your highly customizable Gentoo machine, but possibly: sudo service network-manager restart sudo systemctl restart NetworkManager.service sudo nmcli networking off && sudo nmcli networking on sudo ifdown -a && sudo ifup -a If you are using systemctl then sudo systemctl status is a good place to start, along with nmcli HTH, Mark
Re: [gentoo-user] Contribution: Python C Code builder, Simple Build
Andrew: Agreed. Recently people have been sending binaries in mailing list. On Fri, 21 Jan 2022, 9:49 am Andrew Lowe, wrote: > On 21/1/22 10:32 am, Matt Connell wrote: > > On Thu, 2022-01-20 at 17:12 +0100, Attila Boczkó wrote: > >> I would like to send a little python program that runs GCC to compile > >> the C code. The C Code can put multiple sub directories in the main > >> SRC directory. The python code uses os.walk method to find all C Code > >> files and pass it to GCC. > > > > So, you've reinvented makefiles? > > > > > > There have been a few "weird" posts lately, authors "Attilla" & > "xbx", > and subjects, amongst others, "Technical Docum". Is this someone > trying to contribute or a spam/spear phishing attack? > > Andrew > > >