I have been experiencing problems setting up the Ultimate GPS Breakout on a Raspberry Pi, running Raspbian. I followed the tutorial found on the Adafruit web page, found here:
https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi/introduction
For the project I am working on it is required that UART needs to be implemented instead of a USB transmission. Through following the tutorial, I was unable to get the module to work yesterday as it keeps giving me a "NO FIX" status, even after an hour of waiting. It did not matter how many times I typed the following into the terminal, as per the suggestions on other tutorials or forums:
$ sudo killall gpsd
$ sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
$ cgps -s
After two hours, after much frustration, I decided to take a break. After the break, I returned to the Raspberry Pi where I restarted the device and ran the previously mentioned command lines, and miraculously it worked. After another hour of so of playing around with the data via Python 2.7, the GPS dropped connection and has not returned.
Killing the command using Ctrl-C yields the following message:
cgps: caught signal_2
I have no clue what's wrong with it after countless attempts. Any help would be greatly appreciated.
Related
A react native expo app run within WSL, is the cause of a very annoying bug.
A few minutes after starting the Expo project, the internet on the windows laptop stops working.
I found this command fixes it:
Restart-Service LxssManager - when run from Powershell
However, this happens many times a day and means I have to restart the Expo project every time.
Related to: https://askubuntu.com/questions/1203412/wsl-causing-my-internet-to-not-work
Equally crazily, the fingerprint sensor on my laptop stops working and works again after that command is run.
I suspect the issue is somehow related to a very short (2-5 minute) timeout related to the react native app.
If anyone is able to point in any direction, I would love any help.
Maybe it's Expo or maybe I have some kind of local app code error. But I wouldn't know where to even start or test a bug like that.
Here is a basic run-through of what happens.
Start Expo app in WSL
Work, for an indefinite time
If PC activity pauses for longer than 3 min, the error happens. No internet, no fingerprint sensor.
Run the PowerShell command, restart the app. All is good again.
This is a known bug in WSL. Microsoft has solved this bug in build 18890. https://github.com/MicrosoftDocs/WSL/blob/live/WSL/release-notes.md#build-18890
It happens when a process in WSL creates and closes a large number of non-blocking TCP sockets, and after that some ephemeral TCP ports are leaked, eventually exhausting all ephemeral ports in both the host and the WSL.
You can try upgrading your system to version 2004 or 20H2 and see if this problem persists.
I tried to install Stellarium by following http://projectable.me/3d-printed-raspberry-pi-powered-planetarium-projector-nightlight-part-1/ tutorial. When I run the code
bzr co lp:stellarium stellarium
my internet connection was disconnected after few hours and the procedure was failed. It is difficult to run that code again because it takes more than five hours and 4Gb data. How I fix this? Thank you.
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.
I am using OMXPlayer to play some HD videos on my RaspberryPi 3 with latest Raspbian Jessie image. It run perfectly for some time (sometimes 20 minutes, sometimes 3 hours, sometimes 5 hours) but then it freezes. CPU and RAM values are normal. I am running OMXPlayer with this command:
/usr/bin/omxplayer --no-osd --loop myVideo.mp4
and after OMXPlayer freezes I get this message in console:
omxplayer.bin: OMXCore.cpp:785 OMX_ERRORTYPE COMXCoreCOmponent:FreeInputBuffers(): Assertion 'm_omx_input_buffers.size() == m_omx_input_available.size()' failed.
Googled and only advice that I found to solve this problem is to set GPU memory to 128 instead to default 64, I did it, but nothing changed.
Anybody here had similar experience with OMXPlayer ? Is there any way to fix this ?
It was because old raspberry pi firmware and old omxplayer version, so I recommend you to update firmware by:
sudo rpi-update
and to install and download OMXPlayer version 6c90c75 from this link to avoid freezing problems:
http://omxplayer.sconde.net/
Based on this thread, I discovered that installing an old version of Omxplayer (from Mar 9, 2014) solved my freezing issue. You can download old versions of Omxplayer here and install the downloaded .deb file using:
sudo dpkg -i /path/to/your_install_file.deb
I had a similar problem here... in my case, I was pushing a video from a nodeJS server on the local network. If I changed the video at the server, OMXPlayer would just crash.
I removed the OMXPlayer --loop flag. Instead, perform a while loop in a bash script. This solution fixed it for me...
#!/bin/bash
sleep .5
while [1]
do
omxplayer -b -r -live http://192.168.1.16:3000/fileserver/channelA
done
I trying to write a small c program witch reads out an GPIO pin to shutdown the pi externally. The triggering of the signal is working well. The program is started by LXDE as autostart application. If the program detects the shutdown signal it's performing:
sync();
system("halt");
Why does this program damage my ext4 file system after a couple of reboots. There is no fixed number of reboots necessary to damage the system. I don't see any difference by writing halt to command line. I'm using the newest version of the firmware(last update today) and also the kernel is up to date(last update today).
Does anybody have an good idea about it?
This app is a good idea, i wonder nothing like this is already existing...
I think the problem is the "halt" command.
You shuold use the explicit command "shutdown -h now" instead.
For further reading see Anthony Lawrence