Live data from Hacker News

A Linux Evening

fabiensanglard.net

131–140 of 330 posts

Re: A Linux Evening

#131
I started using Linux with Linux Mint. Then moved to Pop OS NVIDIA edition 2/3 years ago.

I _NEVER HAD_ a Linux Evening.

I only faced problems for my noobness in my earlier years, and help was always a reddit visit away.

Re: A Linux Evening

#132

1. If you don't encounter any trouble daily driving GNU/Linux, that is actually a sign of inexperience . That or you're doing nothing interesting. 2. If principles mattered more than convenience, most Linux users would be on FreeBSD or OpenBSD instead of GNU/Linux. Either follow your arguments to their conclusions, or understand that Windows/macOS users are doing the same thing as you—making practical tradeoffs. 3. U…

> 1. If you don't encounter any trouble daily driving GNU/Linux, that is actually a sign of inexperience. That or you're doing nothing interesting.

There are 3 type of person who knows a lot about cars:

1. A Car mechanic 2. People who love cars, and tinker them constantly 3. People who have a shitty car and something always breaks.

Personally I'm not a car guy, I treat them as tools. I can do this because I always had a reliable car. I have a friend who once mocked me for my inexperience. I had to reminding him why he knew so much about cars. He was a Type 3 guy. No a shitty car tho, but something always broke on it anyway.

So getting back to you, can we just have something Works? Is that a high bar?

Re: A Linux Evening

#133

1. If you don't encounter any trouble daily driving GNU/Linux, that is actually a sign of inexperience . That or you're doing nothing interesting. 2. If principles mattered more than convenience, most Linux users would be on FreeBSD or OpenBSD instead of GNU/Linux. Either follow your arguments to their conclusions, or understand that Windows/macOS users are doing the same thing as you—making practical tradeoffs. 3. U…

I don't necessarily agree with your first point.

When I (and many others) first started out using Linux, this was when the most trouble was likely to crop up. Over time, one learns and adapts to certain intricacies, hardware or methodologies used, and hopefully good practises, such as avoiding utterly rubbish or quaint distributions. Of course no scenario is bound to be 100% trouble free, but this is a far cry from an inexperienced user.

Even if I were to accept the premise that the other users are simply "doing nothing interesting", what would your idea of interesting be? Is it heavily exotic in nature (which I do agree in this case), or things that fall outside the purview of web browsing, document editing and leisurely activities? These things can also cause trouble outside the fault of a user for any reason, but this doesn't necessarily mean that they are inexperienced or do nothing interesting.

If you can elaborate more, I'd be interested to gauge if I agree in a new context.

Re: A Linux Evening

#134

If OP used Windows exclusively, he'd have Windows evenings. There's tools that people complain about, and tools that people don't use.

Windows just works without a hassle far more often than any linux distro I've installed.

No post body was provided.

Re: A Linux Evening

#137
post #33

> I spent several hours fixing a problem and I learned next to nothing in the process. This is probably true for this specific case here, but my experience with fixing stuff in Linux is actually the opposite. I learnt a lot doing so, and learnt stuff that turned out to be later useful in very unexpected spots. Back when I was a teen and using Windows, I've spent countless hours fiddling in stuff in regedit and other…

Yes, I remember, even up until very recently, having to google help on Windows. You'd get webpages full of adverts with a heading '12 ways to fix Win10 freezing during upgrade bug!'. And the first two would be something like 'switch it off and on again', 'try again', 'reconnect to your wifi'.

I always felt I could dive deeper with linux problems _if I wanted to_, and that weirdly gives me some confidence that I can fix it.

Re: A Linux Evening

#138
Hi folks. :)

I'm so glad that my hit-and-run post has been so useful. After seeing Fabien's blog post I did a quick search and it turns out that the solution has spread fairly broadly to other forums. My choice of 0x33 was arbitrary so makes a nice canary for seeing it spread out. I'm thrilled. Sharing experiences and solutions is so essential to learning. I've benefited enormously from the generosity of open source developers and communities and from individuals documenting pieces of their projects, glad to have raised the ocean a little in return.

