Tuesday, 14 August 2018

Computing resources optimisation [1E]

Got to thinking more about how to make the best use of resources with the computers. The biggest issue is ergonomics. You can only really practically use two keyboards at a time. So if using more than two computers you prefer to have more than two keyboards/mice, but it's hard to access them without moving your chair, unless you can use VNC. At the moment I have a love/hate relationship with VNC because I haven't been able to make it run as a service on any of my Linux computers and therefore work out of the box every time. Also X11vnc is less than reliable and crashes quite frequently.

In terms of the two computers that are most frequently used, the serverpc that only has 16 GB of RAM should be boosted to 32 GB at some point, probably with a new mainboard, and its existing mainboard gets moved into mediapc, which in turn its board gets moved into the 4th computer. The main issue with running lots of applications on a 32 GB computer is when one of them causes it to crash. I'm still looking at the optimum way to use the 3rd or 4th computer to run some stuff such as email and spread the load of map resources onto the 2nd computer so it isn't all the 1st computer, but it's a tricky process to try to work out the best way of making that happen. I think it will be necessary to focus mainly on the two computers with the keyboards that are easiest to reach that will run virtually everything, so mediapc will stay media and ministrypc will stay ministry.

Running the day to day stuff in a VM on mainpc is a possibility. We are looking at what is internet based and doesn't have issues with local resource access. It's possible I may put email onto mediapc and possibly some other resources because it isn't used for that much and occasional access via its own keyboard, which can also be switched onto one of the main keyboards, is viable. This is different from using it for image display, which is what I have already experimented with, which often runs into problems getting updates from mainpc over the network. Internet based stuff like email doesn't have that limitation.

So probably the next goal is to get serverpc up to 32 GB, there is quite a bit of cost to this so it would end up happening in stages. Of course, I presently have no budget for this, so really it is a dream for the present. We just keep working with our current resources for now. If I can make VNC work properly on mediapc then it will be easier to do stuff on that which I find hard to use it for at the moment. However doing the new board for serverpc and putting its board into mediapc would also help because mediapc would have enough resources to run more stuff and over VNC it would be very good because I am using VNC to control the screen, which is still being displayed, unlike RDP where the screen turns off. 

I will have another look at VNC support for Debian and do some testing with tightvnc as it seems I should be able to make this work and then mediapc in particular can be used for more things.

HOWTO: Add extra display settings permanently to Linux

I have a Veon TV that I use as a display for the bedroom pc and its major problem is that it is detected as a resolution of 1920x1080 but its native resolution is actually 1360x768.

With other computers the instructions I dug up were to use xrandr commands in some of the lightdm config settings so this command would be run each time the computer started. I actually did try that this time around (scaling down from a virtual screen of 1920x1080 to a physical of 1360x768) but couldn't get it to work reliably.

After some more digging I found out how to permanently add the display settings as a modeline. You can make a modeline using the cvt command and then use xrandr --addmode to add this then you can switch to it for testing. For a permanent change you just need to add something like the below to /etc/X11/xorg.conf file:

Section "Monitor"
    Identifier "DP-1"
    Modeline "1360x768_60.00"   84.75  1360 1432 1568 1776  768 771 781 798 -hsync +vsync  
    Option "PreferredMode" "1360x768_60.00"
EndSection

So there you also have your modeline for the correct display. DP-1 in this case is the display output name, which presumably is derived from DisplayPort, but is actually an HDMI output on this computer.

Once that was all set up I was able to force the screen to 1360x768 its native resolution and it has stayed there ever since. Thus bringing an end to horrible 1920x1080 being scaled which made everything on screen too small.

Saturday, 11 August 2018

HOWTO: Connect a Nexus 5X to a PC

Previously on this blog I have bemoaned the apparent lack of support for the Nexus 5X on PCs. It turns out however that the connectivity is not well documented (not as far as I am aware with Android 8). Earlier efforts failed because I thought a driver was needed, of which no such thing actually exists.

If you are using Debian you generally need to install some extra packages to enable MTP support. However, it appears that MTP is installed by default in Debian 9.5, as my bedroom pc, which has been recently installed with Stretch 9.5, had no difficulty in connecting to the phone without any additional configuration steps needed.

Once the phone is connected to the USB-C cable, "Nexus 5X" will appear in a Thunar window (for Debian with XFCE) but there is still an additional step needed to make the file storage browsable on the phone, and annoyingly this option has to be selected every time you plug the phone in. Simply go to Settings, then open the Connected Devices section, and find the USB section. The options there are "Charge this device", "Supply Power", "Transfer Files", "Transfer Photos" and "Use Device as MIDI". It would be kind of nice if Transfer Files was the default instead of Charge this device, or if charge was able to be simultaneous with a choice of the other actions. On the other hand I find the other options interesting and might look into how they work. But given the limitations of the Nexus's battery capacity I don't expect to supply power to anything else anytime soon.

If you select "Transfer Files" then instantly the phone's file storage becomes browseable and this will be a great benefit, not only in order to extract photos, but also store my music collection which has been virtually impossible to achieve up to now.

I assume the same steps will work on Windows 10 but am not rushing to try it because I don't need the Windows 10 computer for much. I am planning to spend a bit of today finishing the incomplete reinstallation of the Windows 10 computer but I don't need it for many devices and won't bother putting any USB cables onto that computer, whereas I am connecting a full set of three device cables to mainpc because that is the most useful option.