3

A single-board computer (Lubuntu 15.10, kernel version 4.2.0-41-generic) kept freezing when running various applications, most importantly the automated data acquisition application we are developing, but it could also happen when just using Firefox. When the machine just sat idle, it did not freeze. I found a workaround, which is to run in console mode with lightdm service stopped. Hopefully, I'll be able to narrow it down to something specific that happens in GUI mode, but the console mode is actually not a bad solution, if I can get it to work properly. The system actually doesn't require any user interaction.

To start in console mode, I followed advice [1][http://ubuntuhandbook.org/index.php/2014/01/boot-into-text-console-ubuntu-linux-14-04/] and [2][How do I disable X at boot time so that the system boots in text mode?, which was to edit /etc/default/grub and change GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” to GRUB_CMDLINE_LINUX_DEFAULT=”text” and also to uncomment GRUB_TERMINAL=console and to run sudo update-grub.

That alone did not make any difference. I tried following the steps from the second article for systemd (which is used on this machine, as far as I understood):

  1. Run sudo systemctl enable multi-user.target --force. The response was:

    The unit files have no [Install] section. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are:

    1. A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory.
    2. A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it.
    3. A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...).

    I saw in the comments that someone else had this error, but there was no more information about it. Now I don't know if this has caused further problems or it was something else, but I went ahead with the next step:

  2. sudo systemctl set-default multi-user.target. Response:

    Created symlink from /etc/systemd/system/default.target to /lib/systemd/system/multi-user.target.

After this, the system boots up into console mode. However, for some reason the screen goes blank after 10 minutes of keyboard inactivity (I think) and I can't wake it up any more using keyboard or mouse. The system is not frozen: the program continues to run and to save data until I shut down the system (which I can see after rebooting) and the keyboard responds to the Num Lock key. In GUI it would actually hang in a few hours. But this is weird and very inconvenient.

But more importantly, I can't go back to GUI mode. I tried sudo startx, which makes it start painting some windows and hang, and I also tried sudo service lightdm start, which brings up the GUI login prompt, but I can't actually log in, it just keeps popping up again and again. I have seen this behavior before when the system disk ran out of space (it has plenty right now).

I suspect that the GPIO drivers are not being loaded. In any case the system is not fully functional now, so at least for that reason I want to go back to GUI mode and check if it still works as it did before.

How can I undo the systemd changes, or is there a simpler way to switch to GUI and actually have it work? And why does the screen die?

Many thanks in advance!

UPDATE: There is also no network connection (it worked in GUI) and it looks like the startup scripts for runlevels 2 and 5 aren't being executed.

UPDATE2: I forgot to mention that this is also hardware-related. The data-acquisition system uses a single-board computer. There are two variants: the older uses a Pico board, the newer uses an Advantech board, which consumes less power and has built-in GPIO. The freezing problem only happens on the Advantech board.

4
  • 2
    Just a thought, but wouldn't it make more sense to test the "application we are developing" on a stable LTS Ubuntu version rather than on a development version of Ubuntu for which support ended on 7/28? Granted your question was asked and edited during the support window but I don't understand the strategy of developing for a platform that's on it's way out. – Elder Geek Jul 29 '16 at 17:30
  • 1
    TBH with you. If you don't need a GUI, backup your work (better yet use git) and reinstall the machine with Ubuntu Server Edition, less hassle! – s1mmel Jul 30 '16 at 10:16
  • @ElderGeek Thanks for pointing this out. This wasn't my idea, I have joined this project recently and haven't done much on Linux for a while. Will look into this. This problem is also hardware-dependent, I will update the question. – biggvsdiccvs Jul 30 '16 at 22:28
  • @s1mmel Thanks for the Ubuntu Server suggestion. We are using git. – biggvsdiccvs Jul 30 '16 at 22:28
0

I got around the problem for now by switching from lightdm to GDM. Now doing more testing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.