My use case was (and remains) having a Xilinx Artix 7 FPGA in an external Thunderbolt 3 enclosure for testing the development of DSP accelerators using open source tooling. I didn't want to have the FPGA board inside the PC to be able to swap it to my laptop easily, because it produces a lot of heat, and so when I misused the PCIe soft core (litePCIe: https://github.com/enjoy-digital/litepcie/) it doesn't take down the OS. Being able to reload the FPGA and effectively hotplug the device has been very helpful.

Since I knew my issue was around hotplugging I searched for information around PCIe hotplugging and I think (it was two years ago...) that I found the answer from one of these two threads. Both mention the option of reserving PCIe addresses for hotplug busses as a workaround, and a workaround was all I needed.

https://www.spinics.net/lists/linux-pci/msg64841.html

https://review.coreboot.org/c/coreboot/+/35946

dmesg and the various kernel logs are my first stop for any odd behavior on Linux. Especially with any state change to a device (plugging in, turning on, removing, reconfiguring etc) the kernel logs tend to give invaluable info.

I had already been looking at eGPU forums to choose the Thunderbolt 3 enclosure (ended up with the ORI-SCM2T3-G40-GY) and there were various discussions of hotplugging issues there, but I don't think I found the specific kernel options to fix it there.

Check out this docs page for the kernel parameters: https://docs.kernel.org/admin-guide/kernel-parameters.html

For the string "pci=realloc,assign-busses,hpbussize=0x33"

`realloc` Enable/disable reallocating PCI bridge resources if allocations done by BIOS are too small to accommodate resources required by all child devices.

assign-busses [X86] Always assign all PCI bus numbers ourselves, overriding whatever the firmware may have done.

`hpbussize=nn` The minimum amount of additional bus numbers reserved for buses below a hotplug bridge. Default is 1.

0x33 (decimal 51) is arbitrary, but large enough that I was unlikely to ever exhaust that address range even with a large number of devices chained together on the Thunderbolt bus. I think (though would have to check) that the address space does get exhausted with multiple hotplug cycles. I haven't hit that issue since I shutdown the computer close to daily to save power.

Sadly, there's no Segway, those things are expensive and I have a long wish list before reaching that point. Currently I'm saving up to get a microscope, I have a large box of RF integrated circuits that I'd like to do some show and tell with on Twitch. :) Also no unmarked 40% keyboard, RSI means I'm a total fanboy of the Microsoft Ergonomic keyboard and the Anker vertical mouse. Cheap and so comfortable. I have done some kernel compiling, mostly to learn more about kernel modules as I've been trying to make the learning curve and user experience of experimenting with FPGAs over PCIe easier. If anyone has some experience with DKMS and creating Debs I'd welcome a chance to chat. Ditto if there's any Debian maintainer with experience packaging kernel modules, I made some headway a while back to repackage linux-gpib but got stalled out on a few of the details of maintaining patches against the upstream.

Cheers and Happy Holidays!

Re: A Linux Evening

#139
post #114
post #99

Earlier quoted context omitted.

So, how did you find this fix?

cue the segway

No segway, I've posted a bit of a discussion above. Not all that interesting unfortunately. The error message was obscure but the problem space was pretty small so I did mostly the same thing as Fabian and searched online for related terms to PCIe hotplugging and PCIe address allocation.

Re: A Linux Evening

#140
post #72

Earlier quoted context omitted.

Is there one? I know that unplugging a Thunderbolt peer will crash my MacBook Pro (bridgeOS, not macOS, panics). Disappearing buses is an edge case that is little-tested on most operating systems.

Hot-plugging Thunderbolt devices is hardly an edge-case on Macs, it's a heavily advertised feature. I had about weekly kernel panics or machine freezes (would not wake from sleep) while unplugging my Thunderbolt dock (with displays and lots of devices) all throughout the USB-C Intel Mac era, but they all went away when I got an M1 Pro machine, so I wonder how much is down to OS design vs drivers vs hardware (vs how s…

M1 machines don’t have bridgeOS at all, right?
Post reply on HN