Brico Repare

Some while I go, I wrote up my experience https://blog.iaddg.net/brico-repare/restoring-my-2007-mac-mini-2-1 with restoring my 2007 Mac Mini 2,1.

The performance of video was a bit sluggish, though, and this write up serves to document the fixes I found in order to accelerate video playback and window manager responsiveness.

My graphics card is a Gen-3.5 Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics and my OS is Debian testing/forky/14, but the fixes will probably work for other cards and systems as well.

Different performance under X.org and Wayland

I first noticed that Wayland and X.org have different behavior. Video in Wayland was faster, because programs under Wayland (mpv, vlc, firefox) could use the Direct Rendering Infrastructure (DRI) interface, while the same programs under X.org could not.

Where is the output of the inxi -GSaz --za --hostname command for my X.org setup:

System:
  Host: macmini Kernel: 7.0.4+deb14-amd64 arch: x86_64 bits: 64 compiler: gcc
    v: 15.2.0 clocksource: hpet avail: acpi_pm
    parameters: BOOT_IMAGE=/vmlinuz-7.0.4+deb14-amd64 root=UUID=<filter> ro
    quiet
  Desktop: Xfce v: 4.20.2 tk: Gtk v: 3.24.52 wm: xfwm4 v: 4.20.0
    with: xfce4-panel tools: xfce4-screensaver avail: light-locker,swayidle
    vt: 7 dm: LightDM v: 1.32.0 Distro: Debian GNU/Linux forky/sid
