Ubuntu 16.04 LTS freeze problem:Freeze while after playing audio or video problem: qjackctl, pulseaudio

OS update wasn’t effective.

Killing qjackctl was effective to solve GUI freeze.

To start from the result upgrade to the latest one solved this.
It involved package manager repository error maybe…

Came back after a while

pulseaudio dependency programs upgrade and low latency kernel upgrade

pulseaudio dependency programs upgrade and low latency kernel upgrade to 4.15.0-47-lowlatency solved the problem finally. to 4.4.0-145-lowlatency is better. 4.15 version has error, jack sound clipping error.

 

I tried

sudo apt-get remove --purge qjackctl
sudo apt-get update
sudo apt-get install qjackctl

This made elapse time to freeze longer perhaps but not solved.
My case version not upgraded upper than 0.4.5.

 

masa@em-p:~$ qjackctl -v
Qt: 4.8.7
QjackCtl: 0.4.5

Latest is 0.5.5

I tried to install latest one but not upgraded.

tried download the source and ./configure, make install, but still 0.4.5.

After reboot, upgraded to 0.5.5.

This removed the problem so far…

Case closed!!!

Killing process launching console by

ctrl + alt + F2

and

ps x | grep qjackctl

kill PID(qjackctl)

and back to the GUI by

ctrl + alt + F7

was very plentiful study source for me…

I will write a post about this …

#apt-get #repository #Xdesktop #process

ref
https://github.com/rncbc/qjackctl/issues/13

==================================================================================

error has came back….

When Tried to driver update, apt-get error found.

tried kill pulseaudio

masa@em-p:~$ pulseaudio --kill
masa@em-p:~$ ps x |grep pulse
4512 ? S<l 0:00 /usr/bin/pulseaudio --start --log-target=syslog
4517 pts/17 S+ 0:00 grep --color=auto pulse

Before kill pulseaudio, check the grep result

masa@em-p:~$ pulseaudio --start
masa@em-p:s x |grep pulse
4535 ? S<l 0:00 pulseaudio --start
4541 pts/17 S+ 0:00 grep --color=auto pulse

Checked pulseaudio version

masa@em-p:~$ pulseaudio --version
pulseaudio 8.0

https://www.freedesktop.org/wiki/Software/PulseAudio/

Tried to upgrade pulseaudio. Xenial’s latest is 8.0 but dependency library were upgraded. Also low-latency kernel latest one added.

masa@em-p:~$ sudo apt-get upgrade pulseaudio
[sudo] password for masa: 
Reading package lists... Done
Building dependency tree 
Reading state information... Done
pulseaudio is already the newest version (1:8.0-0ubuntu3.10+kxstudio1).
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-43 linux-headers-4.15.0-43-generic
linux-image-4.15.0-43-generic linux-modules-4.15.0-43-generic
linux-modules-extra-4.15.0-43-generic
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
linux-generic-hwe-16.04 linux-headers-generic
linux-headers-generic-hwe-16.04 linux-headers-lowlatency
linux-image-generic-hwe-16.04 linux-image-lowlatency linux-lowlatency
The following packages will be upgraded:
apache2-bin busybox-initramfs busybox-static google-chrome-stable
grub-common grub-efi-amd64-bin grub-pc grub-pc-bin grub2-common
kodi-inputstream-adaptive libpam-systemd libpolkit-agent-1-0
libpolkit-backend-1-0 libpolkit-gobject-1-0 libsmbclient libsystemd0
libsystemd0:i386 libudev1 libudev1:i386 libwbclient0 linux-libc-dev
linux-libc-dev:i386 policykit-1 python-samba rsyslog samba samba-common
samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules
systemd systemd-sysv udev
34 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Need to get 77.0 MB/80.0 MB of archives.
After this operation, 66.6 kB of additional disk space will be used.
Do you want to continue? [Y/n]

 

