Ubuntu: Libreoffice Calc slow scrolling Intel HD Graphics

On Libreoffice 4.3.X and earlier a lot of users post problems or freezes of scrolling inside Documents

This seems to be a bug inside Libreoffice and Cache Handling or 3D Handling to Intel HD

Solution: Add last ppa sources to the System to pull newest Version:

  • Open Gnome Terminal / Console
  • enter:

sudo add-apt-repository ppa:libreoffice/ppa && apt-get update && apt-get dist-upgrade -y

To pull last from PPA Source Tree and install Libre Office 4.4.X which i tested successful

Debian: Auto Update System Daily without special Tools

If you want to have a full automatic Update on your System then open a Gnome Terminal / Linux Console run (# Comments):

  • $sudo nano /root/update.sh
  • enter:

#/!bin/bash
apt-get update #pull updates
apt-get dist-upgrade -y  # install updates
apt-get clean #clean update database for next pull to have clean source urls
exit 0

  • save with CTRL+X # save+Exit
  • $sudo chmod 755 /root/update.sh # make able to run
  • Setup Timeplan:
  • $sudo su –  # change to root users console with environment
  • $crontab -e  # open root timer
  • enter:

@daily sh /root/update.sh > /dev/null 2>&1

save with CTRL+X and be happy the System pulls daily on midnight if online..

Ubuntu Vivid: Things you should change after fresh setup

If you Setup Ubuntu 15.XX on a PC there are a few things to change:

open a Gnome Terminal an run (# Comments):

  • $sudo apt-get update && apt-get dist-upgrade #Pull Updates
  • $sudo adduser CrazY12U$ERNAME # Create a crazy Username (Standarduser, no sudo, no lpadmin) for daily work! to prevent social engineering Hacks
  • $sudo chmod 700 /home/* # to prevent that other users look into each other homes! (check root home to “ls -l /root)
  • $sudo passwd root # SET long Password (min.15 digits) for the root User to prevent PC recovery Console Access without Password!!! Keep Password save!
  • $sudo apt-get install gufw  #Installs Firewall Dialog to easy setup a Firewall
  • $sudo apt-get install midori chromium-browser # to have 3 different browsers to open stream sites with plugins same time
  • $firefox -P #to create a Firefox Profile on Path /tmp which is deleted after every reboot, cause /tmp is on tmpfs (RAM)
  • $sudo apt-get install pidgin # to use pidgin chat (icq+facebook..)
  • $sudo apt-get install cpufrequtils #Auto sensing the CPU frequency to the load
  • $sudo apt-get install rsync # to sync home to a NAS Server in your Network over ssh encrypted! with “$rsync -av /home/user/ server:/home/user”
  • $sudo apt-get install gimp # to get a good Photoeditor
  • $sudo apt-get install filezilla # to have a nice FTP/FTPS-Client
  • $sudo apt-get install cups-pdf # to print notes/Websites from Browser into PDF document files for offline read (Paperless office)
  • $sudo apt-get install ssh # to have a secure remote access to your PC from everywhere (open incomming Port 22 with gufw)
  • $sudo gedit /etc/sshd/sshd_config and change:

AllowUsers yourusername #to allow only one user to login!!
PermitRootLogin no #disallow root to login!!! 
PasswordAuthentication no # disallow login without passwords
#if you have a ssh-pub-key!! then..
PubkeyAuthentication yes
AuthorizedKeysFile  %h/.ssh/authorized_keys

Remark: If you have a SSD/fast HDD in your PC you should setup Linux with full encrypted Disk Setup! My Howto easy to do and offers steal protection! (Laptops)

Ubuntu Vivid Debian: Kernel I/O Errors SSD SATA NVIDIA Chipsets

If you use a PC with a SSD Drive and a Motherboard which uses NVIDIA chipsets you may see Errors on boot

Command “dmesg” Output like..

Buffer I/O error on device sdc, logical block 41
ata5: EH complete
ata5: EH in SWNCQ mode,QC:qc_active 0x1 sactive 0x1
ata5: SWNCQ:qc_active 0x1 defer_bits 0x0 last_issue_tag 0x0
  dhfis 0x1 dmafis 0x1 sdbfis 0x0
ata5: ATA_REG 0x41 ERR_REG 0x84
ata5: tag : dhfis dmafis sdbfis sactive
ata5: tag 0x0: 1 1 0 1 
ata5.00: exception Emask 0x1 SAct 0x1 SErr 0x300000 action 0x6 frozen
ata5.00: Ata error. fis:0x21
ata5.00: cmd 60/08:00:07:04:00/00:00:00:00:00/40 tag 0 ncq 4096 in
         res 41/84:00:07:04:00/84:00:00:00:00/40 Emask 0x10 (ATA bus error)
ata5: hard resetting link
ata5: nv: skipping hardreset on occupied port
ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata5.00: configured for UDMA/133
sd 4:0:0:0: [sdc] 
Result: hostbyte=0x00 driverbyte=0x08
sd 4:0:0:0: [sdc] 
Sense Key : 0xb [current] [descriptor]
Descriptor sense data with sense descriptors (in hex):
        72 0b 47 00 00 00 00 0c 00 0a 80 00 00 00 00 00
        00 00 04 07
sd 4:0:0:0: [sdc] 
ASC=0x47 ASCQ=0x0...

This is a bug by the NVIDIA Manufacterer NOT by LINUX!

The Problem is that the hardware command “swncq” (DMA-64bit) is set to on by the “default” Kernels now, but older nvidia chips don’t support it! Only DMA-32bit

sata cable 600 with clip
sata cable 600 with clip

Info found here swnq libsata nvidia kernel (external Link)

Workaround on Gnome Terminal or Console:

  • $sudo echo ‘options sata_nv swncq=0’ >> /etc/modprobe.d/sata_nv.conf
  • $sudo update-initramfs -u -k all
  • reboot and test with “dmesg” command on Terminal! there should be NO Error now!
  • If the Problem still exists, then change SATA Cables to SATA-300/600 (II/III) “with Metal Clip on Connectors” take “shortest length”
  • May be possible that this bug touches other OS like Windows too

 

Ubuntu: Recover Data from old Luks Encrypted HDD to new HDD

If you prefer to use encrypted Devices you ran into a problem if you try to move, migrate or recover the files from the old luks protected home. As normal User you should know that luks is used with LVM2 Logicial Volume Manager, which manages the partitions “named based”. Major Info! Ubuntu prename the volume group with the Setup-DVD all time to the same VG_NAME called “ubuntu-vg”!!!

vg name volume group

So what do you need to migrate or recover?

  • Download the ubuntu DVD and burn it to a disc
  • Insert the new HDD to the Sata1 Port
  • Plugin the ubuntu DVD for Setup and boot the PC on DVD to “Live Mode”
  • Do not run a standard SETUP by pressing the Setup Link on the Desktop, select LVM+Crypted, and go on Setup, on end reboot.
  • Now the PC boots on the first HDD, if the new OS Setup is ok, shutdown to insert the old HDD on Sata2 Port.
  • Boot the PC on the DVD again to have a “LIVE MODE” (readonly OS) again.
  • Now open a Gnome Terminal and enter “$sudo cryptsetup luksopen /dev/sdb3 crypt” and enter the passoword to unlock the old HDD
  • Here you enter $vgdisplay to read out the UUID of the old “vg-Volumegroup! Name is same like on the new HDD!! Thats the problem!
  • Copy the UUID with the mouse and do a “$sudo vgrename oldUUID NEWVGNAME” this forces the OS to set a other VG_NAME, by default named as “ubuntu–vg”. YOU CANT MOUNT and HANDLE two different “Volume-Groups” with SAME VG_NAME!!!
  • Now you can run “$sudo vgscan –mknodes” and then “$sudo vgchange -ay” to activate all Volume Groups of all HDD’s
  • After that you will find the new mountpoint at /dev/mapper/… here you can do “$mount /dev/mapper/NEWVGNAME–vg-root /mnt”
  • do now backup your files from old to new HDD.. then reboot again to remove the old HDD..

Need more details? LVM Luks Handling Recovery Backup (external)

 

 

Ubuntu Vivid: Systemd boot OS into rescue mode with tmpfs

If you setup a Laptop with 15.XX and a luks encrypted SSD, you did set on older OS “tmpfs” for /tmp. Now under “systemd” the the boot hangs cause systemd “automount” tmpfs to /tmp by default!!! If you enter tmpfs into fstab like on ubuntu 14.10, the OS boots into the “RECOVERY RESCUE MODE”

Here some details, from a forum post:

Disable automatic mount

Under systemd, /tmp may be automatically mounted as a tmpfs even though you have no entry for that in your /etc/fstab.
To disable the automatic mount, run:
# systemctl mask tmp.mount
Files will no longer be stored in a tmpfs, but your block device instead. The /tmp contents will now be preserved between reboots, which you might not want. To regain the previous behavior and clean the /tmp folder automatically when restarting your machine, consider using tmpfiles.d:
/etc/tmpfiles.d/tmp.conf

# see tmpfiles.d
# always enable /tmp folder cleaning
D! /tmp 1777 root root 0

# remove files in /var/tmp older than 10 days
D /var/tmp 1777 root root 10d

# namespace mountpoints (PrivateTmp=yes) are excluded from removal
x /tmp/systemd-private-*
x /var/tmp/systemd-private-*
X /tmp/systemd-private-*/tmp
X /var/tmp/systemd-private-*/tmp

Backup your PC with Linux Full Disk Snapshot Free Tool with Diskdump

Today a User is forced to Update daily his System or change anything to try new Software.

But here mostly the Users run into very BAD PROBLEMS. I got often Calls that Users lose the control of the PC after Updates, Software Setups, Software Removal’s ..

For this Linux offers a default Backup Tool, called Diskdump (“dd” command) which is on every Setup/Recover CD and Installation.

Before any Changes do allways a Backup to USB Drives, Sticks or Second SATA Disk! This will save you TIME, Money, DATA and Nerves!

Backup :

Mount the Disk 2 on Path /mnt as “root/sudo” user (must have free Space like Disk 1 better more!)

mount disk

then start Backup Disk 1 everything to Disk 2 as IMG Image, bs set the speed disk to disk 10MB/s is a secure value!

dd disk dump backup

Restore :

To Restore a damaged PC, plug your second Disk into the PC, boot from Setup CD, Press ALT-CTRL-F1 (or open Gnome-Terminal)

Mount the second Disk again on /mnt with “root/sudo” User

mount disk

and start the restore with dd from Disk 2 – IMG – Imagefile to Disk 1, enjoy a long coffee break…

restore disk linux dd

After Command close without Errors or other Messages, reboot and go on working…

 

Remark: This is a Block to Block Backup and Restore, with Snapshots. These IMG Snapshots can be saved on Disks, moved over Network, burned to DVD or mounted like a DVD on other Linux Systems to access the Files for emergency!

 

Ubuntu Debian: Setup on older Hardware NO UEFI Workaround Black Screen No Boot

Todays current Hardware Bios uses a new Software Interface to boot. Thats called “UEFI

Newer Linux Versions Support this Hardware Setup by default!
BUT these settings makes users (Newbies/Office Users) mostly impossible to setup the System on older Hardware, cause the “Setup Routines” does not detect the older Bios! Here the User must interact manual to force the Setup! Cause the Setup tries to create a Harddrive Partition with a seperated UEFI Partition! See “parted” output on Console! Now if your Setup is made and you Reboot a older Non-UEFI PC you run into “Black Screen”! Especiallly if you setup a “Full Disk Encryption” with Luks!!!

uefi linux partition
uefi linux partition

Workaround:

  • Boot the PC on the Ubuntu/Debian CD
  • Press “Tab” on the Boot Menu of the CD
  • Enter “noefi” behind the Kernel Boot Code Line (… noefi quiet splash ) and Press CTRL+X to Boot now
  • Setup your PC and reboot, now he should be able to boot.

German Howto Wiki for Details (external)

Remark: How Secure a FAT32 Partition is, is a unknown secret. I dont like UEFI! Cause a Attacker could try to destroy the EFI Partition and you lose control.. Firmware is the most attacked Goal on IT not the Operating System !!