My journey from Mac to PC(Windows’ laptop)

My last Macbook pro is from 2011, still working AFTER changing the motherboard once, years of not being able to use USB ports and so on, but still it works fine. I felt I needed a new laptop before it really dies in the middle of a performance, as it was really getting old. Then.. for more than half a year I couldn’t decided if I should get a new Macbook pro, which is

1. Very expensive,
2. Having stupid issues like the keyboard getting stuck by dust,
3. More and more closed format both in hardware and software,
4. The touch bar, and lack of ESC and Fn key and because of that,
5. Need tons of dongles to connect all my other hardwares, accordingly
6. Buying this laptop wasn’t going to be the end of spending money.

But it wasn’t easy to decide whether or not I should go to another world because I need to admit that the OSX is secure and stable and I already have multiple projects that require Mac apps. Although I didn’t like the interface really much, but it was secure, let’s say, less trouble with malware, not much of driving installation, and I hardly ever had any problem with any of my sound gears. It was quite sturdy.
I knew that Window wouldn’t give me the same story like this.

But then, thinking about my past when I had used Windows until 2006. I had a desktop computer with Windows(XP was the last one I used), and I felt good with it, and had no big trouble that I can recall as serious. Yes there was no trouble back then! So why not trying again?

What I really wanted, however, wasn’t Windows. If I have a Windows’ laptop, then of course I should go for Linux!!!! Yes Linux!!! I already thought of the Windows as an option for installing some software that I was using at OSX, such as Adobes, MaxMSP, and perhaps my audio interface will work better. Wondering if you should you outsource your IT department to improve your business production and service? Visit this site.

So I did some research on the type of laptop I wanted, important issues were:
1. Light weight and very portable (as I really couldn’t carry my 15′ Macbook pro daily. It was just too heavy.)
2. Working well with my old soundcard RME Fireface 800!! (Yes Firewire)
3. Some ports are still available.
3. Having enough operating power that I can realize I have a brand new laptop. 🙂

My choice was: Lenovo Carbon X1 6th Gen. This was super light(1.03kg), and working well with Linux, and not too expensive(and Lenovo offers major discount from time to time), and have 2 USB-3s, Thunderbolt 3 port, HDMI ports available. Oh and micro SD card slot! I chose i7 Quad core, 512GB storage, 16G memory, and the impressive screen HDR WQHD IPS glossy with Dolby Vision, 500 nits. It is almost the same(better) spec as the Macbook Pro 13 inch, and I got around 800 euro cheaper than that.
Buying this from Lenovo website was a pain. I had to wait for a long long time (travelling from China after few days) because of the customized build. But I meditated..!!

So now it’s been almost 3 months, now it’s time to talk about what’s good and bad.

My Linux desktop setup with i3wm/tmux/scvim

What’s satisfying (with Linux, not with Windows)?

1. I can configure almost everything.
This I missed very much to configure everything so that this environment is completely mine. If someone sits with my computer, one can’t even open a web browser. I like more keyboard than mouse clicking. My hands are just sitting on the keyboard and saves lots of energy and keep me focusing on the task.
I can not only configure the environment but also the applications, and how I would like to operate them. Almost everything is configurable, and this is for me the most fun part to have Linux.
Currently I have installed Ubuntu, using i3wm desktop manager.

2. Super fast
I have tested in a very simple way three different operating systems: just boot up, open one chrome web browser, see how much CPU would be used.
First of all, the OSX I could test was of course on my old mac (i7 quad core, 8G ram) but still it was faster and Window (only 10% CPU used)
Windows 10 both had quite a jumpy response, from 13~30%.
Linux: 1.3% stable.
Of course this isn’t a very fair test as there are some background process going on. Still in both systems, I tried to minimize those background process. I see that this is a stunning difference between two operating systems.

3. It actually requires my brain to work
This is up to how you use your system. If you are using Linux, looking more like OSX or Windows, (yes that’s very possible) than probably bit less effects on changing the way your brain works. But if you are using text based desktop manager like i3wm, there are many things you have to remember including keybindings for almost everything even how to turn on and off the laptop. And some bash script knowledge is necessary to do simple tasks. I am not having a single icon in any place, meaning that everything is based on text. This way I am pretty sure my brain works differently. Just to do a task with this environment requires to focus on every step. I love this character.

4. Only few dongles
Quite amount of recent Windows laptops still offer lots of ports like HDMI and USB-type B. This basically makes you to save money. I mean, we all still have usb typeB devices.

What’s disappointing?