Setting up google-chrome-stable (73.0.3683.103-1) ...
Setting up grub-common (2.02~beta2-36ubuntu3.21) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up grub-efi-amd64-bin (2.02~beta2-36ubuntu3.21) ...
Setting up grub2-common (2.02~beta2-36ubuntu3.21) ...
Setting up grub-pc-bin (2.02~beta2-36ubuntu3.21) ...
Setting up grub-pc (2.02~beta2-36ubuntu3.21) ...
cp: cannot remove '/var/lib/ucf/hashfile.7': Read-only file system
rm: cannot remove '/tmp/grub.UniXufaHIw': Read-only file system
debconf: DbDriver "config": could not write /var/cache/debconf/config.dat-new: Read-only file system
dpkg: error processing package grub-pc (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libwbclient0:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.19) ...
dpkg: unrecoverable fatal error, aborting:
unable to flush updated status of 'libc-bin': Read-only file system
touch: cannot touch '/var/lib/update-notifier/dpkg-run-stamp': Read-only file system
E: Sub-process /usr/bin/dpkg returned an error code (2)
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - pkgDPkgPM::Go (30: Read-only file system)
masa@em-p:~$ pulseaudio --version
pulseaudio 8.0
masa@em-p:~$ sudo apt-get upgrade pulseaudio
W: Not using locking for read only lock file /var/lib/dpkg/lock-frontend
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
masa@em-p:~$

next time upgrade seemed successful.

New kernel added.

check the kernel version.

masa@em-p:~$ uname -r
4.4.0-143-lowlatency

check available kernel versions

sudo apt-cache search linux-image

download latest one from this deb file.

https://packages.ubuntu.com/ja/xenial/amd64/linux-lowlatency-hwe-16.04/download

reboot and select the new one

masa@em-p:~$ uname -r
4.15.0-47-lowlatency

This solved the problem!!!

Next grub configuration to set to default the new kernel.

 

==========================================================

P.S

And another problem. dbus-send error problem. Is this have any relation to freeze error?

masa@em-p:~$ dbus-send --system /org/rncbc/qjackctl org.rncbc.qjackctl.stop
Failed to open connection to "system" message bus: Failed to connect to socket /opt/anaconda2/var/run/dbus/system_bus_socket: No such file or directory

under /opt/anaconda2/var directory only has cache directory, no run directory in my environment.

 

Advertisements

Samba: gvfsd-smb-browse crashed with SIGABRT in _talloc_get_type_a …

Google result not friendly

https://www.google.com/search?client=ubuntu&channel=fs&q=gvfsd-smb-browse+crashed+with+SIGABRT+in+_talloc_get_type&ie=utf-8&oe=utf-8

But after a while, this error not generated.

And this time I could connect to Vaio Windows 7 and copy files through the network on File Browser.

At first I couldn’t establish connection after entered password for workgroup.

 

 

Configuring default boot kernel on Ubuntu Linux

Check kernels lists.

grep menuentry /boot/grub/grub.cfg

 

Edit the file

sudo gvim /etc/default/grub

My case

from GRUB_DEFAULT=0 to

GRUB_DEFAULT=”1>Ubuntu, with Linux 4.4.0-141-lowlatency”

GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.4.0-141-lowlatency"

also fine.

sudo update-grub

This worked!!

My /boot/grub/grub.cfg file.

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT="1>Ubuntu, with Linux 4.4.0-141-lowlatency"
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

GRUB_BACKGROUND="/home/masa/Downloads/Pictures/Mount_Everest_as_seen_from_Drukair2_PLW_edit.jpg"

 

Installing Qtractor: Made a lots errors

qtractor installing generated a lots of errors.

 

But official site introduced way to dependency programs install at once…

Plus I couldn’t install plugin effects this time, and not install yet….
I should perhaps re compile to add plugins…

sai means "sudo apt-get install" in my environment

ERROR MESSAGE1
*checking for Qt library version >= 5.1… no; Qt 5.1 or greater is required

-> sudo apt-get install qt5-default

 

ERROR MESSAGE2
*configure: error: *** SNDFILE library not found.

-> sai -libsndfile-dev

 

