Debian on the Galaxy Note 10.1 2014 Edition
My trustworthy IBM X41 Laptop served me for 12 years now, and although it never gave me reason to mistrust it, I do know that moving parts like hard-disks have a limited lifetime. So better don't stretch the luck any further I thought and invested into the next generation - the most powerful tablet hardware I could find at the time, a Samsung Galaxy Note 10.1 2014 Edition. So, a quadcore CPU and massive 3 GB of main memory, that should make up a pretty decent Linux desktop, shouldn't it? Well, yes, but beware the pain...
I'm writing this email in Thunderbird (or actually icedove) running locally on the tablet, and should anybody want to do the same, here's how I did it:
First thing to do was - of course - to void my warranty by actually taking possession of the hardware I bought: Rooting the device. There are huge forum discussions on the net how to root it without voiding the warranty, provided the bootloader is old enough, but unfortunately first thing I did when I got the tablet was updating the firmware so no chance for me here. I just followed one of the numerous tutorials on the topic I found on the net, does not matter which one as long as it involves downloading a PC software named Odin and a stock ROM. Now I was root so I could install Linux and care for the real problems like graphics... so I thought. It turned out that becoming root was a necessary first step, but I still was not allowed to do anything more than a normal user with the device thanks to Knox and SE-Linux. Especially installing Linux failed for strange reasons like paths not found and so on.
Googling the problem I finally stumbled over this thread where someone provides a modified kernel for download. I flashed it onto the device with Odin, same configuration that I used for the stock ROM before. Of course I followed the advice of setting ro.securestorage.support=false in /system/build.prop before I did that (note that the file cannot be opened with a text editor, I used "ROM Toolbox" to edit it). While I was at it, I also disabled Knox by deactivating everything that sounded vaguely like Knox using the app "RootAppDelete" (button "System apps"). I could have achieved the same with ROM Toolbox as well I think, but somehow the UI in that part seemed unintuitive.
Everything permissive now? Wait, no, SE-Linux still blocked my path. I used a special app just for that purpose to switch it to "permissive" mode, but unfortunately the name of that app evades me now. Currently, I use "Wanam Xposed" for setting SE to permissive automatically after boot. Wanam requires the Xposed framework to be installed, but it's worth the effort since it sports several other very useful apps as well.
Now finally, I could start installing Linux! First step was to prepare a large micro-SD card with an exFAT filesystem in the first partition. Why exFAT you may think, couldn't you just use ext4? Believe me, I tried! But using the in all other aspects superior app "Linux Deploy" for installing Debian, I was not able to install directly into a partition (although the option was offered). So I finally gave up, made that exFAT filesystem (which has no 4GB limit on file sizes) and let Linux Deploy create a 15GB file on it to take up the Debian installation.
The installation of Debian sid was quite unspectacular. I chose the armhf architecture, file installation, ext4 filesystem, en_US.UTF-8 localization and XTerm as desktop environment. I did allow startup of SSH server, but did not allow startup of graphical UI (of course I experimented a few days with all of that, but this is what I finally settled with). By the way, a trap for the unwary: every time configuration is changed, the user password is set back to "changeme"...
Accessing the new installation via ssh (use the "Juice SSH" app, it's far better than the old ConnectBot) worked out of the box. I use a Logitech K400 wireless USB keyboard for typing and realized soon, that the external keyboard support of SwiftKey is not very good, so I decided to buy "External Keyboard Helper Pro" since the free demo already showed me it's worth every penny. For full qwertz support including umlauts on the ssh console I installed the correct locales ("dpkg-reconfigure locales"), set LANG=de_DE.UTF-8 and - very important - set input-meta on, output-meta on and convert-meta off in /etc/inputrc.
Console worked, the final step was graphical user interface. I have to admit I'm not fully satisfied with the solution I have - but first things first. After googling quite a bit, I read in several forum threads that the Android app "Xserver XSDL" is the way to go since it is a native X server where the Linux programs can render into. Sounds fast, eh? But in contrast to the experience other made, I found it to be laggy and slow and I never made my quertz-keyboard work correctly. Enter bVNC! The configuration interface of this app takes a bit of getting used to, since some things can be configured before connecting while others have to be configured during establishing the connection, but fortunately this is a one-time task and it works quite well from there on. One feature really driving me nuts though is that the cursor keys move the mouse cursor instead of doing what they are supposed to.
On the VNC server side, I start the server manually (not via Linux Deploy) with the command line "vncserver -geometry 1280x800 :0". Of course using the native display resolution of 2560x1600 is possible as well, but I do not usually have a magnifying glass at hand when I open an xterm and it's honestly impossible to read anything without either that or holding the tablet at nose's length from the eyes. Due to the artifically reduced resolution the image seems to be a little unsharp, it's using 4 pixels to display one pixel after all, but for the moment it's the best compromise I could find. Playing with the dpi value of the xserver only changes font sizes, which makes parts of the fonts (not xterms though) a little more readable, but then again not because the texts do not fit into the dialog windows anymore when the fonts are two or three times as big. Googling the problem further it seems that KDE has a sensible solution for it, but that would require, well, KDE, which is
basically not what I want. I also doubt it would help with two of the main reasons for the xserver, namely inkscape and The Gimp, both of which are no native KDE applications.
So, this is the status quo. Have fun reproducing it if you need to, and you're welcome to post useful tips especially for making graphics work better!
Re: Debian on the Galaxy Note 10.1 2014 Edition
Tue, 01 Sep 2015 14:57:00 +0100Posted by Georg FKPT Höhn
Hi there, I just came across your blog entry about Debian on the Note 10.1 - I have been using XSDL xserver so far, but also haven't been impressed with speed on the Note. Interestingly, it seems to work much more smoothly on a Galaxy Tab S 8.4, even though that should have roughly the same hardware?? I have been wondering how content you were with the performance of bVNC. I have just tried this on above mentioned Tab S and for me the performance was terrible. Also, the colours seem pretty ugly, maybe the 24bit thing, but I also tried VNC Viewer, where performance seems to be much better, potentially better than with XSDL xserver, and the colours are just fine. However, I cannot find a way of having the screen filled as bVNC can and there is no native touchscreen support, which makes it a bit pointless for the Note. I haven't been able to try VNC on my Note yet, but the experience with the Tab S suggests that xserver might still be the better option for me. If you have any hints about how to set up bVNC so it is less sluggish (also for the colour issue), I'd be eager to give it a try though, as the slow speed on the Note is somewhat annoying. Admittedly, it might be a general issue with the Note, as it's also wayyyy slower than the Tab S when I do apt-get upgrade, when the Tab S takes about half an hour for a long update, the Note literally took a whole night! It's really not clear to me why it's so slow - I've been wondering if it's better on an original Touchwiz ROM, but then both the Note and the Tab S run Cyanogenmod 12.1, so there shouldn't be a huge difference either? To finish with, if you ever want to use the xserver and hit the QWERTZ keyboard issue, what I did was install Debian wheezy and add testing repositories for LaTeX and other stuff where I needed newer packages. It's probably not the most elegant way, but I am able to properly change between three keyboard layouts - note that on the android side of things I need to use the English layout and only switch them within linux in order for this to work. Sorry for the long unsolicited email, but any hints would be very welcome, as I'd be really eager to use my Note properly! Best regards, Georg
Reply to this