Error while trying to enter sleep mode in Beagle Bone Black - beagleboneblack

While trying to enter sleep mode on beaglebone black am getting an error
When i issue the command echo -n "mem" > /sys/power/state am getting
-sh: echo: write error: No such device
The kernel version and os version is as below
root#beaglebone:~# uname -a
Linux beaglebone 3.8.13 #1 SMP Wed Sep 4 09:09:32 CEST 2013 armv7l GNU/Linux
root#beaglebone:~# lsb_release -a
Distributor ID: Angstrom
Description: Angstrom GNU/Linux v2012.12 (Core edition)
Release: v2012.12
Codename: Core edition

I was just trying to do the same thing and got the same error. Looks like the 3.8.13 kernel doesn't support suspend/sleep mode. In the link below they mention only 3.12 or higher supports that feature. (Note if you upgrade beyond 3.8.13 all the capemgr stuff works completely differently than on 3.8.13. I tried 3.18.1 and couldn't get any capes to work.)
Bug report for sleep mode

Related

Nvidia NVML Driver/library version mismatch: dkms, modules, drivers and modinfo versions

I have the Nvidia NVML Driver/library version mismatch error, for which I recommend reading the following answers:
https://stackoverflow.com/a/67105064/1782553
https://stackoverflow.com/a/71672261/1782553
However, after purging and re-installing the nvidia packages (necessary because of the issue described here), I still get the error. A reboot resolved the issue but I'd like to understand why?
Also, I'm not sure I understand the meaning of the 4 following commands and the Nvidia version they display.
Before reboot
$ cat /sys/module/nvidia/version
515.65.01
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 515.65.01 Wed Jul 20 14:00:58 UTC 2022
GCC version: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
$ dkms status
nvidia, 515.65.07, 5.4.0-131-generic, x86_64: installed
$ modinfo nvidia | grep ^version
version: 515.65.07
After reboot
$ cat /sys/module/nvidia/version
515.65.07
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 515.65.07 Thu Sep 22 00:22:12 UTC 2022
GCC version: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
$ dkms status
nvidia, 515.65.07, 5.4.0-131-generic, x86_64: installed
$ modinfo nvidia | grep ^version
version: 515.65.07
I understand there's a difference between the loaded driver version and the driver version that will be loaded after next reboot, but I would have guessed that the modinfo version would match the cat /proc/... version, or that the dkms version would match the cat /sys/... version, but they don't…
Could someone make a brief summary of what each command is reading?

Is that normal that $DISPLAY environment variable value is 1?

Well, I have some sort of problems and that one may be the root of them. I just want to know if that output is normal.
~$ echo $DISPLAY
:1
Is there any problem? According to my research, it should be :0.
Why is $DISPLAY sometimes :0 and sometimes :1
:0 is usually the local display (i.e. the main display of the computer when you sit in front of it).
:1 is often used by services like SSH when you enable display forwarding and log into a remote computer.
Although it is my local display, $DISPLAY is :1. Thus, how can we fix the problem(if it is a problem)?
Additional information: While I log in, the screens is flickering.
System Info:
~$ neofetch
.-/+oossssoo+/-. ********#***************
`:+ssssssssssssssssss+:` -------------------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 20.04.4 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Host: 20URS0BG00 ThinkPad T15g Gen 1
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.13.0-30-generic
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 2 hours, 32 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 3895 (dpkg), 26 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 5.0.17
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1920x1080, 1920x1080, 1920x1080
ossyNMMMNyMMhsssssssssssssshmmmhssssssso DE: GNOME
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Mutter
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ WM Theme: Adwaita
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Theme: Yaru-dark [GTK2/3]
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Icons: Yaru [GTK2/3]
+sssssssssdmydMMMMMMMMddddyssssssss+ Terminal: x-terminal-emul
/ssssssssssshdmNNNNmyNMMMMhssssss/ CPU: Intel i7-10750H (12) # 5.000GHz
.ossssssssssssssssssdMMMNysssso. GPU: NVIDIA 01:00.0 NVIDIA Corporation Device 1e91
-+sssssssssssssssssyyyssss+- GPU: Intel UHD Graphics
`:+ssssssssssssssssss+:` Memory: 6676MiB / 31894MiB
.-/+oossssoo+/-.

unexport doesn't work on BBB GPIOs

When entering the /sys/class/gpio/ directory on a beagle bone running Linux beaglebone 4.9.82-ti-r102 #1 SMP PREEMPT Thu Feb 22 01:16:12 UTC 2018 armv7l, already several GPIOs get displayed, without me exporting them first. Trying to unexport them by using sudo echo gpio30 > unexport results in echo: write error: Invalid argument.
Why are all the GPIOs already exportet on BBB?
Why can't I unexport them?
What would be the best way to control those GPIO from a C++/C program? Should I really use ofstream? Or is there a different interfacing-lib already installed on my BBB?