ERROR MESSAGE3
checking for qmake-qt5… no
configure: error: qmake-qt5 not found in current PATH. Maybe QT development environment isn’t available. (qt5-devel)

->sudo apt-get install qt5-qmake

Next I tried below commands but don’t know was necessary.

{-> sai qtchooser

->export QT_SELECT=5}

Next

-> sudo apt-get install qt5-default

 

next

ERROR MESSAGE4
checking for sndfile… no
configure: error: *** SNDFILE library not found.

-> sai -libsndfile-dev

 

next

ERROR MESSAGE5
Project ERROR: Unknown module(s) in QT: x11extras

 

->apt-cache search libqt5x11extras

->sai libqt5x11extras5-dev

solved
And then, did
“sudo make” and “sudo make install”
ERROR MESSAGE5
lupdate: could not exec ‘/usr/lib/x86_64-linux-gnu/qt5/bin/lupdate’: No such file or directory

->sudo apt-get install qttools5-dev-tools

FINISHED😃

 

qtractor

 

Ubuntu: Package broken error

My ubuntu couldn’t update because of linux-header missing.

To tell the result, “sudo apt-get clean, update, upgrade” solved this problem.

upgrade called grub install prompt, so perhaps avoiding this is better.

Below is just memo.

this post calling many people from search engines, please check my other posts if you are not in hurry.

 

Package Broken

Check if you are using third party repositories. If so disable them, since they are a common source of problems.

Furthermore run the following command in a Terminal: apt-get install -f

Transaction failed: The package system is broken

The following packages have unmet dependencies:
linux-headers-4.4.0-139-generic: Depends: linux-headers-4.4.0-139 but it is not installed

linux-headers-4.4.0-139-lowlatency: Depends: linux-headers-4.4.0-139 but it is not installed

-f option of apt-get install  is  ( -f, –fix-broken)

Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running
APT for the first time; APT itself does not allow broken package dependencies to exist on a system. It is possible that a system’s dependency structure can be so corrupt as to require manual intervention (which usually means using dpkg –remove to eliminate some of the offending packages). Use of this option together with -m may produce an error in some situations. Configuration Item:
APT::Get::Fix-Broken.

Is linux-header api of c?

error message of desktop icon:
Error
Broken count > 0.

Error message of “sudo apt-get install linux-headers-4.4.0-139”

masa@em-p:~$ sai linux-headers-4.4.0-139
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-34 linux-headers-4.15.0-34-generic linux-headers-4.4.0-137 linux-headers-4.4.0-137-lowlatency
linux-headers-4.4.0-138-generic linux-image-4.15.0-34-generic linux-image-4.4.0-137-lowlatency
linux-modules-4.15.0-34-generic linux-modules-extra-4.15.0-34-generic
Use ‘sudo apt autoremove’ to remove them.
The following NEW packages will be installed:
linux-headers-4.4.0-139
0 upgraded, 1 newly installed, 0 to remove and 22 not upgraded.
42 not fully installed or removed.
Need to get 0 B/10.1 MB of archives.
After this operation, 71.0 MB of additional disk space will be used.
(Reading database … 486606 files and directories currently installed.)
Preparing to unpack …/linux-headers-4.4.0-139_4.4.0-139.165_all.deb …
Unpacking linux-headers-4.4.0-139 (4.4.0-139.165) …
dpkg-deb (subprocess): cannot copy archive member from ‘/var/cache/apt/archives/linux-headers-4.4.0-139_4.4.0-139.165_all.deb’ to decompressor pipe: failed to read (Input/output error)
dpkg-deb (subprocess): decompressing archive member: lzma error: unexpected end of input
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/linux-headers-4.4.0-139_4.4.0-139.165_all.deb (–unpack):
cannot copy extracted data for ‘./usr/src/linux-headers-4.4.0-139/arch/mips/include/asm/octeon/cvmx-npi-defs.h’ to ‘/usr/src/linux-headers-4.4.0-139/arch/mips/include/asm/octeon/cvmx-npi-defs.h.dpkg-new’: unexpected end of file or stream
Errors were encountered while processing:
/var/cache/apt/archives/linux-headers-4.4.0-139_4.4.0-139.165_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

