• Debian on the Galaxy Note 10.1 2014 Edition

    Thu, 27 Feb 2014 20:44:34 +0100Posted by André Landwehr

    [Tips & Tricks]

    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

  • Re: Debian on the Galaxy Note 10.1 2014 Edition

    Tue, 08 Sep 2015 20:42:43 +0200Posted by Andre Landwehr

     

    Hi Georg, I don't know for sure, but from my experiences with various Galaxy Note devices (my wife has a Note 1 phone, a colleague has a Note 3) I do not have the impression they share much - if anything at all - with other, non-Note Samsung devices. They may have similar hardware, but the low level firmware, drivers and so on seem to be built from a completely separate tree. Best example is the Bluetooth keyboard driver, which works seamlessly on the S3 and Galaxy Tab 2, but connects, disconnects and reconnects all the time every 2 minutes on the Note devices, completely unusable. Regarding performance of bVNC I must say that I am not at all content with the performance of Linux in general on the 10.1. It is not really slow but it has a terrible lag, even on the console. Sometimes it reacts as fast as expected, at other times the same task takes half a minute to start but then runs quickly and smoothly. Updates take ages as well, like you described. Since I use the stock ROM, it is certainly not a problem of Cyanogen that you experience. Back to bVNC, it is sluggish when I scroll a page in Firefox for example. It looks like there is no hardware acceleration used. On the graphical UI I use mostly inkscape and gimp, so scrolling huge parts of the screen is not that much of a use case for me. The colors in bVNC by the way are ok here, although they are not as clear and crisp as in native Android apps. Maybe the color-depths is limited? I sometimes have the impression that gradients are not as smooth as they should be. I can't say anything about VNC Viewer. The drawbacks you describe were too severe for me, so I kicked it. Finally I have to admit that I do not use Linux on the Note as often as I originally planned to. Connecting a USB keyboard, even with a docking station, is quite a hassle and Bluetooth as I said simply doesn't work. The on screen keyboard works but is not really an option, neither at the command line nor when typing large emails. Since either bVNC or the vncserver tend to crash, especially when bVNC was in the background for too long, using gimp or inkscape is also not really a good idea when you don't want to hit the save button every minute. It does not even look good because of the artificially reduced screen resolution. If I had known all of all these problems before buying the Note, I would have probably given the Asus Transformer Pad a try instead. Meanwhile I use my wife's old Windows 7 Laptop for gimp and inkscape, write most emails in the native K9 mail with the on screen keyboard and if I need to type longer texts, do some system administration or programming I still fetch my good old IBM X41 out of the cupboard. Sad but true. Best regards, Andre

  • Re: Debian on the Galaxy Note 10.1 2014 Edition

    Wed, 09 Sep 2015 18:07:14 +0100Posted by Georg FKPT Hhn

     

    Hi Andre, thanks for your detailed answer! I have actually made a bit of progress since I wrote you and have set up a system that I am still not super happy with, but that works less sluggish than what I had so far and am currently trying out for use when travelling without chugging a laptop along. In case this is of any help for you to give the Note another chance, I'll briefly describe my setup. First, it turns out for me the main performance killer was the SD card I had used for my linux partition. I had thought a SanDisk Ultra should be fast enough, but when I swapped in the Samsung Pro I was using in the Tab S it significantly speeded things up! Moreover, I keep on using the XSDL xserver app and it turns out I was too ambitious with the resolution. On 1280x800 it is actually running rather smoothly, on the slightly higher resolution (1704 x1064 or something like that) it's still ok, but gets a bit laggy. Still worlds ahead of my brief try of a VNC client. Since it's not the screens native resolution it looks a bit washed out, but I can live with it so far (might try and find a way to get the framebuffer method running at some point, which is allegedly much faster and at native resolution). I didn't do proper benchmarks, but for example the time for opening gedit dropped from about 11sec to only 2-3 sec with these two modifications, so it might be worth a try. As for the bluetooth, I have to say (luckily) that I haven't had any problem so far, I'm using one of these foldable ones and it's working just as it should. Maybe an issue with the stock ROM? I'm running the Cyanogen 12.1. Although if anything one would expect problems of that sort to show up in the non-standard ROMs, so I don't know, maybe a hardware issue? Hope this was a bit helpful, all best, Georg ps: Im Rckblick vermute ich, ich htte eigentlich auch auf Deutsch schreiben knnen, was? On 08.09.2015 19:42, Andre Landwehr wrote: > Hi Georg, > > I don't know for sure, but from my experiences with various Galaxy Note > devices (my wife has a Note 1 phone, a colleague has a Note 3) I do not > have the impression they share much - if anything at all - with other, > non-Note Samsung devices. They may have similar hardware, but the low > level firmware, drivers and so on seem to be built from a completely > separate tree. Best example is the Bluetooth keyboard driver, which > works seamlessly on the S3 and Galaxy Tab 2, but connects, disconnects > and reconnects all the time every 2 minutes on the Note devices, > completely unusable. > > Regarding performance of bVNC I must say that I am not at all content > with the performance of Linux in general on the 10.1. It is not really > slow but it has a terrible lag, even on the console. Sometimes it reacts > as fast as expected, at other times the same task takes half a minute to > start but then runs quickly and smoothly. Updates take ages as well, > like you described. Since I use the stock ROM, it is certainly not a > problem of Cyanogen that you experience. Back to bVNC, it is sluggish > when I scroll a page in Firefox for example. It looks like there is no > hardware acceleration used. On the graphical UI I use mostly inkscape > and gimp, so scrolling huge parts of the screen is not that much of a > use case for me. > > The colors in bVNC by the way are ok here, although they are not as > clear and crisp as in native Android apps. Maybe the color-depths is > limited? I sometimes have the impression that gradients are not as > smooth as they should be. I can't say anything about VNC Viewer. The > drawbacks you describe were too severe for me, so I kicked it. > > Finally I have to admit that I do not use Linux on the Note as often as > I originally planned to. Connecting a USB keyboard, even with a docking > station, is quite a hassle and Bluetooth as I said simply doesn't work. > The on screen keyboard works but is not really an option, neither at the > command line nor when typing large emails. Since either bVNC or the > vncserver tend to crash, especially when bVNC was in the background for > too long, using gimp or inkscape is also not really a good idea when you > don't want to hit the save button every minute. It does not even look > good because of the artificially reduced screen resolution. > > If I had known all of all these problems before buying the Note, I would > have probably given the Asus Transformer Pad a try instead. Meanwhile I > use my wife's old Windows 7 Laptop for gimp and inkscape, write most > emails in the native K9 mail with the on screen keyboard and if I need > to type longer texts, do some system administration or programming I > still fetch my good old IBM X41 out of the cupboard. Sad but true. > > Best regards, > Andre >