1. Soundcard and hassle (Audio driver mess)
Ha… A couple of times I felt like returning this laptop because of the soundcard issue. As mentioned above I have a firewire device, which is super and working very well. And it is expensive that I don’t want to spend even more.
First of all, there is no laptop that comes with a firewire port these days. I only had a dirty way of doing it by converting from Thunderbolt 3->thunderbolt-2->Firewire. This is smoothly recognized. But the problem with the driver.
At the beginning, I used Ffado, but this was not stable: quite often it gives a strong buzz noise that I couldn’t figure out why it is happening.
I did more research but in March there is new firewire driver for Alsa (Yeah!!). There was no specific driver for FF800 I have. But I tried anyway. I had to upgrade my Linux kernel, and manually installed the Alsa driver and it works nicely! Only that I couldn’t figure out how to turn on/off the phantom power.
The system sound is bound to Pulseaudio driver. Then I have the bridge between Pulseaudio to Alsa, so all sounds come from one device. Of course for mac users, this is ridiculous that one has to worry about system sound and other apps’ sound coming in one device. This type of issues are there in Linux. But it’s matter of solving it. I solved it!

2. Occasional trouble with waking up/sleeping/etc
Not always but sometimes when the laptop is in suspend mode and waking up from it, it is frozen. I still don’t know if this is lenovo-linux compatibility issue or simply lenovo issue. There was a BIOS update which made this suspend mode well. But sometimes it creates trouble. But I don’t see it as a major issue to worry too much about.

Conclusion

So those are how I have felt about my new laptop. May I am biased because I bought it. But so far I am very happy with it. The laptop is powerful, the new environment is challenging me much that I am having fun by solving and figuring out every single matter. I replaced not only the hardware but also a number of applications, which feels I am learning a lot. I spent quite some time to study deeper in bash script so that I can use the system more effectively. (Yes this is also something that one can actually go further and further with the system.)

I wouldn’t say the transition is easy after being tamed by one system. But it is not difficult as there are a number of good communities and documents to help you to go step by step in every matter. Worth trying. I am no longer an Apple slave. 🙂



Matrox Thunderbolt Docking station after my USB ports broke down.

I have Macbook pro 8,2 that I got October/2011. I went to Korea for a performance, and my old macbook pro’s top board was completely broken. I needed to perform in few days, and the computer was getting old, so I put it into Apple Service, and I as well got the new one.

My finance was not so well, and I was traveling so that I didn’t get the Apple care. Then as you might guess, after 1 year of its use, something is breaking down : USB.

I had few issues with this computer. The first one was the thunderbolt port. I use an external monitor at home, and the screen was flickering sometimes. Strangely it doesn’t happen even once in Linux. So that I know it is the poor apple software issue, and a number of people were complaining. Then there were few updates, the frequency of the flickering was getting less. But still, it’s sometimes flickering.

Since a month ago, the USB ports were a bit weird. One of two ports was occasionally working: meaning, it doesn’t give power to any equipment, and when I pull and plug again, it sometimes worked.

Few days later, this poor one never worked again, and the other one was doing the same as the other: occasionally working.

I was scared that if I wouldn’t have any USB port, it must cause quite a serious issue. I would need to perform with this machine, and I might not be able to plug in any of controller. Well, forget about the performance. I couldn’t even use mouse/keyboard/harddrive/my phone and so on that are just so common and necessary.

Few days later, even after few reboots, it was working rarely. Yes I checked with the Apple Service, who couldn’t find any issue with the hardware, also did enough research. I was not the only person who had the issue. But any solution that people have given didn’t work for me. I needed to find another solution, rather than replacing my top board just because of USBs.

This was what I found. Matrox Docking Station.

Matrox Dock

Yes. It is quite expensive for me when I think of ‘USB.’ but cheaper than replacing the top board.

This machine has 2 USB 2.0, 1 USB 3.0 (yeah! something new is added to my laptop!), 1 ethernet, 1 DVI out, Audio in/out. It is pity that there is no Firewire.

The official price is 250 $. I got in the Netherlands, and it was around 220 euro. I ordered it and received it. Well, yes I spent some money with tears, but now I don’t need to worry about USB anymore. I was quite excited. Opened the box. then SIGH>>>…..

There was no Thunderbolt cable.. man… It was like, as my friend said, you get your phone without a charger.

This was really really disappointing. Most of you know that this cable is quite expensive. I got it from Apple store, (because I couldn’t find anywhere else around this town) and that was 50 euro.. I would have gotten 5 USB hubs with this money..

So yes. I needed to spend even more money to use USB.

I do not, as much as you, want to become a complainer. But I don’t understand, how.. USB can be broken so quickly after just using 1 year, which never has happened to me my entire computer life. (oh yeah.. that’s quite a bit of years. 🙂 )And I don’t think the port is broken. I just think that the power management sucks with this machine. Do I need to spend almost 300 euro to use USB and having one more of Ethernet/Audio ports..? Wait, I got this laptop with money too! How much was that..?

Oh well, there is going to be even more expensive solution for this. The Belkin docking system, which is going to be released soon.

This machine will be 50 something euro more expensive, and probably no thunderbolt cable will be included. However there are two thunderbolt ports together with Firewire. 2 USB 3.0 ports too. So yes it is a bit different. But I think it’s too expensive.

