Elementary OS
Some problem in using Elementary OS.
Install NVIDIA driver
- First, you should removed everything related with nvidia
$ sudo apt-get remove bumblebee (if installed) $ sudo apt-get remove nvidia*
- Add the ppa
$ sudo add-apt-repository ppa:graphics-drivers/ppa $ sudo apt update
- And install the proper deriver
$ sudo apt-get install nvidia-xxx
- update the pci infor
$ sudo update-pciids
Long boot time
- Print the boot time, dispaly the tree
$ systemd-analyze critical-chain
- And found bug in dbus
$ sudo mv /etc/xdg/autostart/at-spi-dbus-bus.desktop /etc/xdg/autostart/at-spi-dbus-bus.desktop.bk
- NOTE
- display more-less start time
$ systemd-analyze blame
- display all startup time
$ systemd-analyze
- disable someone service
$ sudo systemctl disable XXX.service
- display more-less start time
Elan Figerprint
- check the fingerprint sensors.supported reader(04f3: 0903, 0907, 0c01-0c33)
$ sudo update-usbids $ lsusb Bus 001 Device 003: ID 04f3:0c1a Elan Microelectronics Corp.
- because the official libfprint don't support the Elan,so you must compile the libfprint with ElanTech fingerprint reader driver.
$ git clone [email protected]:iafilatov/libfprint.git $ cd libfprint $ ./autogen.sh $ ./configure $ make & sudo make install
- install the fprint-demo and check fingerprint sensor's status
$ sudo apt install fprint-demo $ sudo fprint-demo
- if fprint-demo can recognize the Elan fingureprint sensor(correctly installed the libfprint driver),uninstall the fprint-demo.if fprint-demon can't recognize the Elan fingureprint sensor,do not go on.
$ sudo apt remove --purge fprint-demo
- install the fprintd.
$ sudo add-apt-repository ppa:fingerprint/fprint $ sudo apt-get update $ sudo apt install fprintd # NOTE:DON'T INSTALL THE libfprint0
- enroll fingerprint
# for current user,so don't sudo $ fprintd-enroll $ fprintd-verify
- if the fprintd can verfy your fingerprint,install the pam module.
Verify result: verify-match (done) $ sudo apt install libpam-fprintd
- if you didn't modified the file of "/etc/pad.d/common-auth",do not do the following.
$ sudo pam-auth-update --force
- remove the ppa which added just,because it will push the upgrade for libfprint0.
$ sudo add-apt-repository -r ppa:fingerprint/fprint
- reboot and enjoy your Elan fingureprint sensor.
Power notification
- use the UPower
$ sudo vi /etc/UPower/UPower.conf
- if
UsePercentageForPolicy=true
- edit
PercentageLow=20 PercentageCritical=10 PercentageAction=5
- if
Use xkb modify key mapping
- print current mapping
# setxkbmap -print xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+us+inet(evdev)" }; xkb_geometry { include "pc(pc105)" }; };
- In xkb_symbols,the file of pc we will modify.
- backup
# cd /usr/share/X11/xkb # tar -cvf symbols.tar symbols
- exchange Caps and L_Ctrl
# vi symbols/pc key <CAPS> { [ Control_L ] } key <LCTL> { [ Caps_Lock ] }
- save the file
- logout and login in again.
Pair QC35 use bluetooth
Get back to a clean state
- clean up you past attempts to pair
- On Ubuntu, remove the headphones from the Bluetooth paired list.
- On the headphones, hold the switch in Bluetooth pairing position for 10 seconds to delete all paired devices.
- deactivate Bluetooth on other surrounding devices.
Deactivate Bluetooth LE
- Edit Bluetooth configuration file
sudo nano /etc/bluetooth/main.conf
- Replace
#ControllerMode = dual
- with
ControllerMode = bredr
- Restart Bluetooth
sudo service bluetooth restart
Pair
- Make sure the headphones are in pairing mode.
- Pair with System Settings > Bluetooth
- Select & test the headphones in System Settings > Sound. You may want to choose High Fidelity Playback (A2DP Sink) for high playback quality.
Debian apt cdrom error
Appear "in the drive '/cdrom/' and press [Enter]"
- Edit file
# vi /etc/apt/sources.list
- comment or delete the line that contain 'cdrom'
- update
# apt update
Long time to resolve name
Whether ipv6 on/off
$ ifconfig
check if an ipv6(inet6) appear.
Temporarily turn ipv6 off
$ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
turn ipv6 off on all interface.
Permanently turn ipv6 off
$ sudo vim /etc/sysctl.d/99-sysctl.conf
# and append the following in this conf file
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.wlp2s0.disable_ipv6 = 1
# and run the command
$ sudo sysctl -p
If the above does not work
$ sudo vi /etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1"
$ sudo update-grub
Emerge wait time on grub menu
Modify the file
vi /boot/grub/grub.cfg
if [ $grub_platform = efi ]; then
set timeout=0 # set to 0
NOTE:above is not suitable
modify the following file
vi /etc/grub.d/00_header
if [ \$grub_platform = efi ]; then
set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30} # set to 0
Don't appear login screen
There is no login screen after suspend when device use a additional monitor
- check what do you use. lightdm or gdm
cat /etc/passwd | grep lightdm
- for example, use lightdm
- Set a monitor setting, and save it.
- Copy the file, and change the owner and group.
sudo cp ~/.config/monitors.xml ~lightdm/.config/monitors.xml sudo chown lightdm:lightdm ~lightdm/.config/monitors.xml
Display tray icons
- indicator-application
- indicator-application is installed by default in elementary OS 5.0 Juno but it needs a tweak to work with Pantheon.
- copying the /etc/xdg/autostart/indicator-application.desktop file to ~/.config/autostart
cp /etc/xdg/autostart/indicator-application.desktop ~/.config/autostart/ sed -i 's/^OnlyShowIn.*/OnlyShowIn=Unity;GNOME;Pantheon;/' ~/.config/autostart/indicator-application.desktop
- wingpanel-indicator-ayatana
- wingpanel-indicator-ayatana is no longer available in elementary OS 5.0 Juno
- download and install this package
wget http://ppa.launchpad.net/elementary-os/stable/ubuntu/pool/main/w/wingpanel-indicator-ayatana/wingpanel-indicator-ayatana_2.0.3+r27+pkg17~ubuntu0.4.1.1_amd64.deb sudo dpkg -i wingpanel-indicator-ayatana_2.0.3+r27+pkg17~ubuntu0.4.1.1_amd64.deb
Gala collapse
When swith windows using alt+tab, gala collapse
- go to the VT.
- Ctrl + Alt + F1
- kill gala
# killall gala
- restart gala
# nohup sh -c "DISPLAY=:0 gala --replace" >> /dev/null 2>&1 &
Recover the system
Can't into recovery mode, and can't boot into tty
- use liveCD
- boot from liveCD, boot into living system, not install system
- sudo passwd elementary # depend your user,set a sudo password
- sudo mount /dev/... /mnt # mount the previous root part
- sudo chroot /mnt # change the root dir
- do what you want, recover the os.