From aa847ba8d74eceeb816c3c8827a1c6822b75f44d Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 17 Sep 2018 21:36:48 +0200 Subject: [PATCH] [DEV] add documentation --- .config/awesome/rc.lua | 6 ++--- 4_graphic_interface.md | 9 +++++++- 7_controlCPU.md | 28 +++++++++++++++++++++++ 8_disable_nvidia_card.md | 34 ++++++++++++++++++++++++++++ mosquitto.md | 48 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 121 insertions(+), 4 deletions(-) create mode 100644 7_controlCPU.md create mode 100644 8_disable_nvidia_card.md create mode 100644 mosquitto.md diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index a1b2047..59f6e51 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -241,7 +241,7 @@ root.buttons(awful.util.table.join( -- {{{ Key bindings globalkeys = awful.util.table.join( - awful.key({ modkey, }, "Pause", + awful.key({ modkey, }, "F12", function () awful.util.spawn("xlock") end, @@ -259,7 +259,7 @@ globalkeys = awful.util.table.join( awful.key({ modkey, }, "Right", function () -- TODO : Do the last ID better ... - if awful.tag.selected().name ~= "12" then + if awful.tag.selected().name ~= "11" then awful.tag.viewnext() end end, @@ -399,7 +399,7 @@ clientkeys = awful.util.table.join( -- Bind all key numbers to tags. -- Be careful: we use keycodes to make it works on any keyboard layout. -- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 12 do +for i = 1, 11 do globalkeys = awful.util.table.join(globalkeys, -- View tag only. awful.key({ modkey }, "F" .. i, diff --git a/4_graphic_interface.md b/4_graphic_interface.md index a3a4d62..03f6ec7 100644 --- a/4_graphic_interface.md +++ b/4_graphic_interface.md @@ -1,3 +1,10 @@ +Set first the Xautority: + +``` +touch ~/.Xauthority +``` + + gui --- ``` @@ -41,7 +48,7 @@ Check the Card graphic corectly install # list the output card : (permit to know wich graphic ard we have) lspci | grep VGA # install all the graphic card drivers: -pacman -S xorg xorg-drivers xorg-xinit +pacman -S xorg xorg-xinit # restart computer # ... # install bench tool diff --git a/7_controlCPU.md b/7_controlCPU.md new file mode 100644 index 0000000..fa51c8e --- /dev/null +++ b/7_controlCPU.md @@ -0,0 +1,28 @@ +CPU can be downgraded to reduce fan noise +========================================= + +For this you have tools + +Disable intel burst +``` +echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo +``` + +Force the CPU to not upper a frequency: +``` +echo 30 > /sys/devices/system/cpu/intel_pstate/max_perf_pct +``` + +you can check the all values with : +``` +cat /sys/devices/system/cpu/intel_pstate/* +``` + +you can check you CPU frequency with: +``` +cat /proc/cpuinfo | grep MHz +``` + +you can check : + +https://wiki.archlinux.org/index.php/CPU_frequency_scaling \ No newline at end of file diff --git a/8_disable_nvidia_card.md b/8_disable_nvidia_card.md new file mode 100644 index 0000000..d796b21 --- /dev/null +++ b/8_disable_nvidia_card.md @@ -0,0 +1,34 @@ +Disable the nvidia 'nouveau driver' +=================================== + +see + +https://askubuntu.com/questions/841876/how-to-disable-nouveau-kernel-driver + + +just do: +======== + +According to the NVIDIA developer zone: Create a file +``` +nano /etc/modprobe.d/blacklist-nouveau.conf +``` + +with the following contents: +``` +blacklist nouveau +options nouveau modeset=0 +``` + +Regenerate the kernel initramfs: +``` +sudo update-initramfs -u +``` + +and finally: reboot +``` +shutdown -r now +``` + +Read more at: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ixzz4rQODN0jy + diff --git a/mosquitto.md b/mosquitto.md new file mode 100644 index 0000000..ddc645d --- /dev/null +++ b/mosquitto.md @@ -0,0 +1,48 @@ +Basic mosquitto interface +========================= + + +Install mosquitto +----------------- + +``` +yaourt -S mosquitto +go get github.com/RedBeardLab/mqtt-stereo +``` + +Run mosquitto +------------- + +``` +systemctl start mosquitto +``` + +Read a simple topic +------------------- + +``` +mosquitto_sub -h localhost -t "sensor/temperature" +``` + +Write on a single topic +----------------------- + +``` +mosquitto_pub -h localhost -t sensor/temperature -m 22.5 +``` + +Record MQTT message: +-------------------- + +``` +go run github.com/RedBeardLab/mqtt-stereo --topic=sensor/temperature record +``` + +Play MQTT message: +-------------------- + +``` +go run github.com/RedBeardLab/mqtt-stereo --topic=sensor/temperature play +``` + +