Buildroot - RPI3 - Find the BCM43438 firmware to enable wireless

i'm a beginner.
i use a RPI3 and a buildroot build system and try to enable wireless.
I followed several links without success.
In particulary, i followed this link : https://delog.wordpress.com/2014/10/10/wireless-on-raspberry-pi-with-buildroot/
and verify my linux kernel wireless options are activated, but no results.
However, the options i used on the buildroot . config file seems to be good :
debian-host:/build/buildroot# egrep -i "wireless|wpa|80211" .config
# BR2_PACKAGE_WIRELESS_REGDB is not set
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_WIRELESS_TOOLS_LIB=y
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
BR2_PACKAGE_WPA_SUPPLICANT_WIFI_DISPLAY=y
# BR2_PACKAGE_WPA_SUPPLICANT_MESH_NETWORKING is not set
BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN=y
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT=y
BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG=y
BR2_PACKAGE_WPA_SUPPLICANT_WPS=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO=y
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
# BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD is not set
# BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW is not set
BR2_PACKAGE_WPAN_TOOLS=y
I installed a minibian an another rpi3, i noticed a firmware was used and i installed it by a :
apt-get install firmware-brcm80211
If the firmware is not installed, I noticed that iwlist wlan0 scan have empty results. On my RPI3-buildroot-system, after booting, lsmod show no modules.
I need to load manually by modprobe or by /etc/modules. So i load the same modules used on minibian, so i did (i loaded bluetooth mods also)
uname -a
Linux pi3 4.9.13-rt12-v7 #1 SMP Mon Mar 20 14:04:21 CET 2017 armv7l GNU/Linux
pwd
/lib/modules/4.9.13-rt12-v7/kernel/drivers
find . -name "*brcm*.ko"
./net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
./net/wireless/broadcom/brcm80211/brcmutil/brcmutil.ko
modprobe 8192cu
modprobe brcmfmac
modprobe brcmutil
modprobe hci_uart
modprobe bnep
and the lsmod show :
lsmod
Module Size Used by Not tainted
8192cu 581125 0
hci_uart 19956 0
btbcm 7992 1 hci_uart
bnep 12051 0
bluetooth 364941 3 hci_uart,btbcm,bnep
brcmfmac 222136 0
brcmutil 9156 1 brcmfmac
cfg80211 543530 1 brcmfmac
rfkill 20944 2 bluetooth,cfg80211
ipv6 405794 18 [permanent]
but
iwlist wlan0 scan
wlan0 Interface doesn't support scanning.
I don't arrive to have the same result as my minibian distro with my apt-get ..
What is the way to retrieve the buildroot process to have the same result that on my minibian ?
I've forget something ?
Thanks for helping me.
When using make menuconfig, enable rpi-wifi-firmware under Target packages > Hardware handling > Firmware to include the firmware files.
For WiFi on the Raspberry Pi, you need to enable the following packages in your defconfig file :
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
If you want to reference any other things, I have an older buildroot external tree here for the Raspberry Pi.

How install ruby with rbenv install 1.9.3-p448 ubuntu 12.04 vagrant box?

can anybody help me how install ruby with rbenv install 1.9.3-p448 ubuntu 12.04 vagrant box
can not install it
error
Using username "vagrant".
Authenticating with public key "imported-openssh-key"
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)
* Documentation: https://help.ubuntu.com/
System information as of Thu Jul 18 03:52:48 MSK 2013
System load: 0.19 Processes: 65
Usage of /: 15.8% of 7.28GB Users logged in: 0
Memory usage: 30% IP address for eth0: 10.0.2.15
Swap usage: 0%
Graph this data and manage this system at https://landscape.canonical.com/
Last login: Thu Jul 18 03:45:19 2013 from 10.0.2.2
__rvm_add_to_path: command not found
vagrant#precise32:~$ rbenv install 1.9.3-p448
Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /home/vagrant/.rbenv/versions/1.9.3-p448
Downloading ruby-1.9.3-p448.tar.gz...
-> http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.gz
BUILD FAILED
Inspect or clean up the working tree at /tmp/ruby-build.20130718035311.2292
Results logged to /tmp/ruby-build.20130718035311.2292.log
Last 10 log lines:
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/tmp/ruby-build.20130718035311.2292/yaml-0.1.4/win32'
make[1]: Leaving directory `/tmp/ruby-build.20130718035311.2292/yaml-0.1.4/win32'
/tmp/ruby-build.20130718035311.2292 ~
~
/tmp/ruby-build.20130718035311.2292 ~
checksum mismatch: ruby-1.9.3-p448.tar.gz (file is corrupt)
expected a893cff26bcf351b8975ebf2a63b1023, got fb82dd8806913041373242de9b2212ee
vagrant#precise32:~$
Download the ruby using your browser from ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.bz2 and place it in ~/.rbenv/caches/ruby-1.9.3-p448.tar.bz2, then run rbenv install 1.9.3-p448
Explanation here

Resources