Enable huge pages on Debian 10 - ARMv7 CortexA8 on BeagleBoneBlack - 32-bit

I am currently working on building eviction sets on different ARM platforms, so for simplicity I want to use huge pages. Unfortunately, I don't seem to be able to do so on the Cortex A8 on the BeagleBone Black running Debian 10 (32 bit), which is the recommended Debian image from the BeagleBoard website. The kernel version displayed by uname -r is 4.19.94-ti-r73.
The first thing I find weird that cat /proc/meminfo does not display anything about huge pages. Furthermore, I followed the instructions on the official Debian wiki site for enabling huge pages, but after running sysctl -p at the end it just says that vm/nr_hugepages does not exist.
The Cortex A8 user guide clearly says that different page sizes are supported by the TLB, up to a size of 16MB. So what am I missing here? Is there even a possibility to allocate huge pages or is it just not possible for my setup?
I am not the most experienced in this topic, so I can't rule out that I missed something, but as far as I know I've looked all over the internet and can't find anything helpful. So any suggestion will do!

Related

Ubuntu 16.04 screen completely freezes only mouse moves

Ever since I have upgraded my laptop (Click here for hardware specs.) my screen usually freezes. Mostly in chrome or Firefox browser. I am pretty sure this is a Nvidia driver problem but I can't seem to find the solution. I am running a Nvidia Quadro K2100M.
I am currently running Nvidia 361.42. I have tried using open source Xorg server without any luck.
The only solution I have found so far is forcefully turning off the computer by holding down the power button.
Things that I have tried:
I got keyboard input
I cannot switch to another terminal to restart lightdm
This problem came to me occasionally, making me really annoyed.
As illustrated in many blogs, this may be caused by graphic driver problem. For me, my desktop has a NVIDIA video card, you can run lspci | grep VGA to see what type of your video type, in my case, it returned:
02:00.0 VGA compatible controller: NVIDIA Corporation G98 [GeForce 8400 GS Rev. 2] (rev a1)
I followed the instruction on jiakai zhang's blog to reinstall proper drivers for the desktop, hope this will help you.
The key steps in [1] are to reinstall the ubuntu desktop and nvidia drivier by:
$ sudo su
$ apt-get update
$ apt-get install --reinstall ubuntu-desktop
$ apt-get install unity
$ apt-get remove --purge nvidia*
$ reboot
$ sudo apt-get install nvidia-current
$ sudo reboot
Updating the grub settings worked for me! Do the following:
1. Open the GRUB configuration
sudo vi /etc/default/grub
2. Change the value of GRUB_CMDLINE_LINUX_DEFAULT from "quiet splash" to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"
and save the file.
3. Update & Reboot
sudo update-grub
sudo reboot
More info:
This is a bug in the processor, known as the c-state bug. It causes total freezes when the CPU tries to enter an unsupported sleep state. It's a problem for many Bay Trail devices especially with newer (4.*) kernels. There is a simple workaround until it gets properly fixed upstream. You just need to pass a kernel boot parameter and the random freezing stops completely. The parameter may increase battery consumption slightly, but it will give you a usable system. You do this by editing the configuration file for GRUB as described above.
GRUB - boot loader package from the GNU Project, which provides a user the choice to boot one of multiple operating systems
installed on a computer or select a specific kernel configuration available on a particular operating system's partitions;
Intel Bay Trail - new Atom Processors from Intel. Atom is Intel's family of x86 and x86-64 processors that are optimized
for small computing devices, such as smartphones and mobile Internet devices;
C-States - used to optimize optimize or reduce power consumption in idle mode (i. e. when no code is executed) - (C0 to C8)
Reference: here.
I have since fixed this problem by re-installing Ubuntu 16.04 and not switching from the nouveau video driver. I also disable updates and everything been working good for about 2 months now.
Gaming is pretty good but I usually play steam games so doesn't push any kinda hard core graphics
Well, I had the same problem: My PC was freezing randomly. I tried Ubuntu 16, 17 and 18.04 and everything was the same. I tried several drivers and didn't get a solution. I tried several solutions that I found in the forums (including this) and got bad and harmful results.
My solution was: I stopped using the graphical nvidia card, removed it and now I'm using the integrated Intel HD graphics card (IntelĀ® HD Graphics 530 card (Skylake GT2)) and all the problems were solved!
I fixed mine using a few commands from #Qoros solution above. i just ran apt-get update, apt-get install nvidia-current, and sudo reboot. cheers to #Qoros btw!
For me, none of the approaches described in rest of the answers worked.
I was opening multiple terminal tabs running some heavy processes and ubuntu used to freeze when I had 6-7 tabs. I tried monitoring the resources used while I was starting my processes in terminal tabs. You can do it by opening System Monitor app and going to Resources tab.
What I noticed is that when my RAM(8GB) and my swap space(1GB) were completely used up, ubuntu would freeze.
As a solution, I increased my swap space and made it 16GB. After this memory never gets used completely and ubuntu doesn't freeze.
https://askubuntu.com/questions/178712/how-to-increase-swap-space decsibes how to increase swap space.

What are the absolute minimum packages needed for Debian Wheezy