But you know, I thought this is too much for replacing USB anyway. There should be another solution, or maybe I couldn’t find a nicer solution with this laptop.

Oh well, I don’t know if I’d buy another apple stuff again. Because I don’t think I would have prevented this by using differently. If anyone has a better idea of this, please let me know.. !

Good luck with your computers. Treat well, and even after you do and it betrays you, stay calm and meditate. 🙂

 

How to install Archlinux on MacBook Pro 8,2[Part.2]

In Part 2, we are going to discuss how to install Xorg-server and work nicely with it. (Part 1) The problem is that, currently (if you have followed as Part.1) Xorg-server will run with framebuffer, not from the video card you have inside Mac. In Macbook Pro 8,2 there are two video cards ATI radeon and Intel. We are going to use ATI even though two graphical cards should work nicely with the strategy below.

The issue of not using video card without any tweak is because of KMSmode. On EFI system, it is using EFI system bootloader, which is different from bios one as in any os booting CD or Windows system. This will prevent the KMS mode to be on, otherwise the system won’t boot. Last time, we turn off the KMS setup by doing ‘nomodeset’ on the grub setting and this made the KMS to be turned off. However without KMS, Xorg-server won’t work with the video card, rather it will complain that the modeset is wrong for itself.

So what we need to do is
1. apply patches for Radeon video card on Linux kernel
2. compile the kernel for that
3. Create a vbios emulation which will be copied from any bootable CD
4. Set modeset to the other way around; turn on the KMS mode.

So I will go step by step.

1. Apply patches for radeon video card on Linux kernel.

Thankfully, there is a github of patches+kernel of ‘fooblahblah’ so that you can download.

There is PKGBUILD file included so that you can patch them. However I wanted to add some patches for macbook pro so that I
corrected the PKGBUILD a bit and added some patches. The patches can be found here with explanations.

2. Compile the kernel

Before doing this, make a back of your files /boot/initramfs-linux.img and /boot/vmlinuz-linux (no need if you compile those files with different name, which is recommended)

Now we can compile. If you have made the pkg correctly, then you can use

pacman -U filename.tar.bz

to apply the patch, and it will create a new linux-mainline img file for you.

3. Create a vbios emulation which will be copied from any bootable CD

Now we are going to make video bios from any of bootable bios cd.
I used archlinux liveCD for that.

This is how to;
-boot from the CD
-type 
 dd if=/dev/mem of=vbios.bin bs=65536 skip=12 count=1
 dd if=/dev/mem of=/boot/int10.bin bs=4 skip=16 count=1
-copy the vbios.bin and int10.bin into /lib/firmware/radeon and /boot
That's all.

4. Now we are going to correct the grub.cfg file.

This is a part of my grub.cfg file. Go down through the file and find the right place.

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux GNU/Linux, with Linux mainline kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-mainline kernel-true-a8ca6c35-c261-4b1c-9858-88a12804302d' {
 load_video
 set gfxpayload=keep
 insmod gzio
 insmod part_gpt
 insmod ext2
 set root='hd0,gpt4'
 if [ x$feature_platform_search_hint = xy ]; then
 search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 a8ca6c35-c261-4b1c-9858-88a12804302d
 else
 search --no-floppy --fs-uuid --set=root a8ca6c35-c261-4b1c-9858-88a12804302d
 fi
 loadbios /boot/vbios.bin /boot/int10.bin
 echo 'Loading Linux mainline kernel ...'
 linux /boot/vmlinuz-linux-mainline root=/dev/sda4 ro loglevel=7 radeon.modeset=1 i915_lvds_channels=2 i915.modeset=1 i915.lvds_use_ssc=0 acpi_backlight=vendor vt.handoff=7
 echo 'Loading initial ramdisk ...'
 initrd /boot/initramfs-linux-mainline.img
}

Then you will be able to boot and your video card should work now with KMS mode. If you have an external monitor, your now it will
automatically work as well.

To install Xorg-server and setting up the monitor, there are many documents for instance, here

Some Remarks

– Do not update your linux kernel after you compile it. Freeze pacman into a certain date. I closed up ‘core’ repository on the mirror file for pacman. (/etc/pacman.d/mirrorlist)
– If anyone with another model of macbook pro with nVidia video card there is a patch for that too.
-Do not forget to install the video driver from pacman : xf86-video-ati, xf86-video-intel
-On the video card setup for Xorg-server, two videos are not working together so far. I use radeon.

References:
http://ubuntuforums.org/showthread.php?t=1695746&page=85
https://bugs.freedesktop.org/show_bug.cgi?id=26891
https://help.ubuntu.com/community/UEFIBooting#Apple_Mac_EFI_systems
http://www.b1c1l1.com/blog/
http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?id=c9b07e9e85e5b7fe38c9f009967e8bed51d3760b