In the end of November 2022 (1 year ago), I switched from MacOs to Linux (Debian with KDE Plasma) on my MacBook.

No regret! Was a very good decision.

I think, I’ll never go back.

Experience:

  • I did not know about KDE Plasma until 1 year ago. The picture in my head about Linux was pretty much GNOME. I’m a huge fan of KDE Plasma now. KDE Plasma 6 in 2024 will probably be awesome.
  • The GitHub repository “Awesome-Linux-Software” was awesome during the first weeks. It made me realize that most of the stuff I was already using, is also available for Linux. Only software I had to leave behind: Affinity Designer (IMO far more intuitive to use than GIMP, sorry FOSS community) and Visual Studio for Mac (which is dead anyway)
  • The only advanced thing I had to do in the beginning: My WIFI connection is always gone when I close my MacBook, but there is not automatic reconnect when I reopen it. None of the usual stuff recommended when using Debian on a MacBook helped. So, I had to write a service that checks for this (something with rmmod, modprobe, brcmfmac, …). Probably too much for a casual user and hopefully not necessary for them…

TODO in the next year:

  • Trying out gaming on Linux, maybe buying a Steam Deck
  • Migrating to KDE Plasma 6 (and switching to Wayland)
  • Recommending our religion Linux to others
  • ⚡⚡⚡@feddit.deOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I know that it’s a hack. A really bad hack TBH.

    But I wasn’t able to get it working differently.

    This is the service code I’m using (yes, I know… It’s very bad, especially the pinging):

    while :
    do
    	if [[ $(ping 192.168.178.1 -c 3) ]]
    	then
    		echo "pinged"
    	else
    		if [[ $(lsmod | grep brcmfmac) ]]
    		then
    			sudo rmmod brcmfmac
    		fi
    		sudo modprobe brcmfmac
    		sleep 250
    	fi
    	sleep 15
    
    done
    

    When closing and opening my MacBook, it’s necessary to execute sudo rmmod brcmfmac and then sudo modprobe brcmfmac. Only executing the 2nd command is not enough.


    @[email protected]

    Your first 2 paths under /etc have a description like this:

    kernel modules to load at boot time.

    The problem I’m having is that I have to reload the module when the laptop was closed and reopened.

    So, I think, the first 2 paths won’t work, right? It’s not boot time?


    Something like the 2nd path was described in a tutorial about getting started on a MacBook with Linux. I remember it.

    But the path you described does not exist on my system.

    I have a path /usr/lib/systemd/system-sleep/, do you mean that one?

    This contains 1 file (probably created by me in the beginning) called lid_wakeup_disable:

     #!/bin/sh
    
    # /lib/systemd/system-sleep/lid_wakeup_disable
    #
    # Avoids that system wakes up immediately after suspend or hibernate
    # with lid open (e.g. suspend/hibernate through KDE menu entry)
    #
    # Tested on MacBookPro12,1
    
    case $1 in
      pre)
        if cat /proc/acpi/wakeup | grep -qE '^LID0.*enabled'; then
            echo LID0 > /proc/acpi/wakeup
        fi
        ;;
    esac
    
    

    Do I add rmmod brcmfmac; modprobe brcmfmac; (without sudo) at the bottom?

    I’m thankful for any help to get rid of the service.

    • MonkderZweite@feddit.ch
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Guess that was udev and not modprobe, where changes made are picked up immediately? My bad.

      What i do have though, is a bunch of scripts in /etc/modprobe.d, with a comment:

      # 'modinfo -p your-module' to list possible values
      # 'systool -m your-module -av' to list active modules
      # modinfo -p your-module |sort |awk -F':' '{print "\n# "$2"\n#options your-module "$1"="}' for a preset
      

      Maybe there is a module-functionality active that causes trouble? Btw, dmesg -H says nothing? Looks like brcmfmac is troublesome generally (of course broadcum, huh).

      Bttw: if you can’t /etc/modprobe for some reason, you can load module settings as kernel parameters (via Grub or whatever) like module.option=value.

      About the wakeup script, i have this in mine:

      #!/bin/sh
      case $1/$2 in
        pre/*)
          # Put here any commands expected to be run when suspending or hibernating.
      
          # so bluetooth doesn't prevent sleep
          /usr/bin/bluetoothctl power off ;;
        post/*)
          # Put here any commands expected to be run when resuming from suspension or thawing from hibernation.
      
          # bluetooth on after resume
          /usr/bin/bluetoothctl power on ;;
      esac
      

      Sorry, this is about as far as i can help without access to your computer.