Showing posts with label CLI. Show all posts
Showing posts with label CLI. Show all posts

Wednesday, April 12, 2017

Set External Monitor as Default in Debian Console

I have a copy of debian running on a busted ThinkPad without an internal monitor.  It would be nice if the command line didn't revert to a 640x480 resolution on the external.  Solution: completely disable the internal monitor, so linux auto-sets the monitor resolution according to the specs of the external monitor. src.

Find the name of your monitors.  My internal card is an intel, so I can look in /sys for the EDID file (which has the EDID name, which is what we want).  src.
find /sys -name edid
Based on the output of that command, the name of my internal display is
LVDS-1
With that information, I'm going into GRUB and disabling the display.  Note it will not work at all after this, unless you change the setting back. 
sudo nano /etc/default/grub
edit the line from
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
(or whatever it was to begin with) to
GRUB_CMDLINE_LINUX_DEFAULT="quiet video=LVDS-1:d"
Keep whatever settings were already there.  Update GRUB, and reboot the computer.  
sudo update-grub
reboot

Friday, January 27, 2017

Command line system resource monitor

Shows cpu usage, memory, swap.
sudo apt-get install htop
htop

Show CPU info via command line

This gives a ton of information - way more that I generally ever need.
less /proc/cpuinfo
This is the tidy version.
lscpu
This is the min and max clock speed of the CPU:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq 
This is a cool command to keep track of the current CPU clock speed.
sudo watch -n 1  cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq


Final post here

I'm switching over to github pages .  The continuation of this blog (with archives included) is at umhau.github.io .  By the way, the ...