Graphics:
  Device-1: Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics
    driver: i915 v: kernel arch: Gen-3.5 process: Intel 90nm built: 2005-06
    ports: active: VGA-1 empty: DVI-D-1,SVIDEO-1 bus-ID: 00:02.0
    chip-ID: 8086:27a2 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.22 with: Xwayland v: 24.1.11
    compositor: xfwm4 v: 4.20.0 driver: X: loaded: intel
    unloaded: fbdev,modesetting,vesa dri: swrast gpu: i915 display-ID: :0.0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26")
    s-diag: 584mm (22.99")
  Monitor-1: VGA-1 mapped: VGA1 model: Dell E2218HN serial: <filter>
    built: 2018 res: mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 102 gamma: 1.2
    size: 480x270mm (18.9x10.63") diag: 546mm (21.5") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: EGL v: 1.5 platforms: device: 1 drv: swrast gbm: drv: kms_swrast
    surfaceless: drv: swrast x11: drv: swrast inactive: wayland,device-0
  API: OpenGL v: 4.5 vendor: mesa v: 26.0.6-1 glx-v: 1.4 direct-render: yes
    renderer: llvmpipe (LLVM 21.1.8 128 bits) device-ID: ffffffff:ffffffff
    memory: 2.81 GiB unified: yes
  Info: Tools: api: eglinfo,glxinfo de: xfce4-display-settings gpu: gputop,
    intel_gpu_top, lsgpu wl: swaymsg x11: xdriinfo, xdpyinfo, xprop, xrandr

And here is the output of the command for Wayland:

System:
  Host: macmini Kernel: 7.0.4+deb14-amd64 arch: x86_64 bits: 64 compiler: gcc
    v: 15.2.0 clocksource: hpet avail: acpi_pm
    parameters: BOOT_IMAGE=/vmlinuz-7.0.4+deb14-amd64 root=UUID=<filter> ro
    quiet
  Desktop: Sway v: 1.11 with: swaybar tools: avail: light-locker, swayidle,
    xfce4-screensaver vt: 8 dm: LightDM v: 1.32.0 Distro: Debian GNU/Linux
    forky/sid
Graphics:
  Device-1: Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics
    driver: i915 v: kernel arch: Gen-3.5 process: Intel 90nm built: 2005-06
    ports: active: VGA-1 empty: DVI-D-1,SVIDEO-1 bus-ID: 00:02.0
    chip-ID: 8086:27a2 class-ID: 0300
  Display: wayland server: X.org v: 1.21.1.22 with: Xwayland v: 24.1.11
    compositor: Sway v: 1.11 driver: X: loaded: intel
    unloaded: fbdev,modesetting,vesa dri: i915 gpu: i915 display-ID: 1
  Monitor-1: VGA-1 model: Dell E2218HN serial: <filter> built: 2018 res:
    mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 102 gamma: 1.2
    size: 476x268mm (18.74x10.55") diag: 546mm (21.5") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: EGL v: 1.5 hw: drv: intel i915 platforms: device: 0 egl: 1.4
    drv: i915 device: 1 drv: swrast gbm: egl: 1.4 drv: i915 surfaceless:
    egl: 1.4 drv: i915 wayland: egl: 1.4 drv: i915 x11: egl: 1.4 drv: i915
  API: OpenGL v: 4.5 compat-v: 2.1 vendor: mesa v: 26.0.6-1 glx-v: 1.4
    direct-render: yes renderer: i915 (: 945GM) device-ID: 8086:27a2
    memory: 187.5 MiB unified: yes
  Info: Tools: api: eglinfo,glxinfo de: xfce4-display-settings gpu: gputop,
    intel_gpu_top, lsgpu wl: swaymsg x11: xdriinfo, xdpyinfo, xprop, xrandr

Notice that X.org uses fallback software drivers for rendering while Wayland allows to used the hardware ones.

Solution (almost): force the modesetting driver for X.org instead of the intel one

After a lot of searching, a simple solution for the problem seemed to be to use the modesetting X.org driver instead of the intel one. It suffices to create a /etc/X11/xorg.conf.d/20-intel.conf configuration file with the following content:

Section "Device"
  Identifier "Intel Graphics"
  Driver "modesetting"
EndSection

One should also edit /etc/environment and add a line saying DRM3 is disabled for these old graphics cards:

LIBGL_DRI3_DISABLE=1

After these modifications and re-logging-in, inxi reports, for the X.org session:

System:
  Host: macmini Kernel: 7.0.4+deb14-amd64 arch: x86_64 bits: 64 compiler: gcc
    v: 15.2.0 clocksource: hpet avail: acpi_pm
    parameters: BOOT_IMAGE=/vmlinuz-7.0.4+deb14-amd64 root=UUID=<filter> ro
    quiet
  Desktop: Xfce v: 4.20.2 tk: Gtk v: 3.24.52 wm: xfwm4 v: 4.20.0
    with: xfce4-panel tools: xfce4-screensaver avail: light-locker,swayidle
    vt: 7 dm: LightDM v: 1.32.0 Distro: Debian GNU/Linux forky/sid
Graphics:
  Device-1: Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics
    driver: i915 v: kernel arch: Gen-3.5 process: Intel 90nm built: 2005-06
    ports: active: VGA-1 empty: DVI-D-1,SVIDEO-1 bus-ID: 00:02.0
    chip-ID: 8086:27a2 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.22 with: Xwayland v: 24.1.11
    compositor: xfwm4 v: 4.20.0 driver: X: loaded: modesetting dri: i915
    gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26")
    s-diag: 584mm (22.99")
  Monitor-1: VGA-1 model: Dell E2218HN serial: <filter> built: 2018 res:
    mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 102 gamma: 1.2
    size: 476x268mm (18.74x10.55") diag: 546mm (21.5") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: EGL v: 1.5 hw: drv: intel i915 platforms: device: 0 egl: 1.4
    drv: i915 device: 1 drv: swrast gbm: egl: 1.4 drv: i915 surfaceless:
    egl: 1.4 drv: i915 x11: egl: 1.4 drv: i915 inactive: wayland
  API: OpenGL v: 4.5 compat-v: 2.1 vendor: mesa v: 26.0.6-1 glx-v: 1.4
    direct-render: yes renderer: i915 (: 945GM) device-ID: 8086:27a2
    memory: 187.5 MiB unified: yes
  Info: Tools: api: eglinfo,glxinfo de: xfce4-display-settings gpu: gputop,
    intel_gpu_top, lsgpu wl: swaymsg x11: xdriinfo, xdpyinfo, xprop, xrandr

Fix for mpv

The video player mpv started strangely reporting a floating point exception at startup (under X.org and under Wayland) after the above fix was applied. VLC on the other hand worked without a problem.

That can be fixed by explaining to mpv that it needs to use the gpu-context x11egl or wayland. One can simply add the following line in the global /etc/mpv/mpv.conf configuration file:

gpu-context = x11egl

Now DRI works inside X.org, it seemed. However, the next day, the system became unstable while running X, experiencing various crashes (firefox browsing, compiling the linux kernel, ...). No problems at all when running Wayland.

Fixing X.org

The solution I found — but Wayland sessions do not start anymore — way to go back to the intel driver in /etc/X11/xorg.conf.d/20-intel.conf,

Section "Device"
  Identifier "Intel Graphics"
  Driver "intel"
EndSection

and install the amber branch of mesa (see here: https://docs.mesa3d.org/amber.html ).

To do that, you need to retrieve the branch

git clone --depth 1 --branch amber https://gitlab.freedesktop.org/mesa/mesa.git mesa-amber-vanilla

then choose the right options in the meson_options.txt file:

cd mesa-amber-vanilla/
nano meson_options.txt

You need to switch on the dri-drivers

option(
  'dri-drivers',
  type : 'array',
  value : ['i915','i965']

and switch off the new gallium-drivers

option(
  'gallium-drivers',
  type : 'array',
  value : [],

Then do

meson setup builddir/
meson compile -C builddir/
sudo meson install -C builddir/

This will install the library files to /usr/local/lib/x86_64-linux-gnu (in Debian). Now you need to add this as the first line of a ld configuration file, for instance /etc/ld.so.conf.d/x86_64-linux-gnu.conf:

/usr/local/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

Then run

sudo ldconfig

At next graphical login, you should be using the intel driver with native DRI. inxi now shows:

System:
  Host: macmini Kernel: 6.18.31 arch: x86_64 bits: 64 compiler: gcc v: 15.2.0
    clocksource: hpet avail: acpi_pm parameters: BOOT_IMAGE=/vmlinuz-6.18.31
    root=UUID=<filter> ro quiet
  Desktop: Xfce v: 4.20.2 tk: Gtk v: 3.24.52 wm: xfwm4 v: 4.20.0
    with: xfce4-panel tools: xfce4-screensaver avail: light-locker,swayidle
    vt: 7 dm: LightDM v: 1.32.0 Distro: Debian GNU/Linux forky/sid
Graphics:
  Device-1: Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics
    driver: i915 v: kernel arch: Gen-3.5 process: Intel 90nm built: 2005-06
    ports: active: VGA-1 empty: DVI-D-1,SVIDEO-1 bus-ID: 00:02.0
    chip-ID: 8086:27a2 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.22 with: Xwayland v: 24.1.11
    compositor: xfwm4 v: 4.20.0 driver: X: loaded: intel dri: i915 gpu: i915
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26")
    s-diag: 584mm (22.99")
  Monitor-1: VGA-1 mapped: VGA1 model: Dell E2218HN serial: <filter>
    built: 2018 res: mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 102 gamma: 1.2
    size: 480x270mm (18.9x10.63") diag: 546mm (21.5") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: EGL v: 1.4 hw: drv: intel i915 platforms: device: 0 drv: i915 gbm:
    drv: i915 surfaceless: drv: i915 x11: drv: i915 inactive: wayland
  API: OpenGL v: 1.4 vendor: intel mesa v: 21.3.9 glx-v: 1.4
    direct-render: yes renderer: Mesa DRI Intel 945GM device-ID: 8086:27a2
    memory: 187.5 MiB unified: yes
  Info: Tools: api: eglinfo,glxinfo de: xfce4-display-settings gpu: gputop,
    intel_gpu_top, lsgpu wl: swaymsg x11: xdriinfo, xdpyinfo, xprop, xrandr

Either X.org or Wayland

You might think that a simpler solution was to go with Wayland in the first place and not bother with fixing X.org. However, for old hardware, there are not many Wayland-native window managers that a casual user can use. I do use Sway myself, however the family prefers to stay with XFCE, so finding a solution was necessary.

References

I found the following resources most helpful: – https://wiki.archlinux.org/title/Intel_graphicshttps://lists.debian.org/debian-user/2025/10/msg00310.html

My family has been using this computer under Linux for more than 10 years. I wanted to speed up this perfectly working computer, since browsing web pages has become much slower over the years. That is why I decided to replace the hard disc by a SSD drive.

I succeeded and finally the restored computer is orders of magnitude faster and usable for tasks beyond browsing. In this post, I will very briefly describe what I did, since these machines are a bit tricky to reinstall. They have a 64-bit CPU, but other components are meant for 32-bit architectures (ex. one can only address 3Gb of RAM). They have early EFI support and legacy BIOS mode, but none of these works as expected.

Replacing the hard disc

This was the most delicate part of the upgrade process. I followed the video tutorial https://www.youtube.com/watch?v=r0y7GkCTxV0

I used a Samsung Evo SSD drive, it worked perfectly.

Take care not to tear off some of the thin wires or break the plastic horns that hold the WiFi card.

Installing Debian Linux

Not every Linux live CD boots with the machine. For Debian, there are specially crafted images that do here: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/ They have “-mac-” in the file name.

Once you burn this to a CD/DVD, if your embedded DVD reader works, you can boot from that. You need to hold C on the keyboard after turning on the machine with the CD inside. This will allow you to proceed with the installation as a regular Debian one. Choose to install the grub boot loader on the disc (/dev/sda) at the end of the installation procedure.

Make sure that you have a big swap partition (> 16Gb), this is the whole point of having a SSD, you will use it as a complement to your very limited RAM.

If your embedded DVD reader does not work or is too slow, you can connect an external one on a USB port, this will work the same way.

You cannot however boot from a USB memory stick. Even using a CD with the https://www.rodsbooks.com/refind/ rEFInd boot manage does not help.

Removing the 30 second delay and the chime at startup

You will notice that you computer takes a long time before the OS starts to boot. This is due to the legacy BIOS support trying to figure out where to boot the machine from.

Removing the delay

To get rid of the delay, you need a Mac OS X recovery or installation disk, for a OS X version sufficiently old to support your hardware. If you are lucky, you are still keeping the DVD that arrived with your computer.

If not, you can download the OS X 10.7 Lion disk here: https://support.apple.com/kb/DL2077?locale=en_US

You will not be able to write this on a blank single-layer DVD, since the space required will be more than 4.6 Gb. People on the internet recommend that you write the image to a USB stick, however your Mac Mini 2,1 will not be able to boot from that.

The only way I found was to get down to the file BaseSystem.dmg, which can be found inside multiple wrappings withing the InstallMacOSX.dmg. For this, you will need to: 1. install the dmg2img program to your host Linux computer (this can be found on any Linux distribution), so that you can transform dmg-files to img-files 2. download and compile from sources the xar archiver, so that you can unpack Mac .pkg files, here: https://github.com/mackyle/xar 3. learn how to loopback mount img-files on linux, you will need to do this a couple of times in order to peel the onion and get to the BaseSystem.dmg file

Once you get you BaseSystem.dmg, convert it to BaseSystem.img. Now, this is a file that you can write to a DVD and boot up from. This worked for me, but only once, all other attempts to boot from this rescue DVD failed. So, finally, I grabbed the old hard disc and write the image directly to it (dd if=BaseSystem.img of=/dev/sdb bs=10M). I could than boot from this disk attached by USB. Booting from a USB stick did not work however.

Once you manage to boot from the Lion rescue disc, you will need to determine which partition you need to bless (this is a OS X command line tool). It is the small 1Mb partition that Debian created for you and which is of type BIOS Boot (if you look at it using Gnome Disk Tool). For me, it was partition /dev/sda3, which corresponds to the Mac partiion /dev/disk0s3.

Now, you need to find, using the Lion rescue disc, somewhere in the menu on top, the Terminal tool. You launch that, and than you need to use the following command (adapt it to your use):

bless --device /dev/disk0s3 --setBoot --legacy

This should get you rid of the annoying wait before Linux boot starts.

Removing the chime

If you also want to get rid of the annoying Apple chime, while you are in the Terminal, the command is:

nvram SystemAudioVolume=%80

Surprised today that the lid of my toilet's flush tank can't be lifted, I spent considerable time to read internet forums in order to find a solution. So here it is, if it can help anyone. This concerns Jacob Delafon's / Kohler's two-piece watercloset Odeon Up (cuvette au sol Odéon Up).

This is the top of the lid before the intervention: Step 1

You need to press and hold down the large button, put a small flat screwdriver in between the large and small moon-shaped button and lift gently to small button with the help of the screwdriver. The large button remains in place: Step 2

You now put your fingers on the area surrounding the big button and turn it counter clock wise, you will feel that the button cylinder starts to unscrew and you continue until the cylinder can be taken off: Step 3

You can now lift the lid in order to do you intervention: Step 4

In my case, it was only some limestone deposits that were blocking the mechanism – simple to solve with a bit of alcoholic vinegar spilled over it.