I got this particular error message:
"The object invoked has disconnected from its client"
when trying to log into my Windows 8.1 machine locally.
This error is particularly debilitating because I cannot log in to my machine even from confirmed accounts that I used either for day to day tasks or administrative tasks. The culprit turns out to be a USB flash disk left plugged on one of the machine's USB socket. The fix is very simple, just remove the "offending" USB flashdisk and then all-is-well.
The USB flash disk in question contains a valid UEFI bootable OS along with the mandatory EFI partition to boot an UEFI-compliant OS. It seems to be some kind of check in Windows "chain of trust" detects this "irregularity" as breaking the "chain of trust" when Windows boot. Therefore, Windows decided that this is a malicious login attempt and blocks access into it. However, somehow the protection mechanism ends up with very uninformative message.
I list my analysis as "Partial Fix" because it works for my particular Windows 8.1 setup but might not work for other Windows versions.
Sunday, February 22, 2015
Intel PCH (Haswell) Sound (ALSA) Problem and Fix for Arch Linux
The main problem fixed by the method explained here as follows:
1. The kernel sound modules loaded just fine and able to recognize all sound-related chips just fine.2. The Intel PCH platform (in my case Haswell) seems to be perfectly fine in loading modules. Moreover, checks via alsautils programs seems to work as well.
3. There's no sound coming out of the analog output. The analog output is usually the ones which a laptop speaker is connected and the one which you put earphone jack into. If you are using HDMI output from your Intel platform. You might not need this fix.
The "hint" that problem exists is usually failure when running:
$ speaker-test
with rather cryptic error message akin to "unable to open XXXX file"
This fix is focused on my Haswell Laptop but it could also work on other Intel systems with PCH as well. The basic idea comes from this post: https://bbs.archlinux.org/viewtopic.php?id=180102. The only different thing is details of the hardware. The basic idea of the fix is: to force ALSA to reorder the module loading so as to make the sound chip controlling the analog output becomes the default output.
This fix ensures that the sound coming out of the default sound device is coming out of the analog output instead of the HDMI output. Anyway, you should have a sort of hint on which PCI device in your machine that controls the analog audio output. Usually, in Intel PCH platform (at least in Haswell), the ones that controls the analog output doesn't connect to the CPU directly, but rather to the PCH because the CPU (i.e. the HDMI device in the CPU chip) only connects to HDMI output. You should consult the system block diagram to ensure about this.
The fix consists of a *.conf file in /etc/modprobe.d. This file instructs the kernel module loader, i.e. the ALSA subsystem to reorder the sound modules so as to make the PCH audio device the "default" one (having index 0). In my case, I name the *.conf file: /etc/modprobe.d/alsa-base.conf. This is the contents of my /etc/modprobe.d/alsa-base.conf:
# Intel PCH options snd-hda-intel index=0 model=auto vid=8086 pid=9c20 # Intel HDMI options snd-hda-intel index=1 model=auto vid=8086 pid=0a0c
The meaning of the module configuration file above is to set PCI device with Vendor IDentifier (VID) 8086 and PID 9C20, i.e. Intel PCH as the default sound device (with index value set 0). You can find your specific vid and pid with this following command:
$ lspci -nn | grep -i audio 00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 09) 00:1b.0 Audio device [0403]: Intel Corporation 8 Series HD Audio Controller [8086:9c20] (rev 04)
This is the output of aplay -l in my system after I applied the fix:
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC3239 Analog [ALC3239 Analog] Subdevices: 0/1 Subdevice #0: subdevice #0 card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0As you can see, the PCH audio device has become the "default" audio device (card 0). With the fix, speaker-test no longer stops with "unable to open XXXX file" but outputs noise sounds from the speaker. This is an excerpt of speaker-test log from my terminal:
$ speaker-test speaker-test 1.0.28 Playback device is default Stream parameters are 48000Hz, S16_LE, 1 channels Using 16 octaves of pink noise Rate set to 48000Hz (requested 48000Hz) Buffer size range from 2048 to 16384 Period size range from 1024 to 1024 Using max buffer size 16384 Periods = 4 was set period_size = 1024 was set buffer_size = 16384 0 - Front Left Time per period = 2.657561 0 - Front Left Time per period = 2.986723 0 - Front LeftI hope this also helps those experiencing similar problems out there. Ciao.
Sunday, February 15, 2015
Zsh-Tmux Configuration for (Arch) Linux
I've been doing some testing in order to migrate to use tmux and zsh for my daily work on Linux. This post will show my configuration on both of them. First up is .zshrc:
This is how they look like at work:
A bit of explanation on the 'tmux -u' alias. The terminal application that I'm using somehow cannot recognize the vertical line delimiter correctly in tmux unless I force it to assume that it know UTF-8 encoding. If not forced, it will use 'x' as the delimiter which was annoying.
autoload -U compinit promptinit
compinit
promptinit
# This will set the default prompt to the walters theme
prompt walters
zstyle ':completion:*' menu select
setopt completealiases
setopt HIST_IGNORE_DUPS
alias tmux='tmux -u'
# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -A key
key[Home]=${terminfo[khome]}
key[End]=${terminfo[kend]}
key[Insert]=${terminfo[kich1]}
key[Delete]=${terminfo[kdch1]}
key[Up]=${terminfo[kcuu1]}
key[Down]=${terminfo[kcud1]}
key[Left]=${terminfo[kcub1]}
key[Right]=${terminfo[kcuf1]}
key[PageUp]=${terminfo[kpp]}
key[PageDown]=${terminfo[knp]}
# setup key accordingly
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history
[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history
# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init () {
printf '%s' "${terminfo[smkx]}"
}
function zle-line-finish () {
printf '%s' "${terminfo[rmkx]}"
}
zle -N zle-line-init
zle -N zle-line-finish
fi
I lay no claims on this configuration because it's a mix-and-match result of several configuration. Mainly from Arch Linux wiki. It worked without problems though. Next up is .zshenv:
typeset -U path path=(~/bin $path)So. Now hopefully you get working zsh configuration. The comments in the config files are self-explanatory. Next up is my .tmux.conf:
#Prefix is Ctrl-a set -g prefix C-a bind C-a send-prefix unbind C-b # set shell set -g default-shell /bin/zsh set -sg escape-time 1 set -g base-index 1 setw -g pane-base-index 1 #Mouse works as expected setw -g mode-mouse on set -g mouse-select-pane on set -g mouse-resize-pane on set -g mouse-select-window on setw -g monitor-activity on set -g visual-activity on set -g mode-keys vi set -g history-limit 10000 # y and p as in vim bind Escape copy-mode unbind p bind p paste-buffer bind -t vi-copy 'v' begin-selection bind -t vi-copy 'y' copy-selection bind -t vi-copy 'Space' halfpage-down bind -t vi-copy 'Bspace' halfpage-up # extra commands for interacting with the ICCCM clipboard bind C-c run "tmux save-buffer - | xclip -i -sel clipboard" bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" # easy-to-remember split pane commands bind | split-window -h bind - split-window -v unbind '"' unbind % # moving between panes with vim movement keys bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R # moving between windows with vim movement keys bind -r C-h select-window -t :- bind -r C-l select-window -t :+ # resize panes with vim movement keys bind -r H resize-pane -L 5 bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5Well, this one is also quite self-explanatory. At the very least this provides you with basic command completion among others and tmux that recognize zsh. Also, it remaps C-b to C-a so that it's easier to reach in QWERTY keyboard.
This is how they look like at work:
A bit of explanation on the 'tmux -u' alias. The terminal application that I'm using somehow cannot recognize the vertical line delimiter correctly in tmux unless I force it to assume that it know UTF-8 encoding. If not forced, it will use 'x' as the delimiter which was annoying.
Friday, January 30, 2015
CCSIDs a.k.a Code Pages in IBM PASE for i
It all started with iconv() function in iSeries PASE. I need to figure out how to convert strings back and forth between iSeries PASE and ILE programs. I didn't realize at first that there were TWO instead of one libiconv library installed on the iSeries I worked with. One from GNU and one from IBM (the original one). I had to specify the one I intend to use specifically in my Makefile.am as follows:
Well, then it turned out, the code page "string" specified for ILE C didn't work out. I found out that the code page string should be as shown here. I'm puzzled as to where that guy found the code page string. Then, I finally found that it was AIX code page specification after all, as this link shows. I reproduce it below, just in case (and hopefully IBM doesn't mind ;).
So, next time, you code on iSeries PASE, use "IBM-037" (EBCDIC code page) and "ISO8859-1" (ASCII 8-bit) strings to convert back and forth.
I hope this post will somehow save somebody someday.
pase_to_rpg_string_LDADD = /QOpenSys/QIBM/ProdData/OS400/PASE/lib/libiconv.a
Well, then it turned out, the code page "string" specified for ILE C didn't work out. I found out that the code page string should be as shown here. I'm puzzled as to where that guy found the code page string. Then, I finally found that it was AIX code page specification after all, as this link shows. I reproduce it below, just in case (and hopefully IBM doesn't mind ;).
| CICS short code name | CCSID | AIX® and Windows code page | HP–UX code page name | Solaris code page name | Description |
| 37 | 37 | IBM-037 | american_e | IBM-037 | IBMLatin-1 EBCDIC |
| 8859-1 | 819 | ISO8859-1 | iso8859_1 | 8859 | Latin-1 ASCII (ISO) |
| 819 | 819 | ISO8859-1 | iso8859_1 | 8859 | Latin-1 ASCII (IBM/ISO) |
| 850 | 850 | IBM-850 | roman8 | IBM-850 | Latin-1 ASCII |
| 437 | 437 | IBM-437 | iso8859_1 | IBM-437 | Latin-1 (PC) ASCII |
| 930 | 930 | IBM-930 | cp930 | IBM-930 | Japanese EBCDIC |
| 931 | 931 | IBM-931 | japanese_e | IBM-931 | Japanese EBCDIC |
| 939 | 939 | IBM-939 | cp939 | IBM-939 | Japanese EBCDIC |
| 932 | 932 | IBM-932 | sjis | ja_JP.pck | Japanese ASCII |
| EUCJP | 954 | IBM-eucJP | eucJP | eucJP | Japanese ASCII (ISO) |
| 942 | 942 | IBM-942 | IBM-942 | IBM-942 | Japanese ASCII |
| 943 | 943 | IBM-943 | IBM-943 | IBM-943 | Japanese ASCII |
| EUCKR | 970 | IBM-eucKR | eucKR | eucKR | Korean ASCII (ISO) |
| 934 | 934 | IBM-934 | IMB-934 | IBM-934 | Korean ASCII |
| 944 | 944 | IBM-944 | IBM-944 | IBM-944 | Korean ASCII |
| 949 | 949 | IBM-949 | korean15 | IBM-949 | Korean ASCII |
| 933 | 933 | IBM-933 | korean_e | IBM-933 | Korean EBCDIC |
| EUCTW | 964 | IBM-eucTW | IBM-eucTW | eucTW | Traditional Chinese |
| 938 | 938 | IBM-938 | IBM-938 | IBM-938 | Traditional Chinese ASCII |
| 948 | 948 | IBM-948 | IBM-948 | IBM-948 | Traditional Chinese ASCII |
| 937 | 937 | IBM-937 | chinese-t_e | IBM-937 | Traditional Chinese EBCDIC |
| BIG5 | 950 | Zh_TW.big5 | big5 | zh_TW.BIG5 | Traditional Chinese BIG5 |
| 946 | 946 | IBM-946 | IBM-946 | IBM-946 | Simplified Chinese ASCII |
| 1381 | 1381 | IBM-1381 | hp15CN | IBM-1381 | Simplified Chinese ASCII |
| 935 | 935 | IBM-935 | chinese-s_e | IBM-935 | Simplified Chinese EBCDIC |
| EUCN | 1383 | IBM-eucCN | chinese-s_e | eucCN | Simplified Chinese ASCII (ISO) |
| GB18030 | 5488 | GB18030 | gb18030 | GB18030 | Simplified Chinese GB18030 |
| 864 | 864 | IBM-864 | arabic8 | IBM-864 | Arabic ASCII |
| 8859-6 | 1089 | ISO8859-6 | iso8859_6 | ISO8859-6 | Arabic ASCII (ISO) |
| 1089 | 1089 | ISO8859-6 | iso8859_6 | ISO8859-6 | Arabic ASCII (IBM/ISO) |
| 420 | 420 | IBM-420 | arabic_e | IBM-420 | Arabic EBCDIC |
| 855 | 855 | IBM-855 | IBM-855 | IBM-855 | Cyrillic ASCII |
| 866 | 866 | IBM-866 | IBM-866 | IBM-866 | Cyrillic ASCII |
| 8859-5 | 915 | ISO8859-5 | iso8859_5 | ISO8859-5 | Cyrillic ASCII (ISO) |
| 915 | 915 | ISO8859-5 | iso8859_5 | ISO8859-5 | Cyrillic ASCII (IBM/ISO) |
| 1025 | 1025 | IBM-1025 | IBM-1025 | IBM-1025 | Multilingual Cyrillic EBCDIC |
| 869 | 869 | IBM-869 | greek8 | IBM-869 | Greek ASCII |
| 8859-7 | 813 | ISO8859-7 | iso8859_7 | ISO8859-7 | Greek ASCII (ISO) |
| 813 | 813 | ISO8859-7 | iso8859_7 | ISO8859-7 | Greek ASCII (IBM/ISO) |
| 875 | 875 | IBM-875 | greek_e | IBM-875 | Greek EBCDIC |
| 856 | 856 | IBM-856 | hebrew8 | IBM-856 | Hebrew ASCII |
| 8859-8 | 916 | ISO8859-8 | iso8859_8 | ISO8859-8 | Hebrew ASCII (ISO) |
| 916 | 916 | ISO8859-8 | iso8859_8 | ISO8859-8 | Hebrew ASCII (IBM/ISO) |
| 424 | 424 | IBM-424 | hebrew_e | IBM-424 | Hebrew EBCDIC |
| 273 | 273 | IBM-273 | german_e | IBM-273 | Austria, Germany EBCDIC |
| 277 | 277 | IBM-277 | danish_e | IBM-277 | Denmark, Norway EBCDIC |
| 278 | 278 | IBM-278 | finnish_e | IBM-278 | Finland, Sweden EBCDIC |
| 280 | 280 | IBM-280 | italian_e | IBM-280 | Italy EBCDIC |
| 284 | 284 | IBM-284 | spanish_e | IBM-284 | Spain, Latin Am.(Sp) EBCDIC |
| 285 | 285 | IBM-285 | english_e | IBM-285 | UK EBCDIC |
| 297 | 297 | IBM-297 | french_e | IBM-297 | France EBCDIC |
| 500 | 500 | IBM-500 | IBM-500 | IBM-500 | International latin-1 EBCDIC |
| 871 | 871 | IBM-871 | icelandic_e | IBM-871 | Iceland EBCDIC |
| 852 | 852 | IBM-852 | IBM-852 | IBM-852 | Latin-2 ASCII |
| 8859-2 | 912 | ISO8859-2 | iso8859_2 | ISO8859-2 | Latin-2 ASCII (ISO) |
| 912 | 912 | ISO8859-2 | iso8859_2 | ISO8859-2 | Latin-2 ASCII (IBM/ISO) |
| 870 | 870 | IBM-870 | IBM-870 | IBM-870 | Latin-2 EBCDIC |
| 857 | 857 | IBM-857 | turkish8 | IBM-857 | Turkey ASCII |
| 8859-9 | 920 | ISO8859-9 | iso8859_9 | ISO8859-9 | Turkey ASCII (ISO) |
| 920 | 920 | ISO8859-9 | iso8859_9 | ISO8859-9 | Turkey ASCII (IBM/ISO) |
| 1026 | 1026 | IBM-1026 | turkish_e | IBM-1026 | Turkey EBCDIC |
| UTF-8 | 1208 | UTF-8 (only) | UTF-8 | UTF-8 | Unicode file code set |
| UCS-2 | 1200 | UCS-2 (only) | UCS-2 | UCS-2 | Unicode processing code set |
So, next time, you code on iSeries PASE, use "IBM-037" (EBCDIC code page) and "ISO8859-1" (ASCII 8-bit) strings to convert back and forth.
I hope this post will somehow save somebody someday.
Subscribe to:
Posts (Atom)
