Category Archives: Bugs & Troubleshooting

Audio staggering in Windows 10

Update:

There are two better solutions (source):

1. Disable dynamic tick

  1. Open Command prompt (Admin) to bring up elevated command prompt.
  2. Type BCDEDIT /SET DISABLEDYNAMICTICK YES command and press Enter to fix the high DPC latency
  3. restart the computer

2. Install and use TCP optimizer:

  1. Download TCP optimizer
  2. Set settings to optimal
  3. restart the computer

If the above does not work, you can try the older solutions mentioned below.


Older solution (Jul 2017)

Before upgrading to Windows 10, check if there are drivers written for your hardware specifically for Windows 10. You should definitely check that drivers exists for your network card and your audio card.

One reason is that Windows 10 suffer from the same (and important) problem Windows 8 suffer: High DPC (deferred procedure call) latency. If the drivers do not work properly you may have high DPC latency, which may result to audio staggering, lag, clicks, drop outs even if your CPU does not reach 100%. This means that there is a high chance you won’t be able to playback movies flawlessly while using the network card! What a break dealer!!!

You can verify if your system suffers from high DPC latency by using LatencyMon. To learn what DPC latency is read this article.

If there is no Windows 10 driver for your network card, the easiest thing to do is not to upgrade to Windows 10 !!!

Now, what do we do if we have upgraded to Windows 10 and do suffer from undesired DPC latency? There are numerous solutions in the net. Most of which do not work.

Imho, you should complete the following steps by order referenced. If the problem is solved at any point, you don’t have to (and better not to) complete the rest of the steps.

Step 1: Update your system completely.

Step 2: If possible, remove 3rd party antivirus and firewall software.

Step 3: Remove any software you don’t need (you should do that anyway)

Step 4: Update all drivers to latest version.

At this point, if the problem persists then most probably one of your drivers is faulty or not completely compatible with Windows 10. There is also a slight chance that Windows 10 install an invalid version of the driver. You can find which process causes the problem by using LatencyMon but you can bet it is the network/wireless driver.

The only thing you can do is rollback to an older version of the driver or install another one of the same family. So there are two more steps to do:

Step 5: Verify that the driver installed is for the correct hardware model and not just for the correct hardware family. If your card is named 6200 then your driver should be for 6200. Anything else like 6201, 6205, 6300 is not acceptable.

Step 6: Find the proper driver for Windows 7 and install it

If the last step does not work, then you can try other drivers from the same family but you should be careful because this could lead to BSOD screens (so it is not recommended if you are a newbie).

Lastly, if the problem still persists after the last step then there are two more steps but they are both long shots and should definitely not apply them if your problem does not persist:

Step 7: Optimize BIOS:

Read this link.

Important settings to disable (and potentially help provided you do not need them enabled) are:

  • Virtualization
  • High precision timer

Step 8: Update the BIOS

Personally, I don’t think the last step helps. But many people claim it does, so you have nothing to lose.

At this point, if the problem persists you are unlucky. You may have to rollback to Windows 7 or install a version of Ubuntu. There are plenty that are fast and user friendly.

 

Advertisements

Unable to use ctrl+shift+? shortcuts with keyboard layout switcher

You have a Linux distribution with Xorg and you have configured the keyboard layout switcher to use alt+shift to switch between languages. But once you do that, keyboard shortcuts that use alt+shift+<key> combinations cannot be used. The same could happen if you have selected ctrl+shift as a shortcut to change language which disables all ctrl+shift+<key> combinations.

Continue reading Unable to use ctrl+shift+? shortcuts with keyboard layout switcher

Clock messed up when dual booting

The problem:

  • Linux store the time on the hardware clock as UTC by default
  • Windows store the time on the hardware clock as the local time by default

Since both operating systems access the hardware clock you may encounter problems when you dual boot between them.

A comment for the geeks:

The advantage of having the hardware clock as UTC is that you don’t need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets.

Changing Windows to use UTC

If you dual boot Windows and Linux/MAC and the clock is messed up after each boot, you should either :

  1. run regedit
  2. navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
  3. add key RealTimeIsUniversal as DWORD and set it’s value to 1.
  4. disable Windows time service:
sc config w32time start= disabled

You can download a REG script that performs the first 3 steps from here but you will have to perform the last step (disable the service) manually.

Changing Linux to use local time

Pre-Ubuntu 15.04 systems (e.g. Ubuntu 14.04 LTS):

  1. edit /etc/default/rcS
  2. add or change the following section
# Set UTC=yes if your hardware clock is set to UTC (GMT) UTC=no