“sudo apt-get clean” (clear cache)

“sudo apt-get update” and “sudo apt-get upgrade”

resolved this.

 

Writing “sleep or suspend script” for JACK and qjackctl

JACK is weak for suspend because it needs to be stopped and restarted when come back from suspend. So I’m trying to write suspend script which stop JACK before go to suspend mode and start after come back from sleep.

First stop and start qjackctl command is below.

dbus-send --system /org/rncbc/qjackctl org.rncbc.qjackctl.stop

 

dbus-send --system /org/rncbc/qjackctl org.rncbc.qjackctl.start

 

Now I have very simple script that very useful when come back from suspend mode because it stop and restart qjackctl automatically. That is

#!/bin/bash
dbus-send --system /org/rncbc/qjackctl org.rncbc.qjackctl.stop && dbus-send --system /org/rncbc/qjackctl org.rncbc.qjackctl.start

Actually this is enough useful. Lol. But I will try to make better one.

It use

sudo pm-suspend

command. The problem is needs sudoers configuration to use pm-suspend command.
Without this “sudo pm-suspend” in bash shell script won’t do anything.

sudo -S pm-suspend

will work, it receives password from a terminal and will suspend.
And this is almost perfect except for security problem

password='Hacker\'s password'
echo $password | sudo -S pm-suspend

It won’t require to input password interactively.

#!/bin/bash
#Suspend script for JACK(qjackctl)
#First stop JACK and go to suspend
dbus-send --system /org/rncbc/qjackctl org.rncbc.qjackctl.stop
password='********'
echo $password | sudo -S pm-suspend

Then, this should be assigned with hot key on GUI manager on Ubuntu.

And I guess restart script is harder because I should research mechanism and the script path which automatically done when return from suspend mode.

My plan was logging about sudoers configuration but now I think i can go with this.

I will write again soon. Bye.😀

 

 

 

iMacのUbuntu上でVirtualboxを使ってMacOSの仮想環境を作る

virtualbox

 

基本的なところは、とりあえず省いて、躓(つまず)いた点を中心に記述していく。

僕の場合は、USBスティック(ペンドライブ)のMacOS El-Capitanを使いインストールしようと思ったのだが、USBの設定で少し戸惑った。結局、焼いてあるイメージと、dmgの扱い、isoへの変換やらでまた躓いた。

ユーザをvboxusersグループに登録し、キーを追加した。

sudo gpasswd -a "username" vboxusers

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | \
sudo apt-key add - #(こっちのはうまくいかなかった。Oracleのサイトにdebian系の設定のしかたが書いてある、僕はオフィシャルの方法は試していない)
Oracle Official
https://www.virtualbox.org/wiki/Linux_Downloads

そして、OracleからでているExtensionPackのインストールが必要になった。これがないとUSB2.0や3.0が使えない。その際、インストールされていた、Virtualboxのバージョンが古くて、ExtentionPackのインストールが失敗した。最新版のダウンロードのためのapt用のリポジトリの登録やらなんやらをして、アップデートしたにはしたが、どこかでエラーが出て、結局Oracleから.debファイルをダウソして、再インストールした。(ExtentionPackは5.2版しか受け付けなかった。あと32bit版をインストールしていたのではないかという説がある。)
これで、ExtensionPackのインストールはうまくいった。

そして、MacからSierraOSをダウンロードして、パッケージを開き、dmgファイルをコピーして、バーチャルマシンに読み込ませて、スタートさせたけど、途中でフリーズ、てか処理進まなくなった。。isoイメージへの変換と、iMacのデバイスをターミナルからしなきゃいけない記述を見つけた。

とりあえずここまでで、一旦トライは終えた。

この記事も、きっと更新致す。

 

もう一度トライ

2018-10-12-Fri

ここのサイト
https://webnetforce.net/make-macos-bootable-iso/
を参考にdmgからisoファイルに変換した。

