Re: [gentoo-user] "Amount" of fstrim? (curiosity driven, no paranoia :)
On 04/26 09:58, Rich Freeman wrote: > On Sun, Apr 26, 2020 at 9:43 PM wrote: > > > > To implement a dry run with a printf() is new to me... ;) > > > > That is all they fstrim authors could do, since there is no dry-run > option for the actual ioctl, and fstrim itself has no idea how the > filesystem will implement it (short of re-implementing numerous > filesystems in the program and running it on unmounted devices). It > seems like an fstrim dry-run is only minimally functional, though I > guess it will test if you made any gross errors in syntax and so on. > I don't see any reason why they couldn't have a dry-run option for the > ioctl, but it would have to be implemented in the various filesystems. > Really it seems like ioctl in general in the kernel isn't > super-well-documented. It isn't like the system call interface. That > is, unless I just missed some ioctl document floating around. The > actual list of ioctls is in the kernel includes, but this does not > define the syntax of the 3rd parameter of the ioctl system call which > is function-specific. The structure used by the FITRIM ioctl is in the > includes, but not with any kind of documentation or even a > cross-reference to associate the structure with the ioctl itself. > > -- > Rich > Hi Rich, thanks for the explanations again. But I think it is better not to implement a feature at all as via printf. For a dry run I had expected, that some checks had been implemented, whether a non-dry run would be successfull. For example: When submitting fstrim -n / as normal user I get: /: 0 B (dry run) trimmed Doing the same without dry run set I get: fstrim: /: FITRIM ioctl failed: Operation not permitted When doing a fstrim -n /home/user as normal user, I get the same behaviour as above -- despite that /home/user is on a harddisk with no fstrim functionality at all. If fstrim cannot implement the above correctlu, it would be better not to implement it all...I think. Cheers! Meino
Re: [gentoo-user] "Amount" of fstrim? (curiosity driven, no paranoia :)
On Sun, Apr 26, 2020 at 9:43 PM wrote: > > To implement a dry run with a printf() is new to me... ;) > That is all they fstrim authors could do, since there is no dry-run option for the actual ioctl, and fstrim itself has no idea how the filesystem will implement it (short of re-implementing numerous filesystems in the program and running it on unmounted devices). It seems like an fstrim dry-run is only minimally functional, though I guess it will test if you made any gross errors in syntax and so on. I don't see any reason why they couldn't have a dry-run option for the ioctl, but it would have to be implemented in the various filesystems. Really it seems like ioctl in general in the kernel isn't super-well-documented. It isn't like the system call interface. That is, unless I just missed some ioctl document floating around. The actual list of ioctls is in the kernel includes, but this does not define the syntax of the 3rd parameter of the ioctl system call which is function-specific. The structure used by the FITRIM ioctl is in the includes, but not with any kind of documentation or even a cross-reference to associate the structure with the ioctl itself. -- Rich
Re: [gentoo-user] "Amount" of fstrim? (curiosity driven, no paranoia :)
On 04/26 03:29, Rich Freeman wrote: > On Sun, Apr 26, 2020 at 12:15 PM wrote: > > > > On 04/26 11:20, Rich Freeman wrote: > > > On Sun, Apr 26, 2020 at 10:52 AM wrote: > > > > > > > > Fstrim reports about 200 GiB of trimmed data. > > > > > > > > > > My suggestion would be to run fstrim twice in a row and see how fast > > > it operates and what the results are. If the second one completes > > > very quickly that suggests that the drive is sane. I'd probably just > > > run it daily in that case, but weekly is probably fine especially if > > > the drive isn't very full. > > > > > > > host:/root>fstrim -v / > > /: 3.3 GiB (3578650624 bytes) trimmed > > host:/root>fstrim -v / > > /: 0 B (0 bytes) trimmed > > > > This time the first fstrim reports a small mount of trimmed > > data and second one no fstrimmed data at all. > > > > Ok, I became a bit less lazy and started looking at the source. > > All fstrim does is send an FITRIM ioctl to the kernel for the device. > This is implemented in a filesystem-dependent manner, and I couldn't > actually find any documentation on it (actual documentation on the > ioctl - not the fstrim manpage/etc). A quick glimpse at the ext4 > source suggests that ext4 has a flag that can track whether a group of > blocks has been trimmed yet or not since it was last deallocated. So > ext4 will make repeated fstrim runs a no-op and the drive won't see > these. > > At least, that was what I got after about 5-10min of browsing. I > didn't take the time to grok how ext4 tracks free space and so on. > > Incidentally, in the other thread the reason that dry-run didn't > report anything to be trimmed is that this is hard-coded: > printf(_("%s: 0 B (dry run) trimmed on %s\n"), path, devname); > https://github.com/karelzak/util-linux/blob/master/sys-utils/fstrim.c#L109 > > Otherwise the ioctl returns how much space was trimmed, and fstrim outputs > this. > > -- > Rich > Hi Rich, thank you very much for digging into the depth of the sources and for explaining it!!! Very appreciated !!! :) :) To implement a dry run with a printf() is new to me... ;) Cheers! Meino
Re: problems with slack and zoom: Was: [gentoo-user] ALSA wizard...
On Mon, Apr 27, 2020 at 12:03 AM Jack wrote: > > On 2020.04.26 18:22, Jorge Almeida wrote: > > On Sun, Apr 26, 2020 at 8:28 PM Jack > > wrote: > > > > The slack ebuild might go stable, but the zoom one seems to change too > often to last 30 days before an update, so stable seems unlikely. At > least I don't think either of them pulls in many (or even any) other > unstable packages. > Well, it pulls unstable qt stuff, which is really the problem. Last time I tried, emerge choked on one of those, just before trying to compile zoom itself. Jorge
Re: problems with slack and zoom: Was: [gentoo-user] ALSA wizard...
On 2020.04.26 18:22, Jorge Almeida wrote: On Sun, Apr 26, 2020 at 8:28 PM Jack wrote: > > On 2020.04.26 15:08, Jorge Almeida wrote: > [snip] > I run a mostly stable amd64 system with selected ~amd64 packages. I > use both slack and zoom reasonably often, and have not had any install > related problems. (I don't necessarily TRUST either of them, but my > use of them is for a project with nothing particularly confidential of > private.) I'd say if you care enough to bother - start a separate > thread about why those two fail emerge for you. I seem to have > recurring problems with audio and/or video, but I'm pretty sure that is > hardware and/or system related - not due directly to either slack or > zoom. > I'll see about pulseaudio first, and if discord doesn't work even so I'll try that. Meanwhile, the ebuilds may change, or even go stable. Thanks, Jorge The slack ebuild might go stable, but the zoom one seems to change too often to last 30 days before an update, so stable seems unlikely. At least I don't think either of them pulls in many (or even any) other unstable packages. Years ago, pulseaudio seemed to have a bad reputation for being really difficult to deal with, but that is no longer the case, so hopefully you'll make progress in that direction. Jack
Re: problems with slack and zoom: Was: [gentoo-user] ALSA wizard...
On Sun, Apr 26, 2020 at 8:28 PM Jack wrote: > > On 2020.04.26 15:08, Jorge Almeida wrote: > [snip] > I run a mostly stable amd64 system with selected ~amd64 packages. I > use both slack and zoom reasonably often, and have not had any install > related problems. (I don't necessarily TRUST either of them, but my > use of them is for a project with nothing particularly confidential of > private.) I'd say if you care enough to bother - start a separate > thread about why those two fail emerge for you. I seem to have > recurring problems with audio and/or video, but I'm pretty sure that is > hardware and/or system related - not due directly to either slack or > zoom. > I'll see about pulseaudio first, and if discord doesn't work even so I'll try that. Meanwhile, the ebuilds may change, or even go stable. Thanks, Jorge
Re: [gentoo-user] ALSA wizard...
On Sun, Apr 26, 2020 at 1:50 PM Jorge Almeida wrote: > > On Sun, Apr 26, 2020 at 9:23 PM Mark Knecht wrote: > > > > > > > > On Sun, Apr 26, 2020 at 1:06 PM Jorge Almeida wrote: > > > > > > Some reading I did about people having problems similar to yours with discord and zoom suggested that some of these aps are compiled to __only__ support pulseaudio and then they supply it if it's not already on the system. Even though you don't build it using a specific portage entry in your world file doesn't mean it's not on your system if it was buried in the zoom/discord code. > > Hummm... But then discord would not complain about not being able to > initialize audio? You're probably right unless it looks for pulseaudio, cannot find it, and tried to do Alsa and then fails. I might make assumptions about Alsa that aren't correct or possibly there's something about this specific Behringer device that doesn't support something required in application initialization. Who knows? (Certainly not you and I!) ;-) > > > > 1) Run 'pulseaudio' at the command line to check > There is no such thing (if it were hidden in some app it would not be > in the PATH, anyway) > And I regularly check what's cooking, with "ps axf". Sounds correct unless it was the discord application path. But I suspect you're correct. > > > > Any 'real' pulseaudio build can be configured to not 'autospawn' via it's config files. That way people who don't want it, or think they don't, can have it on the system but run it only when they need it and shut it down when they don't. I did that for awhile. That sort of setup might be more acceptable for your needs and would allow you to build it and manage it yourself. I don't know. Something to consider. On Gentoo I wouldn't be fearful of building it and trying it out. Not sure what flags you'd want to enable or whether you'll end up in some sort of dependency hell as can happen with this sort of stuff on Gentoo. > > Yes, stuff to learn, if possible. (But dependency hell is a definite > possibility, not because Gentoo but due to the mindset that lurks > beneath pulseaudio & friends) I was just fiddling with pavucontrol-qt on my system. I found it easy to at least switch application audio from one sound to another on the fly. It mixes multiple applications to a single sound card correctly and let's me adjust volume for each application. Not sure if it is able to store away settings for that sort of stuff, it probably is though. I think it could be useful if I really learned how to use it, but in my case keeping it completely away from my high-end audio flow is super critical as it adds latency and cannot improve audio quality coming from a high-end microphone and preamp micing a guitar. Anyway, not sure there's much more to add to this thread. It's pretty much run it's course. If you find a reliable solution to this problem I hope you'll report back. I suspect this thread will end up with a number of hits for people searching for answers to this question. (Too bad we don't have any!!!) ;-) Over and out. Cheers, Mark
Re: [gentoo-user] ALSA wizard...
On Sun, Apr 26, 2020 at 9:23 PM Mark Knecht wrote: > > > > On Sun, Apr 26, 2020 at 1:06 PM Jorge Almeida wrote: > > > Some reading I did about people having problems similar to yours with discord > and zoom suggested that some of these aps are compiled to __only__ support > pulseaudio and then they supply it if it's not already on the system. Even > though you don't build it using a specific portage entry in your world file > doesn't mean it's not on your system if it was buried in the zoom/discord > code. Hummm... But then discord would not complain about not being able to initialize audio? > > 1) Run 'pulseaudio' at the command line to check There is no such thing (if it were hidden in some app it would not be in the PATH, anyway) And I regularly check what's cooking, with "ps axf". > Any 'real' pulseaudio build can be configured to not 'autospawn' via it's > config files. That way people who don't want it, or think they don't, can > have it on the system but run it only when they need it and shut it down when > they don't. I did that for awhile. That sort of setup might be more > acceptable for your needs and would allow you to build it and manage it > yourself. I don't know. Something to consider. On Gentoo I wouldn't be > fearful of building it and trying it out. Not sure what flags you'd want to > enable or whether you'll end up in some sort of dependency hell as can happen > with this sort of stuff on Gentoo. Yes, stuff to learn, if possible. (But dependency hell is a definite possibility, not because Gentoo but due to the mindset that lurks beneath pulseaudio & friends) > Cheers Jorge
Re: [gentoo-user] ALSA wizard...
On Sun, Apr 26, 2020 at 1:06 PM Jorge Almeida wrote: > > On Sun, Apr 26, 2020 at 8:34 PM Mark Knecht wrote: > > I'll investigate what I can do sending files by hand. However on the USB only machine all the internal sound card hardware is blacklisted so modules aren't loaded. I don't know that I want to upset the environment on that machine very much but a bit more about this at the bottom of this post. > > > No, please don't bother. I only mentioned because I thought you might > know it out of hand. I'll search documentation about pulseaudio, if I > can find it. It occurred to me that it would be an acceptable setup if > pulseaudio could be coaxed into managing just the USB card (as hw > card, not as virtual card) and leave the HD audio alone. I would use > the USB to voice chat and the MB card to everything else. (I would > have to buy another pair of headphones, but maybe headphones for > speech-only would not add too much clutter to the desk...) > Some reading I did about people having problems similar to yours with discord and zoom suggested that some of these aps are compiled to __only__ support pulseaudio and then they supply it if it's not already on the system. Even though you don't build it using a specific portage entry in your world file doesn't mean it's not on your system if it was buried in the zoom/discord code. 1) Run 'pulseaudio' at the command line to check 2) If it's there run pavucontrol at the command line to get started configuring it. pulseaudio can, on paper anyway, mix multiple audio signals on the fly and can (I think) send the mixed audio to multiple sound cards. Any 'real' pulseaudio build can be configured to not 'autospawn' via it's config files. That way people who don't want it, or think they don't, can have it on the system but run it only when they need it and shut it down when they don't. I did that for awhile. That sort of setup might be more acceptable for your needs and would allow you to build it and manage it yourself. I don't know. Something to consider. On Gentoo I wouldn't be fearful of building it and trying it out. Not sure what flags you'd want to enable or whether you'll end up in some sort of dependency hell as can happen with this sort of stuff on Gentoo. Cheers, Mark
Re: [gentoo-user] ALSA wizard...
On Sun, Apr 26, 2020 at 8:34 PM Mark Knecht wrote: > > > > On Sun, Apr 26, 2020 at 12:09 PM Jorge Almeida wrote: > > > > > > Since you use pulseaudio (per your latest post): can you send the > > contents of a wav file to an external DAC via toslink, without > > pulseaudio messing with the file? (Most people don't seem to care > > whether the signal is first converted to analog, and resampled, and > > converted to digital, and whatnot, before leaving the computer...) > > > I'll investigate what I can do sending files by hand. However on the USB only > machine all the internal sound card hardware is blacklisted so modules aren't > loaded. I don't know that I want to upset the environment on that machine > very much but a bit more about this at the bottom of this post. > No, please don't bother. I only mentioned because I thought you might know it out of hand. I'll search documentation about pulseaudio, if I can find it. It occurred to me that it would be an acceptable setup if pulseaudio could be coaxed into managing just the USB card (as hw card, not as virtual card) and leave the HD audio alone. I would use the USB to voice chat and the MB card to everything else. (I would have to buy another pair of headphones, but maybe headphones for speech-only would not add too much clutter to the desk...) > and running on your system. You probably don't have the qt version on a > non-KDE system I suspect. I don't have pulseaudio installed, I'm quite sure. I have qt, because some applications use it. > > I am tending to trust this link for a description of pulseaudio's purpose. > > https://superuser.com/questions/144648/how-do-alsa-and-pulseaudio-relate Will check it. > > Anyway, last thing for now would be that I'm still willing and slightly > interested in looking at discord/zoom/whatever for my own needs. If I make > some headway, or if you want to collaborate in that area let me know, either > through gentoo-user of privately. If you need a voice chat to talk with your friends/co-workers/etc, maybe mumble would be a good choice. It's the only one that recognized my hw and allowed to calibrate the micro. It also allows to choose the sound source by hand, if needed (contrary to all the others). And it is open source. (But it would require that one of you setup a server, or else use a paying server.) > Cheers Jorge
Re: [gentoo-user] ALSA wizard...
On Sun, Apr 26, 2020 at 12:09 PM Jorge Almeida wrote: > > On Sun, Apr 26, 2020 at 5:58 PM Mark Knecht wrote: > > > > > > > Mark, > > I recompiled the kernel with more stuff as module, but I just had an > idea to make sure the Behringer is the only card in the game: I > disabled HD audio in the firmware settings. So: both Opera and Chrome > play Youtube. aplay plays music files just fine, as it did before. > Audacious also works (it requires modifying the former settings; > that's probably what was missing before). So, I would say everything > works, except stuff like discord. To my shame, I didn't check the logs > with enough attention: it says: > > [000:000] [5256] (audio_device_pulse_linux.cc:1547): failed to load symbol table > [000:000] [5256] (audio_device_pulse_linux.cc:145): failed to > initialize PulseAudio > [000:000] [5256] (audio_device_impl.cc:377): Audio device initialization failed. > > (To my defence: the ebuild does't try to pull pulseaudio; one would > assume that it would be a dependency) > > Hence: no mystery at all, just the usual with linux nowadays. > > I'll keep searching for some audio chat package that works. mumble > seems promising, but it requires an available server. zoom (which most > people @work use) doesn't emerge. slack does emerge and vomits a > totally unresponsive window (well, not *totally* unresponsive: Ctrl+Q > works :)) > > Since you use pulseaudio (per your latest post): can you send the > contents of a wav file to an external DAC via toslink, without > pulseaudio messing with the file? (Most people don't seem to care > whether the signal is first converted to analog, and resampled, and > converted to digital, and whatnot, before leaving the computer...) > > I appreciate the enormous amount of effort you put on this. > Thanks > > Jorge I'll investigate what I can do sending files by hand. However on the USB only machine all the internal sound card hardware is blacklisted so modules aren't loaded. I don't know that I want to upset the environment on that machine very much but a bit more about this at the bottom of this post. A bit of extra info: > First, I have only 1 card, the Focusrite Scarlett. Keep in mind I'm using Kubuntu (KDE) and there is pulseaudio installed. I do not know what role pulseaudio is playing in my sound stack but I assume it's involved. pavucontrol-qt (in KDE) gives me a clear view of what pulseaudio is doing, in case you find out it's installed and running on your system. You probably don't have the qt version on a non-KDE system I suspect. I am tending to trust this link for a description of pulseaudio's purpose. https://superuser.com/questions/144648/how-do-alsa-and-pulseaudio-relate It provides a horizontal VU meter corresponding to what an application is producing. The description seems consistent with Matt's earlier post. Essentially in the old days Alsa itself could only handle one application's audio on each (logical) channel of a given card. This meant you couldn't run two audio apps at the same time unless you mixed the audio in a mixer outside of the machine. The original solution for this problem - say you're playing a CD but want to hear system sounds also - was (I believe) dmix but it was difficult to use for the average desktop user. Anyway, after some time pulseaudio came along as a means of automatically combining lots of software sound sources into a single stream that goes to whatever card you want it to go to. On paper anyway it supports Alsa, Jack and OSS as the underlying audio hardware target and mixes any sound sources that know how to talk to pulseaudio. On my big machine I have a lot more audio hardware enabled: (base) mark@science:~$ cat /proc/asound/cards 0 [DSP]: H-DSP - Hammerfall DSP RME Hammerfall HDSP 9652 at 0xfbef, irq 16 1 [Intel ]: HDA-Intel - HDA Intel HDA Intel at 0xf9ff8000 irq 37 2 [NVidia ]: HDA-Intel - HDA NVidia HDA NVidia at 0xfb9fc000 irq 38 (base) mark@science:~$ On this machine all KDE audio (notifications, youtube, vlc, whatever) goes to card 1, the HDA Intel motherboard device. card 0 is 'disabled' in KDE but has Alsa drivers loaded (obviously - it's in the list above) so I can talk to it directly with Mixbus. Essentially KDE and pulseaudio don't even know it's there. My outboard DAC is attached to the HDSP spdif port. KDE audio goes out the headphone port and back into the machine through an 8 channel outboard ADC and is 'mixed' in the HDSP with audio created in my 'creative' environment. There's a bit of extra latency (50ms) doing it this way but it works great. On this machine I'm pretty much free to play with virtual cards and the like which I might do. Anyway, last thing for now would be that I'm still willing and slightly interested in looking at discord/zoom/whatever for my own needs. If I make some headway, or if you want to collaborate in that area let me know, either through
Re: [gentoo-user] "Amount" of fstrim? (curiosity driven, no paranoia :)
On Sun, Apr 26, 2020 at 12:15 PM wrote: > > On 04/26 11:20, Rich Freeman wrote: > > On Sun, Apr 26, 2020 at 10:52 AM wrote: > > > > > > Fstrim reports about 200 GiB of trimmed data. > > > > > > > My suggestion would be to run fstrim twice in a row and see how fast > > it operates and what the results are. If the second one completes > > very quickly that suggests that the drive is sane. I'd probably just > > run it daily in that case, but weekly is probably fine especially if > > the drive isn't very full. > > > > host:/root>fstrim -v / > /: 3.3 GiB (3578650624 bytes) trimmed > host:/root>fstrim -v / > /: 0 B (0 bytes) trimmed > > This time the first fstrim reports a small mount of trimmed > data and second one no fstrimmed data at all. > Ok, I became a bit less lazy and started looking at the source. All fstrim does is send an FITRIM ioctl to the kernel for the device. This is implemented in a filesystem-dependent manner, and I couldn't actually find any documentation on it (actual documentation on the ioctl - not the fstrim manpage/etc). A quick glimpse at the ext4 source suggests that ext4 has a flag that can track whether a group of blocks has been trimmed yet or not since it was last deallocated. So ext4 will make repeated fstrim runs a no-op and the drive won't see these. At least, that was what I got after about 5-10min of browsing. I didn't take the time to grok how ext4 tracks free space and so on. Incidentally, in the other thread the reason that dry-run didn't report anything to be trimmed is that this is hard-coded: printf(_("%s: 0 B (dry run) trimmed on %s\n"), path, devname); https://github.com/karelzak/util-linux/blob/master/sys-utils/fstrim.c#L109 Otherwise the ioctl returns how much space was trimmed, and fstrim outputs this. -- Rich
problems with slack and zoom: Was: [gentoo-user] ALSA wizard...
On 2020.04.26 15:08, Jorge Almeida wrote: [snip] I'll keep searching for some audio chat package that works. mumble seems promising, but it requires an available server. zoom (which most people @work use) doesn't emerge. slack does emerge and vomits a totally unresponsive window (well, not *totally* unresponsive: Ctrl+Q works :)) I run a mostly stable amd64 system with selected ~amd64 packages. I use both slack and zoom reasonably often, and have not had any install related problems. (I don't necessarily TRUST either of them, but my use of them is for a project with nothing particularly confidential of private.) I'd say if you care enough to bother - start a separate thread about why those two fail emerge for you. I seem to have recurring problems with audio and/or video, but I'm pretty sure that is hardware and/or system related - not due directly to either slack or zoom. Jack
Re: [gentoo-user] ALSA wizard...
On Sun, Apr 26, 2020 at 5:58 PM Mark Knecht wrote: > > > Mark, I recompiled the kernel with more stuff as module, but I just had an idea to make sure the Behringer is the only card in the game: I disabled HD audio in the firmware settings. So: both Opera and Chrome play Youtube. aplay plays music files just fine, as it did before. Audacious also works (it requires modifying the former settings; that's probably what was missing before). So, I would say everything works, except stuff like discord. To my shame, I didn't check the logs with enough attention: it says: [000:000] [5256] (audio_device_pulse_linux.cc:1547): failed to load symbol table [000:000] [5256] (audio_device_pulse_linux.cc:145): failed to initialize PulseAudio [000:000] [5256] (audio_device_impl.cc:377): Audio device initialization failed. (To my defence: the ebuild does't try to pull pulseaudio; one would assume that it would be a dependency) Hence: no mystery at all, just the usual with linux nowadays. I'll keep searching for some audio chat package that works. mumble seems promising, but it requires an available server. zoom (which most people @work use) doesn't emerge. slack does emerge and vomits a totally unresponsive window (well, not *totally* unresponsive: Ctrl+Q works :)) Since you use pulseaudio (per your latest post): can you send the contents of a wav file to an external DAC via toslink, without pulseaudio messing with the file? (Most people don't seem to care whether the signal is first converted to analog, and resampled, and converted to digital, and whatnot, before leaving the computer...) I appreciate the enormous amount of effort you put on this. Thanks Jorge
Re: [gentoo-user] ALSA wizard...
On Sun, Apr 26, 2020 at 5:31 AM Jorge Almeida wrote: > > Well, this is the current state of affairs: > > --recording with "arecord -r 48 -fdat test.wav works > --playback "aplay test.wav" works > --playing a music file foo.wav with aplay works > --playing youtube doesn't work > --playing the same foo.wav file with audacious doesn't work: it > displays the message "ALSA error: snd_pcm_open failed: No such device" > (searching for that string in menuconfig returns nothing) > > Thanks > Jorge > If youtube and audacious don't find the sound card (your ALSA error message) then there's something fundamentally wrong. I installed audacious and it works for me. Let's try and solve a simple playback issue first using youtube: First, I have only 1 card, the Focusrite Scarlett. Keep in mind I'm using Kubuntu (KDE) and there is pulseaudio installed. I do not know what role pulseaudio is playing in my sound stack but I assume it's involved. mark@laptop:~$ pulseaudio E: [pulseaudio] pid.c: Daemon already running. E: [pulseaudio] main.c: pa_pid_file_create() failed. mark@laptop:~$ mark@laptop:~$ cat /proc/asound/cards 1 [USB]: USB-Audio - Scarlett 2i2 USB Focusrite Scarlett 2i2 USB at usb-:00:1d.0-1.3, high speed With nothing using sound I see this: (watch subdevices_avail) mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/info card: 1 device: 0 subdevice: 0 stream: PLAYBACK id: USB Audio name: USB Audio subname: subdevice #0 class: 0 subclass: 0 subdevices_count: 1 subdevices_avail: 1 I start a youtube video and I se this: mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/info card: 1 device: 0 subdevice: 0 stream: PLAYBACK id: USB Audio name: USB Audio subname: subdevice #0 class: 0 subclass: 0 subdevices_count: 1 subdevices_avail: 0 mark@laptop:~$ I stop the video and I see this: mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/info card: 1 device: 0 subdevice: 0 stream: PLAYBACK id: USB Audio name: USB Audio subname: subdevice #0 class: 0 subclass: 0 subdevices_count: 1 subdevices_avail: 1 WHERE IS YOUR PLAYBACK AUDIO GOING? 1) Completely remove (or rename) the .asoundrc file and restart Alsa. There's no need to define an Alsa virtual card when we just want to use a single piece of USB sound hardware. I don't use one on any of my machines. 1a) I do blacklist some sound modules on this machine but that's because Kubuntu wants to load modules I don't want to use. In your Gentoo case you would just not build them, at least when we are testing like this. (ONE STEP AT A TIME!) 2) Do you have any pulseaudio stuff installed and running? It might have been installed by some sound application. It is installed and running on my USB machine which I'm comparing to yours but I'm unsure how it's used in general. However from Matt's earlier post it might be required for discord. > $ lsmod|grep snd > snd_usb_audio 221184 0 > snd_usbmidi_lib28672 1 snd_usb_audio > snd_hwdep 12288 1 snd_usb_audio > snd_pcm98304 1 snd_usb_audio > snd_rawmidi28672 1 snd_usbmidi_lib > snd_timer 28672 1 snd_pcm > snd_seq_device 12288 1 snd_rawmidi 3) The above looks somewhat similar to mine although it appears you still have the top level snd and soundcore stuff built in. Here's what I'm seeing: mark@laptop:~$ lsmod | grep snd snd_usb_audio 241664 2 snd_usbmidi_lib36864 1 snd_usb_audio snd_hwdep 20480 1 snd_usb_audio snd_pcm 102400 1 snd_usb_audio snd_seq_midi 20480 0 snd_seq_midi_event 16384 1 snd_seq_midi snd_rawmidi36864 2 snd_seq_midi,snd_usbmidi_lib snd_seq69632 2 snd_seq_midi,snd_seq_midi_event snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi snd_timer 36864 2 snd_seq,snd_pcm snd86016 12 snd_seq,snd_seq_device,snd_hwdep,snd _usb_audio,snd_usbmidi_lib,snd_timer,snd_pcm,snd_rawmidi mc 53248 5 videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common soundcore 16384 1 snd mark@laptop:~$ cat /proc/asound/cards 1 [USB]: USB-Audio - Scarlett 2i2 USB Focusrite Scarlett 2i2 USB at usb-:00:1d.0-1.3, high speed mark@laptop:~$ cat /proc/asound/modules 1 snd_usb_audio mark@laptop:~$ cat /proc/asound/ card1/ cardsdevices hwdepmodules oss/ pcm seq/ timers USB/ version mark@laptop:~$ cat /proc/asound/pcm 01-00: USB Audio : USB Audio : playback 1 : capture 1 mark@laptop:~$ cat /proc/asound/version Advanced Linux Sound Architecture Driver Version k5.3.0-46-generic. mark@laptop:~$ cat /proc/asound/USB/ idpcm0c/pcm0p/stream0 usbbususbid usbmixer mark@laptop:~$ cat /proc/asound/USB/pcm0p/ info sub0/ mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/ hw_params info status sw_params mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/ hw_params info
Re: [gentoo-user] "Amount" of fstrim? (curiosity driven, no paranoia :)
On 04/26 11:20, Rich Freeman wrote: > On Sun, Apr 26, 2020 at 10:52 AM wrote: > > > > Fstrim reports about 200 GiB of trimmed data. > > > > From the gut this looks quite a lot -- the whole > > partition is 256 GB in size. > > > > Smartclt report for the drive: > > Data Units Written: 700,841 [358 GB] > > > > Each week 200 GiB fstrimmed data for a partition of > > 256 GB in size and since the beginning I have written > > only 358 GB to it. > > > > How does this all fit together? > > It doesn't fit together, because the amount of space trimmed has > nothing to do with the amount of data written. > > How much free space is there? I would think that fstrim would just > trim all unused blocks on the filesystem. Unless it maintained state > it would have no idea what has changed since the last time it was run, > so if you ran it 10 times in a row it would trim 200GiB each time. > > Unless your NVMe is brain-dead the only real downside to running it > more often is the IO. If you trim 200GiB of data 100x in a row the > 99x after the first one should all be no-ops if the drive is > well-designed. An fstrim should just be a metadata operation. > > Now, not all flash storage is equally well-implemented, and I suspect > the guidelines to avoid running it often or using discard settings are > from those who either have really cheap drives, or ones from a long > time ago. A lot of linux advice tends to be based on what people did > 10+years ago, and a lot of linux design decisions get made to > accommodate the guy who wants everything to work fine on his 386+ISA > and SGI Indigo in his basement. > > My suggestion would be to run fstrim twice in a row and see how fast > it operates and what the results are. If the second one completes > very quickly that suggests that the drive is sane. I'd probably just > run it daily in that case, but weekly is probably fine especially if > the drive isn't very full. > > -- > Rich > Hi Rich, thanks for explanation. My observations does not fit with your explanation, though. Early in the morning I did a fstrim, which results in the 200GiB of freed data. Base on you posting I did a fstrim now with no wait in between: host:/root>fstrim -v / /: 3.3 GiB (3578650624 bytes) trimmed host:/root>fstrim -v / /: 0 B (0 bytes) trimmed This time the first fstrim reports a small mount of trimmed data and second one no fstrimmed data at all. The SSD is a ADATA Technology Co., Ltd. XPG SX8200 Pro PCIe Gen3x4 M.2 2280 Solid State Drive (rev 03) (cut'n'paste from `lspci`) host:/root>df -h / Filesystem Size Used Avail Use% Mounted on /dev/root 246G 45G 189G 20% / Cheers! Meino
Re: [gentoo-user] gentoo accessibility re i'm blind,
Hi Majid, On Wed, Apr 22, 2020 at 01:04:48PM +0100, Majid Hussain wrote: > hi there, > i'm blind and wanted to get started with gentoo. > what's accessibility like? > is there speech via orca the screen reader or sound on the minimal iso > via espeakup provided? > I red this document, > https://wiki.gentoo.org/wiki/Project:Accessibility > which seembs to be up-to-date, is there a update on this? > not sure if this was the correct place to post my question? > i'm a complete newb with gentoo I would be greatfull for your assistence, > i'm looking for an adventure. Yes, speakup and espeakup are available on the iso, and orca is available in gnome. I haven't used gnome myself (I mostly use the commandline via ssh) so I can't comment a whole lot about orca. We also have brltty and emacspeak available in the repository. I don't really use them personally so I haven't looked at them in some time. Please feel free to ask any questions and welcome to Gentoo. :-) William signature.asc Description: PGP signature
Re: [gentoo-user] Misunderstanding fstrim...
On 04/26 03:26, Alan Mackenzie wrote: > Hello, Gentoo. > > Seeing that I've had my "new" box for three years, now, I'm thinking > it's about time to run fstrim. But how? > > I've got a pair of NVMe drives in a RAID 1 configuration. On the main > partition, /dev/md126, I've got several LVM2 things. In the volume > group(s?) I've got things like /dev/mapper/vg-home mounted on /home. > Most of my partitions are ext4. > > When I try things like > > # fstrim --dry-run /home > > , I get the response: > > /home: 0 B (dry run) trimmed > > . What does this mean, in particular the "0 B" bit? Does it mean that > if I let it rip, it would trim 0 Bytes? > > Will I do any damage if I let it go ahead (without the --dry-run)? Will > this actually do any good? Will fstrim work together with LVM volumes? > > Thanks for any help! > > -- > Alan Mackenzie (Nuremberg, Germany). > Hi Alan, NOW I am no longer feel alone with all my fstrim/SSD related questions! :) I exactly fall over this before. It looks like fstrim would take its "dry run" really seriously and does NOTHING - it even does not communicate with the SSD. Therefore there is no responds from the SSD how much has been trimmed...or "0 bytes" in other words. If you start it with no "dry run", it will send the the SSD informations, what parts, which still keep data, can be freed, because this data is no longer linked to anything. Fstrimming "does harm" ;) in the first place. It will cause some kind of writing, which is -- in the purest sense of the word -- "bad" to the SSD. But fstrimming is good for the SSD in the more global context, since all freed blocks now are available for wear leveling to the SSD controller again. I cannot say anything in the context of LVM, since I don't use it. But I don't *think* (read: don't know for sure), that it would harm, since you are dealing with data, which already has been flagged for "can be overwritte" by the filesystem. Since the SSD controller handles chunks of data one level lower (the controller does not know anything about filesystems), fstrim tells it, which data can be overwritten from the filesystems point of view. BUT: Any undelete operation is made impossible after a fstrim. Some inside view to the status of the ssd can be taken by this command: sudo smartctl -a This command only reads from the SSD. Cheers! Meino
Re: [gentoo-user] Help working around a bug...
Hi, On 25/04/20 11:27 AM, Michael Orlitzky wrote: On 4/25/20 11:20 AM, "Chris Phillips"@T O wrote: How do I override the ./configure options for emerge [-r] ? If it's a one-time thing, you can set the EXTRA_ECONF environment variable to contain the extra arguments to ./configure. The contents of EXTRA_ECONF are appended to the end of the usual command, so yours should take precedence. Just be sure to set it only while emerging enchant (and not, for example, during emerge @world). Thanks! That did the trick: EXTRA_ECONF="--without-applespell --enable-relocatable" emerge --verbose app-text/enchant Cheers! Chris Re: https://bugs.gentoo.org/show_bug.cgi?id=718634
Re: [gentoo-user] Gentoo Tinderboxes?
Being honest, I also have some rather powerful hardware that is completely free over the night and weekends. I was also thinking if it's possible to build some additional QA using this box and "dev-python/ebuildtester". This is very good initiative and idea. In order to get it implemented it's better to create GLEP and see what could be done. Thanks, Viktar On Sat, Apr 25, 2020 at 12:23 AM jdm wrote: > On Wed, 22 Apr 2020 12:20:38 +0100 > Neil Bothwick wrote: > > > On Wed, 22 Apr 2020 12:17:23 +0200, J. Roeleveld wrote: > > > > > >"BOINC is an open-source software platform for computing using > > > >volunteered > > > >resources." > > > > > > Considering the current situation, I switched my systems to > > > foldingathome. > > > > Aren't BOINC doing COViD-19 work too? > > > > > > Rosetta@Home > > Running night and day. > > John > >
[gentoo-user] Misunderstanding fstrim...
Hello, Gentoo. Seeing that I've had my "new" box for three years, now, I'm thinking it's about time to run fstrim. But how? I've got a pair of NVMe drives in a RAID 1 configuration. On the main partition, /dev/md126, I've got several LVM2 things. In the volume group(s?) I've got things like /dev/mapper/vg-home mounted on /home. Most of my partitions are ext4. When I try things like # fstrim --dry-run /home , I get the response: /home: 0 B (dry run) trimmed . What does this mean, in particular the "0 B" bit? Does it mean that if I let it rip, it would trim 0 Bytes? Will I do any damage if I let it go ahead (without the --dry-run)? Will this actually do any good? Will fstrim work together with LVM volumes? Thanks for any help! -- Alan Mackenzie (Nuremberg, Germany).
Re: [gentoo-user] "Amount" of fstrim? (curiosity driven, no paranoia :)
On Sun, Apr 26, 2020 at 10:52 AM wrote: > > Fstrim reports about 200 GiB of trimmed data. > > From the gut this looks quite a lot -- the whole > partition is 256 GB in size. > > Smartclt report for the drive: > Data Units Written: 700,841 [358 GB] > > Each week 200 GiB fstrimmed data for a partition of > 256 GB in size and since the beginning I have written > only 358 GB to it. > > How does this all fit together? It doesn't fit together, because the amount of space trimmed has nothing to do with the amount of data written. How much free space is there? I would think that fstrim would just trim all unused blocks on the filesystem. Unless it maintained state it would have no idea what has changed since the last time it was run, so if you ran it 10 times in a row it would trim 200GiB each time. Unless your NVMe is brain-dead the only real downside to running it more often is the IO. If you trim 200GiB of data 100x in a row the 99x after the first one should all be no-ops if the drive is well-designed. An fstrim should just be a metadata operation. Now, not all flash storage is equally well-implemented, and I suspect the guidelines to avoid running it often or using discard settings are from those who either have really cheap drives, or ones from a long time ago. A lot of linux advice tends to be based on what people did 10+years ago, and a lot of linux design decisions get made to accommodate the guy who wants everything to work fine on his 386+ISA and SGI Indigo in his basement. My suggestion would be to run fstrim twice in a row and see how fast it operates and what the results are. If the second one completes very quickly that suggests that the drive is sane. I'd probably just run it daily in that case, but weekly is probably fine especially if the drive isn't very full. -- Rich
Re: [gentoo-user] Is Gentoo dead?
On 4/26/20 10:23 AM, Caveman Al Toraboran wrote: >> >> That looks a lot like a linear programming problem, but package versions >> are discrete. So ignoring all of the details, it's believable that we >> have an integer programming problem, which is NP-complete. > > i'm dumb, and don't fully understand this, but i > think i found something interesting: > > [1] http://www.aimsciences.org/article/doi/10.3934/jimo.2014.10.557 > > i wonder, can gradient descent be used to find > optimal portage solution? didn't read beyond the > abstract in [1], but from the abstract it seems > doable (i.e. integer programming solvable by > gradient descent). anyone please correct me if > i'm wrong. > I think something like this is the right approach in the long run. Right now, portage is using a bunch of heuristics in a totally unprincipled way to find a solution that works. If we can turn the dependency resolution problem into some abstract mathematical form, then solving it becomes "not our problem," and we can reap the benefits as new theoretical techniques are incorporated into the existing solvers (you wouldn't want to write your own).
[gentoo-user] "Amount" of fstrim? (curiosity driven, no paranoia :)
Hi, jyst out of curiosity: I have a 512 MB NVMe SDD drive installed, which I had (currently) formatted with one 256 MB root partition. I bound /var and /tmp to hardisk. Currently I am doing one Gentoo update a day and I am running unstable. Just to get a feeling, how often I need to fstrim / I do it currently by hand once in a week. Fstrim reports about 200 GiB of trimmed data. >From the gut this looks quite a lot -- the whole partition is 256 GB in size. Smartclt report for the drive: Data Units Written: 700,841 [358 GB] Each week 200 GiB fstrimmed data for a partition of 256 GB in size and since the beginning I have written only 358 GB to it. How does this all fit together? Cheers! Meino
Re: [gentoo-user] Troubles setting USE flag for inkscape
On 04/25 10:05, Andreas K. Hüttel wrote: > > ## !!! Problem resolving dependencies for media-gfx/inkscape from @selected > > ## > > ## !!! The ebuild selected to satisfy "media-gfx/inkscape" has unmet > > requirements. ## - media-gfx/inkscape-1.0_rc1::gentoo USE="jpeg nls openmp > > -cdr -dbus -dia -exif -graphicsmagick -imagemagick -inkjar -jemalloc -lcms > > -postscript -spell -static-libs -svg2 -visio -wpg" > > PYTHON_SINGLE_TARGET="python3_6 python3_8 -python3_7" ## > > ##The following REQUIRED_USE flag constraints are unsatisfied: > > ## exactly-one-of ( python_single_target_python3_6 > > python_single_target_python3_7 python_single_target_python3_8 ) > > is fixed now and should work out of the box again > > -- > Andreas K. Hüttel > dilfri...@gentoo.org > Gentoo Linux developer > (council, qa, toolchain, base-system, perl, libreoffice) I had similiar problems afterwards with dev-python/pyopengl dev-python/certifi dev-python/setuptools
Re: [gentoo-user] Is Gentoo dead?
On Saturday, April 25, 2020 1:23 AM, Michael Orlitzky wrote: > It's not outwardly a traveling salesman problem, but it's on the same > level of difficulty. If you look at RDEPEND in an ebuild, you'll see a > bunch of entries like > > cat/pkg <= version > > As the package manager recursively processes all of the ebuilds in the > dependency graph, you wind up with a goal like > > maximize the versions of all installed packages > subject to > cat/pkg1 <= version1 > cat/pkg1 > version2 > > cat/pkg2 >= version3 > > ... > > > That looks a lot like a linear programming problem, but package versions > are discrete. So ignoring all of the details, it's believable that we > have an integer programming problem, which is NP-complete. i'm dumb, and don't fully understand this, but i think i found something interesting: [1] http://www.aimsciences.org/article/doi/10.3934/jimo.2014.10.557 i wonder, can gradient descent be used to find optimal portage solution? didn't read beyond the abstract in [1], but from the abstract it seems doable (i.e. integer programming solvable by gradient descent). anyone please correct me if i'm wrong. if doing it with gradient descent is doable, then i wonder, can emerge one day be GPU accelerated? how coold would it be? :D ``world's 1st GPU accelerated package manager''! of course it is not a pressing issue, but i think it is a very fun puzzle to think about in my free time (which is most of my life these days), and i think some here may like contemplating such shameless thoughts. rgrds, cm.
Re: [gentoo-user] ALSA wizard...
On Sun, Apr 26, 2020 at 12:16 AM Mark Knecht wrote: > > > > How do you feel about building Alsa as modules instead of building it into > the kernel? When using modules you can blacklist other sound cards (the MB > audio stuff for instance) and you get a little more visibility into what's is > at least loaded. That way we could, at least as a test, run your setup as a > USB only system. If at that point you can record mix audio in something like > Audacity and play Audacity and Youtube through the Behringer then, I would > think, we would have determined that this is an application issue. > Well, this is the current state of affairs: --recording with "arecord -r 48 -fdat test.wav works --playback "aplay test.wav" works --playing a music file foo.wav with aplay works --playing youtube doesn't work --playing the same foo.wav file with audacious doesn't work: it displays the message "ALSA error: snd_pcm_open failed: No such device" (searching for that string in menuconfig returns nothing) Thanks Jorge The settings: $ cat .asoundrc pcm.!default{ type hw card CODEC } ctl.!default{ type hw card CODEC } $ ls /proc/asound card0 cards CODEC devices hwdep pcm seq timers version $ cat /proc/asound/cards 0 [CODEC ]: USB-Audio - USB Audio CODEC Burr-Brown from TI USB Audio CODEC at usb-:00:14.0-10, full speed $ cat /proc/asound/devices 2: [ 0- 0]: digital audio playback 3: [ 0- 0]: digital audio capture 4: [ 0] : control 33:: timer $ cat /proc/asound/hwdep $ cat /proc/asound/pcm 00-00: USB Audio : USB Audio : playback 1 : capture 1 $ arecord -l List of CAPTURE Hardware Devices card 0: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 $ aplay -l List of PLAYBACK Hardware Devices card 0: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 $ lsmod|grep snd snd_usb_audio 221184 0 snd_usbmidi_lib28672 1 snd_usb_audio snd_hwdep 12288 1 snd_usb_audio snd_pcm98304 1 snd_usb_audio snd_rawmidi28672 1 snd_usbmidi_lib snd_timer 28672 1 snd_pcm snd_seq_device 12288 1 snd_rawmidi