Ubuntu 15.04 systems and above (e.g. Ubuntu 16.04 LTS):

  1. open a terminal and execute the following command
timedatectl set-local-rtc 1

References:

Restart/shutdown linux with magic (REISUB)

To restart your system, press alt + Printscreen/SysRq. Then, while holding those keys, slowly type the keys  R E I S U B (one key at a time, requires QUERTY keyboards). You can find a list of all SysRq keys here which includes key presses for other keyboard layouts.

To define the mode of SysRq you should edit the file: /etc/sysctl.d/10-magic-sysrq.conf . That file includes details of various levels of SysRq.

Here is an example of it’s contents:

# 0 - disable sysrq completely
# 1 - enable all functions of sysrq
# >1 - enable certain functions by adding up the following values:
# 2 - enable control of console logging level
# 4 - enable control of keyboard (SAK, unraw)
# 8 - enable debugging dumps of processes etc.
# 16 - enable sync command
# 32 - enable remount read-only
# 64 - enable signalling of processes (term, kill, oom-kill)
# 128 - allow reboot/poweroff
# 256 - allow nicing of all RT tasks

A recommended value is 64 because it permits you to use oom kill which is very useful.

Here is a short explanation for reboot (not all keys will work, as it depends on the value you have defined in  /etc/sysctl.d/10-magic-sysrq.conf file) :

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • B: Immediately reboot the system, without unmounting partitions or syncing

Here is a short explanation for shutdown:

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • O: Immediately shutdown the system, without unmounting partitions or syncing

Here is a cool mnemonic:

  • R – Reboot
  • E – Even
  • I – If
  • S – System
  • U – Utterly
  • B – Broken

References:

http://blog.kember.net/articles/reisub-the-gentle-linux-restart/

https://en.wikipedia.org/wiki/Magic_SysRq_key

 

Copy text from pdf does copy gibberish

 

Read the full explanation (optional)

It’s a  “problem” that often happens accidentally, but is also used intentionally to prevent copying and indexing of PDF files, especially when posted online.

Fonts in PDF files are stored with two tables, one contains the glyphs (the character shapes) and one contains a “toUnicode” map, which says what character each glyph represents. Acrobat uses the first table to draw the page, so it doesn’t actually know what the text “says”, only which patterns of shapes to draw. When you copy or search the file, the second lookup table is used to work out what the text says (i.e. in the word APPLE the first table says the second shape looks like “P” even if the shapes aren’t stored in alphabetical order, the toUnicode table says the second letter is 0x0050, a capital P).

If this toUnicode map is corrupted or missing, the PDF will render to screen (and print) just fine, but Acrobat has no idea what the shapes mean. The result when you screenread, export, search or copy/paste is a default set of mappings – so it will be a 1:1 relationship (every “A” will become the same character) – but the pairing is not predictable, so it cannot automatically be repaired. You can do it using plugins but would have to manually work out what each pair should be, and recreate the map table a letter at a time.

When this happens intentionally, it means the document author has removed or re-written the toUnicode map, using a plugin. When it happens accidentally it usually means the software exporting the PDF didn’t pass the correct font information to the PDF print driver (in the PostScript stream).

 

Here are the solutions:

#1 – Best Solution – Use google docs. Platform independent solution

  1. upload pdf to google docs
  2. open the document in google docs
  3. copy paste whatever you want

#2 – Use OCR

You need Acrobat 9:

  1. Document  → Watermark  → Add (add a text watermark, hit the space bar once).
  2. Advanced  → Print Production  → Flattener Preview  → Convert all text to outlines (checkbox on). Save.
  3. Document  → OCR text recognition  → recognize text using OCR. Select all text with the type tool, copy.

#3 – Print to Microsoft XPS Document Writer

  1. Print from Acrobat using “Microsoft XPS Document Writer” Output is: “your file name.oxps”
  2. Open “…oxps” with XPS Viewer.
  3. Print to PDF (Acrobat PDF, or CutePDF), using the highest resolution (600 DPI).
  4. Open with Acrobat and use OCR (Searchable Image (Exact)) option.

References:

 

qdpm/softaculous – Internal Server Error

Whoaaa, that was a nasty bug 😮

Use: Debian 8.8 & Apache 2.4 & php 7.0:

  1. Install qdpm via softaculous (or manually, it doesn’t matter)
  2. Navigate to admin page.

and … BOOM: Internal Server Error.

Messages totally misleading. Directory permissions are okay as is the default .htaccess file. Bug is much deeper.

Continue reading qdpm/softaculous – Internal Server Error