hdiutilとかちょっと何となくしか意味わからなかったけど、手順に従って進めると

/tmpディレクトリにHighSierra.iso.cdrというファイルができていた。

Ubuntuを立ち上げて
それを”mv”コマンドで HighSierra.isoに名前を変えた。

ここのサイト
https://webnetforce.net/macos-high-sierra-on-virtualbox/

に従って、仮想マシンの設定と、コマンドラインからのVBの設定をした。

そして、isoをマウントして起動した。
でも途中でフリーズしてしまった。

なんでだろう。

このサイトも参考にした
https://www.howtogeek.com/289594/how-to-install-macos-sierra-in-virtualbox-on-windows-10/

Ubuntuで外付けHDDがスリープしない件

hdparmコマンドの使用が一般的なようだが、僕の環境ではエラーで動かなかった。

SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

どうやら、SCSIやらATAやら、コントローラ、容量が大きすぎ(8TB)などの話になって、別のコマンドを勧められた。

hd-idleコマンド。インストール少しターミナルから実行するコマンド多かった。

ラズパイのセッティングに関するサイトに載っていた。
https://www.htpcguides.com/spin-down-and-manage-hard-drive-power-on-raspberry-pi/
頼みのコマンド hd-idle
http://hd-idle.sourceforge.net/

hd-idleコマンドが

/home/hd-idle

に作られていた。場所変えようかな。普通は/usr/localあたりなんか

追って更新する予定。

HDDからSDDへの移行 On NEC LaVie

La Vie というのはフランス語で、人生とか、生活、暮らしとかいう意味みたい。
女性名詞の冠詞Laに英語ではLifeに近い、Vie。

ddコマンドで楽勝かと思っていた匡孝だが。。。笑

まずXubuntuを遊びでインストールしてみた。GPTでパーティションテーブル作って、普通に起動できた。
アプリの立ち上がりとか、マジで速くなった。OSもね

で、もうS.M.A.R.Tで警告がでていた元のHDDのデータを、一旦WesternDigitalのWD40(4TB)に移してから、てかそのWD40は外付けケース買って、外付けHDD化してあって、それをSDD付けたLaVieに繋げて、ddコマンドでデータを流した。(一旦Xubuntuは消した。120GBのSDDで、ddコマンドするスペースあまりなくて。。。)

sudo dd if=/dev/sdb3 of=/dev/sda2 bs=64k conv=noerror,sync status=progress

みたいな感じで。

 

でもWindowsは起動しなかった。

ブートパーティションに何も書いてなかった。
BIOSとUEFIの違い、MBRとGPTの違い、ややこしいし、Windowsのブートローダわかりにき〜。笑MBRでまたパーティションテーブル作って、Winのデータコピーしなおしたりした。

でも、XubuntuはGPTで起動できたなぁ。

Grub消すんじゃなかった。
WinREって奴、ブート領域かと思って、またddコマンド(手間かかる〜)でコピーしたけどだめだった。

a disk read error occured
Press Ctrl + Alt + Del to restart

XubuntuのライブDVDはなぜか調子悪く、LubuntuのライブDVDで、いろいろ詮索。
Windows10のライブDVDも飛び交う。

なんかLubuntuのGParted、パッケージ足りなくて、WinREの領域、エラー出ていた。
chkdsk /f をウィンドウズで頼む、とエラーメッセージが出ていた。

はい、でも、それって何ドライブですか?笑 Cドライブじゃないでしょ?ちょっとわからなかった。

Grubインスコしようかな。

それとも、MBRにWindowsのブートストラップローダとかいうもの入れるか。

Palit 2.5 SATA 3 120GB UVS10AT-SSD120

手間取っとります。🙊

参考にしようと思っているサイト。

http://www14.plala.or.jp/campus-note/vine_linux/install/boot_sequence.html
ブートの話、わかりやし〜

https://msdn.microsoft.com/ja-jp/library/windows/hardware/dn898510(v=vs.85).aspx
microsoftさんの資料