I want to install the bare minimum of Debian Wheezy on an embedded controller with 128Mb flash.
So far I found the nice debootstrap method for installing, like described here. This end up with 157Mb disk usage after adding ssh.
Someone created a nice image for RasPi with have 118Mb, see here.
Additionally I tried shrinking by this guideline here, but it also dont succeed much.
Currently the controller is running with EmDebian Grip occupies 79Mb with 182 packages installed. But under Wheezy it needs much more.
So what packages are the absolute minimum needed?
Thanks
Achim

Ubuntu Freeze if kept untouched for a few minutes

So I have Ubuntu 14.04 Installed on my system with a few "tweaks", mainly ccsm. I also have google chromium browser installed as well. I do a lot of work in the browser and usually have 10+ tabs open in my system.
I also like to use the multi-window (Workspace) and have 8 Workspaces (thus one of the reasons for ccsm).
Once I leave the computer and try to come back (before the screen locks), the computer is COMPLETELY frozen with my HDD running at very high speeds. I have a system monitor that monitors the CPU activity and HD activity and right before those things freezes, my RAM is at 100% and so is my HDD.
I'm wondering if anyone can help me FIGURE OUT what the problem is? I've been using ubuntu since '08 so I'm familiar with it. I just don't know where to start!
HELP!
I can not deal with the problem until I install the following packages as follows
sudo apt-get install linux-generic-lts-quantal xserver-xorg-lts-quantal
You could get the detailed reason from http://www.howtoeverything.net/linux/hardware/random-freezes-integrated-hd-4000-graphics
Maybe you have to consider the Google Chrome or Chromium, whose two or more different Flash plugins conflict with each other, and the freeze problem disappear after you Disable the Flash plugins in the webpage opened by inputting
chrome://plugins
in the URL address of Chrome
Or another useful method of changing the chrome plugins is to uninstall the google-chrome completely,and then install the current chrome with newest flash plugin.
After all the above are done, the system need restart.
Hope it can help. Good luck!

OpenCl: Minimal configuration to work with AMD GPU

Suppose we have AMD GPU (for example Radeon HD 7970) and minimal linux system without X and etc.
What should be installed and what should be launched and how it should be launched to have proper OpenCL environment? In best case it should be headless environment.
Requirements to environment:
GPU visible by OpenCL programs (clinfo for example)
It is possible to monitor temperature and set fan speed (for example using aticonfig).
P.S. Simple install Xserver, catalyst and run X :0 won't work properly. See X server with fglrx driver won't responce after exactly 49 accesses to X server
UPD When you use AMD GPU on linux, OpenCL applications don't see AMD GPU if Xserver isn't launched.
I had similar problem, asked a question and had succeed solving it by myself.
For R9 290 cards and newer i assume you have:
Built kernel 4.14 or later, with amdgpu driver support. There is option in linux kernel config under Graphics Support.
All nesesary firmware .bin blobs are incorporated. To do so easily you may edit buildroot/package/linux-firmware/* contents for buildroot, and manually add BR2_PACKAGE_LINUX_FIRMWARE_AMDGPU option by yourself, along with BR2_PACKAGE_LINUX_FIRMWARE_RADEON (use it as a template). Actually we should post that update to their git.
When booting you should see appropriate dmesg messages about amdgpu initializing, per each adapter. And screen mode should be switched. If you still see large console text and no videomode switch occured during init then you have problem in kernel/firmware, you should fix that out first.
To answer second question, controlling fan speeds/temperatures is achieved via powerplay filesystem, eg /sys/class/drm/.. like this:
cd sys/class/drm/card0/device/hwmon/hwmon0
echo 1 > pwm1_enable
cat pwm1_max > pwm1
You may dig a bit deeper and find powertune parameters nearby, in device folder.
But instead of using /sys/class/drm/card0/device/pp_dpm_sclk i highly recommend flashing that values directly in cards' bios. Set with required frequencies/voltages, as it is more reliable, stable and api independent - you either init it, or not :)
PS. Also put away 7970, buy something a bit newer. I dont know if it is still supported in the latest drivers, we havent such an old card by hands right now. I tested 290, 390, 480, 580 cards series. (for R9 270, miner fails to build cl code). For older cards better to use some older software <=16.40 and maybe a bit older kernel <=4.13

How can I run VisualWorks under OpenBSD?

Has anyone gotten VisualWorks running under OpenBSD? It's not an officially supported platform, but one of the Cincom guys was telling me that it should be able to run under a linux compatibility mode. How did you set it up?
I already have Squeak running without a problem, so I'm not looking for an alternative. I specifically need to run VisualWorks's Web Velocity for a project.
Thanks,
if you're wondering about setting up linux compatibility mode and you're running the GENERIC kernel:
# sysctl kern.emul.linux=1
to enable at boot uncomment the kern.emul.linux=1 line in /etc/sysctl.conf
See the OpenBSD FAQ, specifically section 9.4 - Running Linux Binaries on OpenBSD.
Typically there are more steps needed then just kern.emul.linux=1 unless you have statically linked (i.e. completely stand-alone) binaries. The good news is that packages exist that contain Linux libs, and they are easy to install. This is all detailed in the above link.