[{"content":"I couldn\u0026rsquo;t screen share. In Zen (a Firefox-family browser), picking Entire Screen in a Google Meet / browser meeting gave a perfectly black rectangle. The kicker: it failed the exact same way on two completely different machines — a desktop with an NVIDIA card and a laptop with a Radeon 680M. Same black screen.\nThat detail is the whole story, so I\u0026rsquo;ll spoil it up front: it was never the GPU. It turned out to be three separate bugs stacked on top of each other, each one independently capable of producing a black frame. Fixing any one of them still left it black, which is exactly why it was so maddening. Here\u0026rsquo;s the hunt.\nSetup: NixOS, Hyprland (Wayland), SDDM as the display manager, PipeWire + xdg-desktop-portal-hyprland for screencast, Zen from the zen-browser flake.\nThe mindset that mattered The single most useful move was refusing to trust the obvious suspect. \u0026ldquo;Screen sharing is black\u0026rdquo; sounds like a GPU/driver problem. But the same failure on an NVIDIA box and an AMD box is a near-impossible coincidence for a driver bug — driver bugs are specific. Two different GPUs failing identically points at something they share: the compositor, the portal stack, or the app. So I started there and worked the pipeline end to end.\nBug #1 — a Hyprland screencopy regression The portal/PipeWire stack itself checked out healthy: the ScreenCast D-Bus interface was exported, PipeWire was running, grim (which uses the CPU/shm capture path) produced a real screenshot. So the compositor could see the screen. But the dmabuf screencast stream that browsers use was freezing on the first frame.\nThis matched a known upstream Hyprland regression (the explicit-sync screencopy change) present in versions above 0.47.2 through 0.49.0 — the dmabuf screencast stream blacks out on the first frame. I was on 0.49.0 from nixpkgs.\nFix: move the compositor and its portal off nixpkgs and onto the Hyprland flake (0.52+), keeping them a matched pair:\nprograms.hyprland = { enable = true; package = inputs.hyprland.packages.${pkgs.system}.hyprland; portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland; }; (package and portalPackage must come from the same source so their protocol versions match.) Rebuilt, re-logged in… still black. On to bug two.\nBug #2 — the browser couldn\u0026rsquo;t load libpipewire Time to stop guessing and watch the actual handshake. I tailed the portal while triggering a share:\njournalctl --user -u xdg-desktop-portal-hyprland -u xdg-desktop-portal -f Clicked Share → Entire Screen → Share and watched the log. It logged… nothing. Zero ScreenCast traffic. The browser wasn\u0026rsquo;t even asking the portal for frames — it was falling back to a legacy capture path that renders black under Wayland.\nWhy? Firefox-family browsers dlopen(\u0026quot;libpipewire-0.3.so.0\u0026quot;) at runtime to use the portal screencast path. On NixOS there\u0026rsquo;s no global /usr/lib, so the library has to be on the process\u0026rsquo;s library path. It wasn\u0026rsquo;t:\n# Is libpipewire actually loaded in the running browser? grep -i pipewire /proc/$(pgrep -f \u0026#39;zen\u0026#39; | head -1)/maps # → nothing The root cause was upstream in the browser\u0026rsquo;s Nix wrapper. nixpkgs wrapFirefox only adds PipeWire to the wrapped browser\u0026rsquo;s LD_LIBRARY_PATH when the unwrapped package advertises it:\n# nixpkgs firefox wrapper.nix pipewireSupport = browser.pipewireSupport or false; # ... libs = [ /* ... */ ] ++ lib.optional pipewireSupport pipewire; The zen-browser flake\u0026rsquo;s unwrapped package sets ffmpegSupport and gssSupport in its passthru but forgets pipewireSupport — so it defaulted to false and libpipewire was silently dropped.\nFix: re-wrap the browser with the flag flipped on, mirroring the flake\u0026rsquo;s own wrap so policies/overrides still compose:\npkgs.wrapFirefox (inputs.zen-browser.packages.${pkgs.system}.beta-unwrapped.overrideAttrs (old: { passthru = (old.passthru or { }) // { pipewireSupport = true; }; })) { icon = \u0026#34;zen-browser\u0026#34;; } Now libpipewire was on the path. Rebuilt, re-logged in… still black. One to go.\nBug #3 — XDG_SESSION_TYPE was unset libpipewire was available, the compositor was fixed, the browser window was genuinely native Wayland — and a share still produced no portal traffic and a black frame. So the browser was still choosing the wrong capture backend.\nThe capture engine inside Firefox/Zen is libwebrtc, and it decides between the PipeWire backend and the old X11 backend with this check:\n// libwebrtc, DesktopCapturer::IsRunningUnderWayland() const char* xdg_session_type = getenv(\u0026#34;XDG_SESSION_TYPE\u0026#34;); // must equal \u0026#34;wayland\u0026#34;, plus WAYLAND_DISPLAY must be set And on my session:\nloginctl show-session $XDG_SESSION_ID -p Type # → Type=wayland (correct!) echo \u0026#34;${XDG_SESSION_TYPE:-UNSET}\u0026#34; # → UNSET (the problem) logind knew the session was Wayland, but the XDG_SESSION_TYPE environment variable was never exported into the session — SDDM launches Hyprland without setting it. So libwebrtc fell back to the X11 root-window capturer, which under Wayland grabs an empty (black) buffer.\nThe trap that cost me a login The obvious fix — set it globally in NixOS — breaks your login, and it\u0026rsquo;s worth dwelling on because it\u0026rsquo;s a great example of \u0026ldquo;correct value, wrong scope\u0026rdquo;:\n# DON\u0026#39;T DO THIS environment.sessionVariables.XDG_SESSION_TYPE = \u0026#34;wayland\u0026#34;; A global value also lands in the SDDM greeter\u0026rsquo;s environment. The greeter runs on X11, but seeing XDG_SESSION_TYPE=wayland it tries to start a Wayland greeter, which immediately segfaults:\nsddm-helper-start-wayland: segfault ... in SDDM::WaylandHelper::startProcess Greeter stopped. HelperExitStatus(11) Black screen, no login, revert-to-previous-generation. (Thank you, NixOS boot generations.)\nThe right fix sets the variable only inside the session, never near the greeter. The wrinkle: the browser is launched by the systemd --user manager, not directly by Hyprland — so Hyprland\u0026rsquo;s own env directive doesn\u0026rsquo;t reach it. The thing that does reach it is environment.d:\n# home-manager xdg.configFile.\u0026#34;environment.d/10-xdg-session-type.conf\u0026#34;.text = \u0026#39;\u0026#39; XDG_SESSION_TYPE=wayland \u0026#39;\u0026#39;; systemd --user reads environment.d at login and applies it to every user-scope app it spawns — including the browser. And because it\u0026rsquo;s a per-user file, the system-level SDDM greeter never sees it. Login stays safe; the browser finally gets XDG_SESSION_TYPE=wayland.\nThe payoff Rebuild, log out, log in, open a meeting, Share → Entire Screen — the portal source picker popped up, I selected the screen, and there it was: a live preview. Confirmed on Google Meet. After all that, the verification was anticlimactic:\ngrep -i pipewire /proc/$(pgrep -f \u0026#39;zen\u0026#39; | head -1)/maps # → libpipewire LOADED Takeaways Identical failure on different hardware exonerates the hardware. Two GPUs, same black screen — the cause was something they shared. Watch the handshake, don\u0026rsquo;t guess. journalctl --user -u xdg-desktop-portal-* -f during a share instantly told me the browser wasn\u0026rsquo;t even calling the portal — which redirected the whole investigation. \u0026ldquo;No portal traffic\u0026rdquo; means the app picked the wrong backend — look at what gates that choice (here: a missing library and a missing env var). Right value, wrong scope still breaks things. XDG_SESSION_TYPE=wayland is correct — set globally it crashes the X11 greeter; set per-session it just works. Reversible systems make aggressive debugging safe. Being able to roll back to the previous NixOS generation from the boot menu is what let me try the bad global fix without fear. ","permalink":"https://shadowrabbit.dev/logs/zen-screenshare-black-on-hyprland/","summary":"\u003cp\u003eI couldn\u0026rsquo;t screen share. In Zen (a Firefox-family browser), picking \u003cstrong\u003eEntire\nScreen\u003c/strong\u003e in a Google Meet / browser meeting gave a perfectly black rectangle.\nThe kicker: it failed the exact same way on two completely different machines —\na desktop with an NVIDIA card and a laptop with a Radeon 680M. Same black screen.\u003c/p\u003e\n\u003cp\u003eThat detail is the whole story, so I\u0026rsquo;ll spoil it up front: \u003cstrong\u003eit was never the\nGPU.\u003c/strong\u003e It turned out to be \u003cem\u003ethree\u003c/em\u003e separate bugs stacked on top of each other,\neach one independently capable of producing a black frame. Fixing any one of\nthem still left it black, which is exactly why it was so maddening. Here\u0026rsquo;s the\nhunt.\u003c/p\u003e","title":"Black Screen When Screen Sharing on Hyprland: A Three-Bug Hunt"},{"content":" A Mechanic’s Guide to Understanding Computers If you’ve ever worked on a car or built something with your hands, you already have the skills to understand computers—you just don’t know it yet. Think of a computer as another workspace in your shop, no different from your garage, workbench, or tool chest. This series will help you learn how to use a computer by relating it to something you’re already familiar with: construction and automotive mechanics.\nWhy Compare Computers to Construction and Auto Repair? Most computer guides assume you already know the basics, but if computers have always seemed confusing or frustrating, it’s probably because no one has explained them in a way that makes sense to you. Mechanics and builders don’t just memorize how to fix things—they understand the principles behind their tools. That’s exactly how we’ll approach computers.\nA computer is just another machine with parts that work together to get a job done. Instead of spark plugs, pistons, and timing belts, we’ll talk about CPUs, RAM, and operating systems. But the logic is the same: know the parts, know how they work together, and you’ll know how to use (and fix) a computer.\nA Computer is Like Your Workshop To make sense of a computer, think of it as your workshop or garage, where every part has a role:\nThe CPU (Central Processing Unit) is your power drill or impact wrench. It does the main work, driving screws or bolts with force—just like a CPU runs calculations to keep everything moving. RAM (Random Access Memory) is your workbench. A bigger bench lets you spread out more tools and work on multiple projects at once. More RAM allows your computer to handle multiple tasks smoothly. Storage (Hard Drive/SSD) is your tool chest. It holds all your tools and materials. A cluttered or full chest makes it harder to find what you need, just like a hard drive that’s running out of space. The Operating System (OS) is the workflow manager or dispatcher. It assigns tasks to the right tools (hardware components), ensures jobs don’t overlap inefficiently, and keeps everything running smoothly. Hands-On Lesson: Identifying Your Computer’s Tools To start, let’s figure out what kind of “workshop” you have.\n1. Check your system specs On Windows: Press Ctrl + Shift + Esc to open Task Manager, then click on the Performance tab. On Mac: Click the Apple menu, then About This Mac. Look for CPU, RAM, and storage details. 2. Compare it to a workshop Do you have a “compact garage” (older, slower PC) or a “fully stocked professional shop” (high-performance PC)? 3. Organize your files Just like organizing tools in a shop, create folders to store your files neatly. Try creating a Projects folder for important work. What’s Next? In the next post, we’ll break down the major components of a computer and compare them to machines and tools you use every day. You’ll see that if you can repair a car or build a house, you can absolutely learn to use and troubleshoot a computer.\n","permalink":"https://shadowrabbit.dev/tnt/part-1---computers-are-just-another-tool/","summary":"\u003chr\u003e\n\u003ch1 id=\"a-mechanics-guide-to-understanding-computers\"\u003eA Mechanic’s Guide to Understanding Computers\u003c/h1\u003e\n\u003cp\u003eIf you’ve ever worked on a car or built something with your hands, you already have the skills to understand computers—you just don’t know it yet. Think of a computer as another workspace in your shop, no different from your garage, workbench, or tool chest. This series will help you learn how to use a computer by relating it to something you’re already familiar with: construction and automotive mechanics.\u003c/p\u003e","title":"Part 1 - Computers Are Just Another Tool"},{"content":"Welcome to my little corner of the web. I go by ShadowRabbit, and this site is where I document the quirks, challenges, and discoveries I encounter in the world of technology.\nWhat You\u0026rsquo;ll Find Here Problem-Solving Logs – When I run into issues with tools, software, or processes, I document my findings so others (and future me) can benefit. Interesting Tools \u0026amp; Services – If I come across something useful, I’ll share my experience with it. General Documentation – Notes, how-tos, and reference materials for things I use regularly. Tech for Non-Techies – Guides to help those who aren’t computer-savvy navigate the digital world with confidence. This site is as much for me as it is for anyone else. If you find something useful, great! If you have insights to share, even better.\nStay curious. Keep tinkering.\n— ShadowRabbit\n","permalink":"https://shadowrabbit.dev/about/","summary":"\u003cp\u003eWelcome to my little corner of the web. I go by \u003cstrong\u003eShadowRabbit\u003c/strong\u003e, and this site is where I document the quirks, challenges, and discoveries I encounter in the world of technology.\u003c/p\u003e\n\u003ch2 id=\"what-youll-find-here\"\u003eWhat You\u0026rsquo;ll Find Here\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eProblem-Solving Logs\u003c/strong\u003e – When I run into issues with tools, software, or processes, I document my findings so others (and future me) can benefit.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eInteresting Tools \u0026amp; Services\u003c/strong\u003e – If I come across something useful, I’ll share my experience with it.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eGeneral Documentation\u003c/strong\u003e – Notes, how-tos, and reference materials for things I use regularly.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eTech for Non-Techies\u003c/strong\u003e – Guides to help those who aren’t computer-savvy navigate the digital world with confidence.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThis site is as much for me as it is for anyone else. If you find something useful, great! If you have insights to share, even better.\u003c/p\u003e","title":"About"}]