FreeBSD Desktop – Part 3 – X11 Window System

(vermaden.wordpress.com)

81 points | by rodrigo975 1247 days ago

8 comments

  • lifeisstillgood 1247 days ago
    From about 2005 to 2012 i ran everything on FreeBSD, laptop, desktop and every server I had at two companies.

    Eventually I moved where I did not have CTO authority (Beggars and choosers) and by 2015 I realised that I was spending more time configuring drivers and trying to get the display manger just right than actually delivering value.

    What I really wanted about 2010 was a company that sold a laptop pre installed with FreeBSD that just worked - kept the drivers and everything else Shipshape and Bristol fashion . I thought then I would happily pay a annual fee for it - I guess Tim Cook has that fee now.

    • dijit 1247 days ago
      If we're sharing anecdotes:

      I was forced into using Windows for 1yr when I started at Ubisoft. (Visual Studio, MS office, Skype!! grumble).

      Eventually I got tired of doing all of my infrastructure development in a VM, so I wiped out my desktop OS and stuck FreeBSD on it (I was also on a tirade against systemd at the time). -- I was given a crappy PC to run windows/skype/office on.

      Overall, aside from how absolutely horrendously slow the browser was (and, it's even slower on OpenBSD which is what I stuck on my laptop)- it was significantly less 'breaky' than my windows machine was.

      Windows had crapped out a whole bunch of times; randomly stopping devices from working and needing a reboot to fix, the VM software(s) had completely wrecked the networking stack in the OS- it was really painful.

      But FreeBSD (once set up) made that desktop the most solid it had ever been.

      • eatonphil 1247 days ago
        I ran FreeBSD on all my personal laptops from 2015-2018 and I didn't notice any difference in speeds on Chromium between personal and work laptops.

        All my personal laptops are Windows now (partially for some low-key gaming and partially ease of use). I thought I'd like using Hyper-V but it's a pain in the ass to configure static ips. So I do all my development in a Fedora VM on Linode...

        In writing this up I realize there's not really great reason to be using Windows after all. More and more important software is available in the browser (i.e. Figma finally made Sketch/macOS less of an issue, Google Docs is Google Docs).

        Maybe I'll switch back to FreeBSD.

        • dijit 1247 days ago
          I was using Firefox at the time, but it was noticeably slower than on linux or windows.

          > In writing this up I realize there's not really great reason to be using Windows after all. More and more important software is available in the browser (i.e. Figma finally made Sketch/macOS less of an issue, Google Docs is Google Docs).

          I'm also surprised by how "agnostic" you can be these days due to the ubiquity of web-apps. A chromebook is a legitimately usable thing for the majority of people it feels like.

      • lifeisstillgood 1246 days ago
        I think my question is - did Apple hoover up all the commercial demand for a managed FreeBSD desktop - or is the structural difference between BSD license and GPL what makes all the difference ?

        Reword it as - is Stallman right?

        Or

        Can I launch a FreeBSD laptop company and expect enough buyers?

      • comex 1246 days ago

           D see t fcrxfx r
    • hobby-coder-guy 1247 days ago
      Bristol?
  • llarsson 1247 days ago
    This feels both useful (should I need to do desktop FreeBSD) and like a walk down memory lane (from when this was how you had to manage Linux, too). Thank you for both.

    And thank you to all the countless developers who have made this level of fiddling mostly a thing of the past. At least this blog did not have to mention modelines.

    • spijdar 1247 days ago
      FreeBSD feels more difficult to use in this sense even compared to Net/OpenBSD. While some of this configuring is strictly unnecessary (changing the keyboard layout in xorg.conf is only relevant if you aren't using a DE with that functionality), FreeBSD seems more ... finicky with GPU drivers and their DRM/KMS compat layer from Linux than Net/Open.

      On NetBSD you can usually just "starts" and get an accelerated X session with no config, from just a "full sets" install. You usually have to install at least some extra kernel modules in FreeBSD.

      • trasz 1247 days ago
        It's an unfortunate consequence of GPL licensing of some of the linuxkpi parts, which graphics drivers use. I believe the amount of problematic code is slowly decreasing, so eventually things will get back to normal.
      • vermaden 1247 days ago
        I just tried to start X11 on FreeBSD 12.2 with all these configs removed and it started with accelerated graphics.

        Only Synaptics touchpad had 'tap to click' disabled.

        I create these configs to be sure that X11 will start the way I want it to start, not that all of it is needed.

      • anthk 1247 days ago
        What's modular xorg for then?
  • kdasme 1247 days ago
    FreeBSD is such a great OS and has a very powerful kernel. So much potential, it is sad to see Linux is the only unix OS that gets traction. They've had Jails in BSD long before Docker was a thing. Debian GNU/kFreeBSD was promising but it probably just doesn't make sense to maintain that project given lack of attention. :(
    • danieldk 1247 days ago
      Linux is the only unix OS that gets traction

      Darwin (macOS, iOS, iPadOS, tvOS, watchOS)?

      And I guess that technically Minix is one of the most successful Unix-like systems. [1]

      [1] https://www.cs.vu.nl/~ast/intel/

      • wayneftw 1247 days ago
        > iOS, iPadOS, tvOS, watchOS

        Those are systems for Apple to control you and their devices that you paid for, not for you to control any device that you own. Therefore, the only traction they've really gotten is with one single user - Apple.

        > macOS

        For now.

        (Relax everybody, I'm at least half kidding.)

        • lrvick 1247 days ago
          I would say that is pretty spot on, and I would include MacOS in that list to a lesser extent too.

          You can't change much about how MacOS works under the hood anymore. If you don't like how it works, tough.

          The device and OS are not yours.

          Also why no one could pay me enough to rely on Apple hardware or software at this point for anything but entertainment.

      • spijdar 1247 days ago
        Probably worth pointing out a significant portion of the BSD "personality" in the XNU kernel is just straight FreeBSD. You could kind of say XNU is a superset of the FreeBSD kernel.

        On top of that, the unix userland resembles FreeBSD, although it's pretty eclectic in choices, e.g. it ships with GNU grep and GNU make by default IIRC while I think FreeBSD uses BSD grep and make by default?

        (Darwin is pretty eclectic overall -- some portions are more NetBSDish. Kernel is mostly Free I think)

        • wahern 1247 days ago
          macOS grep is from FreeBSD, at least as of macOS Mojave (10.14). (Source code for 10.14 might be at https://opensource.apple.com/source/text_cmds/text_cmds-99/g....) Not sure if it was ever GNU grep. Maybe before the big purge in 2011?

          IME, most of the basic shell commands are either directly from FreeBSD or a project in the BSD universe. For example tar is from libarchive, a distinct project (see https://github.com/libarchive/libarchive) that DragonflyBSD, FreeBSD, NetBSD, and macOS import and track. (But oddly not OpenBSD, which has evolved the 4.4BSD-Lite implementation.)

          According to a 2012 accounting at http://meta.ath0.com/2012/02/05/apples-great-gpl-purge/ (via https://news.ycombinator.com/item?id=3559990), macOS was down to 16 GPL packages in macOS 10.12 from 47 in macOS 10.5.

          • danieldk 1246 days ago
            macOS grep is from FreeBSD, at least as of macOS Mojave (10.14).

            Yep, it still is. On Big Sur on M1:

                $ grep --version
                grep (BSD grep) 2.5.1-FreeBSD
            • spijdar 1246 days ago
              Yeah, I'm just an idiot. I guess I was just thinking of GNU make.

              On the other hand, it looks like (at least on Catalina?) it ships with GNU diffutils, so patch, cmp, diff are all GNU utilities. I'm going to sheepishly pretend like this proves my point somehow :-)

        • kevans91 1244 days ago
          A little late to the party, but- MacOS has actually beaten FreeBSD to the punch by shipping with bsdgrep as grep for years at this point.

          FreeBSD should be able to switch before 13.0, but the bsdgrep developer is a slacker. It's only missing a couple of GNU extensions that are somewhat surprisingly (to me) common.

      • hollander 1247 days ago
        How about the biggest: Android?!
        • cferr 1247 days ago
          Android runs on a Linux kernel.
    • musicale 1247 days ago
      > it is sad to see Linux is the only unix OS that gets traction

      I would guess that there are more BSD users than there ever have been in 2020.

      FreeBSD (like *BSD in general) may be a niche OS, but there are probably millions of users and thousands of developers; certainly enough to keep the platform going.

      Not everything has to be mainstream, after all; there is probably a "medium tail" of operating systems which BSD is a solid part of.

    • pjmlp 1247 days ago
      That is the beauty of its license.

      If Linux never happened, we would still all be using HP-UX, Solaris, Aix, Tru64, and all the other clones that integrated some form of BSD code.

      • ibiza 1247 days ago
        Actually, had 386BSD happened just a bit earlier, we would all be using FreeBSD.

        > If 386BSD had been available when I started on Linux, Linux would probably never had happened.

        • pjmlp 1247 days ago
          The difference is that with the BSDs everyone can take and don't bother to contribute upstream, e.g. Apple and Sony.
          • throw0101a 1247 days ago
            > The difference is that with the BSDs everyone can take and don't bother to contribute upstream, e.g. Apple and Sony.

            This depends on the use case of the company.

            A lot of companies learned that simply forking the project and not giving back is a good pathway to pain because now you have to carry your internal patches forward, as well as a larger and larger diff against the base OS itself as it changes.

            If you forked (e.g.) FreeBSD 9 and based your product off of it, and the project is now at version 12.x (with 13.x in 2021Q1), then that's a lot to keep up with internally.

            It's better to use the base OS, and the documented APIs, for one's secret sauce, and give back everything else. This is what vendors like Netflix, Dell-EMC Isilon, NetApp, etc. do. You'll also see quite a few patches from Microsoft and Amazon as they want to sell their cloud services for as many guest OSes as possible. Hardware vendors (Chelsio, Mellanox, Cavium) also throw in support so that hardware companies will use their products with-in appliances.

            Others, like Sony with the PS4 and PS5, mostly seem to operate in user land and so do not do much kernel-level stuff (except perhaps booting code) that would need to be back ported.

            • loeg 1246 days ago
              Sony thoroughly hack up their kernel for the PS4. They just don’t care about the cost of doing it again on a newer FreeBSD base.
              • throw0101a 1246 days ago
                Probably because they don't care with stay current: the PS4 isn't going to change much after initial development, so why should the base OS? Similarly now that the PS5 has shipped, I doubt there will be much OS development there.

                If FreeBSD (or Linux) weren't around, then they'd simply purchase/license an embedded OS (QNX?) and use that.

                • loeg 1246 days ago
                  Yes, exactly.
          • beezle 1246 days ago
            Isn't that argument put to bed by the fact that all of the BSDs still exist, are actively maintained including new features and are used by many individuals/corps in a diverse range of cases?
            • pjmlp 1246 days ago
              Do they? I would say they struggle to exist.

              There is hardly a reason to install them other than wanting free beer OS without GPL-strings attached or being a systemd hater, and then suffer a desktop experiece that feels like stuck in early 2000.

              Conferences related to BSDs usually boil down to running the same code in newer hardware or filesystems.

              • nix23 1245 days ago
                >OS without GPL-strings attached

                You know why you never seen a Google Server OS? Because you just have to give code back to the community if you REDISTRIBUTE your code.

                >Conferences related to BSDs usually boil down to running the same code in newer hardware or filesystems.

                That's complete and utter BS, you really sound like a hater but not a systemd one.

    • erk__ 1247 days ago
      And the traction it gets is mostly in closed source projects where the code may not be contributed back. For example Orbis OS, the OS of the Playstation 4 and quite possible 5 as well.
    • Sigmoid 1246 days ago
      Can you or someone explain to me or link me reasons why BSD is a preferable choice to linux? What kind of advantages and disadvantages are there to the OS?
  • liendolucas 1247 days ago
    What do I love about FreeBSD? You can bring back to life old hardware and put it to do useful things (this is also true with other BSDs and low footprint Linux distros, but so far my experience with FreeBSD has been superb). At the moment the only machine I'm running it is a ThinkPad X230 and everything works perfectly and the documentation is top notch. The FreeBSD Handbook is an excellent place to start for newcomers. vermaden's guide on setting up automount (who also wrote automount) on FreeBSD has been really really useful, thanks a lot for that! One gotcha that I've learnt about FreeBSD is that you have to run RELEASE in order to be able to upgrade the system!
    • freetonik 1247 days ago
      Did you have to install and tweak drivers for the wifi module on the x230?
      • liendolucas 1247 days ago
        Not at all. WiFi worked out of the box. However I had to use the i915kms driver from ports as I could get the video working as it was with the previous version of FreeBSD that I was using (I can't recall the version). These are the steps that I had to do after trying many i915kms drivers (both the basic one included and also the ones available from pkg):

        1. Get the ports.

        2. cd /usr/ports/graphics/drm-kmod; make install

        3. Add: kld_list="${kld_list} /boot/modules/i915kms.ko" in /etc/rc.conf

        4. Optionally install the `mesa-demos` package and run `glx-gears` to test acceleration.

        I think there were some changes to the i915kms driver because the previous version I was using (non-stable) the driver was working absolutely fine. Hope that helps if you're experiencing the same issue!

        Edit: Blank lines between instructions.

        • freetonik 1246 days ago
          Thanks for this valuable info. Just "burned" a USB stick with FreeBSD 12.2, will try to set up my x230.
      • vermaden 1247 days ago
  • annadane 1247 days ago
    Something that strikes me about FreeBSD is you need a certain amount of knowledge going in. On Linux, you can set up a desktop pretty easily. Then you can find out more advanced stuff later on. BSD just dumps you into a shell. You have to know to install this or that metapackage to get a graphical display going and the concepts are different enough from Linux land so that it takes you a while to get going and feel comfortable
    • beezle 1246 days ago
      Ah that is not quite accurate. Sure many linux distros will install a desktop environment for you. FreeBSD will require you to install a package for the one of your choice which should also install all dependencies. As noted elsewhere, X pretty much works now with no additional config update unless you have a very unusual setup. That shouldn't be too high a hurdle as even on linux you will need to know how to install packages at some point too.

      And if you don't want to do that, you can try something like GhostBSD which is based on FreeBSD with the MATE desktop.

    • tetraca 1247 days ago
      I found the FreeBSD handbook to be extremely helpful in both installing the system and trying to navigate my way around it. It's what made me finally comfortable moving around in *nix systems when I was in a "install every weird operating system that exists" phase.

      https://www.freebsd.org/doc/handbook/index.html

    • vermaden 1247 days ago
      There are also 'zero configuration' FreeBSD based systems like GhostBSD or NomadBSD. You should try them instead if you want Ubuntu-like experience.
    • pjmlp 1247 days ago
      That depends on when one started with UNIX, cough xmodconfig.
    • anthk 1247 days ago
      >BSD just dumps you into a shell

      False. OpenBSD assk you at the install process if you want to launch Xenodm from Xenocara at boot.

      You get fvwm, right, but X is totally configured.

    • jjt-yn_t 1247 days ago
      Well, as a FreeBSD user earlier this year I tried about 3 distros to install anew [ previously arch ] from a thumbdrive. None would bring up the install screen properly [ I suppose my monitor has the wrong input or something... ] and IIRC one that would would not let me complete partitioning without errors. [ Not to be overly critical of linux, but I ran out of time... ]
  • jeromenerf 1247 days ago
    Iirc, FreeBSD has some early support for wayland.

    I have found running sway on Debian testing really refreshing. Everything is simpler in configuration and usage.

  • simlevesque 1247 days ago
    Hacker news blocks emojis, it should do the same for "vermaden"
    • chippy 1247 days ago
      Even worse, in Firefox, I see the title of the submission appear to be on a newline underneath the upvote arrow. The special characters are making the height of the div to be 33px

      http://i.imgur.com/nuA4TBe.png

      • arendtio 1247 days ago
        In my Firefox, I see 2 newlines above and 2 newlines beneath...

        Version 83.0 on Arch Linux

        • LukeShu 1247 days ago
          Indeed, this is what I see https://i.imgur.com/jVWhV49.png with Arch's Firefox 83.0 on Parabola (downstream of Arch).

          It seems that the issue is the "LatinModernMathJax_Monospace-Regular" font being broken. This font is part of the "mathjax2" package, which is a dependency of my PDF reader.

          • gravitas 1247 days ago
            For my own learning, the poster "vermanden" is (ab)using the U+1F600 to U+1F6FF table of Mayan/mathematical symbols (except for the first right arrow, it's another set) which you can reference here: https://www.utf8-chartable.de/unicode-utf8-table.pl

            It breaks down like so in hex mode:

                E2 80 93 20 ->
                F0 9D 9A 9F v
                F0 9D 9A 8E e
                F0 9D 9A 9B r
                F0 9D 9A 96 m
                F0 9D 9A 8A a
                F0 9D 9A 8D d
                F0 9D 9A 8E e
                F0 9D 9A 97 n
    • LukeShu 1247 days ago
      Surely the "Mathematical Monospace" set of characters have merit in being allowed on HN, this misuse of them notwithstanding?
      • suprfsat 1247 days ago
        People should simply use characters in correct ways and not in incorrect ways.
        • enriquto 1246 days ago
          what does that even mean?
    • willio58 1247 days ago
      Agreed. Let’s avoid avoid becoming another Twitter please
  • ggm 1247 days ago
    (2018)
    • vermaden 1247 days ago
      2018 is indeed the date of the 'original' post but the later adde UPDATES are from other dates. For example UPDATE 4 is from today. Maybe I should also add the date to that 'UPDATES'? :)
    • andoriyu 1247 days ago
      He constantly updates it. Update 4 for example talks about libinput.