11. August 2017

Windows 10 displays different time after reboot from Linux

Using dual-boot Windows and Linux has several advantages. If one system fails to update, you can still work with the other one.

I experienced strange problem that Windows was always shifting the time about 2 hours after rebooting from Linux. One solution was to let Windows determine the time zone, but that worked until next reboot to Linux and back to Windows.

The solution that worked for me was to open regedit.exe and define following key as QWORD set to value 1:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal

Then reboot the machine to Linux and back to Windows and everything was ok. No more time shifts.

Thanks to Ailurus for the solution.

17. June 2017

Manual import of activities to Garmin Connect

Garmin is constantly improving Garmin Connect service. I’m happy to update this simple How to thanks to new version of Connect.

The new version of Garmin Connect makes it simple to upload data. Click the small icon with cloud and arrow in upper right corner and choose Import data.

You’ll see screen where you can drag’n’drop multiple files for upload.

Great job Garmin.

4. June 2017

Workaround: Failed to activate the platformio-ide package

PlatformIO was working without any problem, but after several updates, there was following error message:

Failed to activate the platformio-ide package

The bug is also mentioned at GitHub. It seems that the bug has a relation to the default OS shell.

Try following workaround (it worked for my Linux/ZSH):

  • change default shell to Bash
    sudo chsh -s /bin/bash YOUR_LOGIN
    
  • start Platform IO IDE
  • revert the shell back to your favorite
    sudo chsh -s /usr/bin/zsh YOUR_LOGIN
    

This solution worked for me. Let me know whether you have the same experience.

9. April 2017

How to edit font for OLED display SD1306

In the previous article, I’ve described how to generate custom font for OLED display like SD1306.

Meanwhile, I’ve discovered that number eight and number zero are hard to distinguish when reading from a distance, because of the dot inside the number zero.

I decided to remove the dot from number zero in order to make the font more readable. But how to do it?

Font generated from Squix’s generator is stored in form of source code. That makes it possible to edit. Just the stream of hexadecimal numbers is not very readable for a human.

Here is a small trick. Open the file in Vim in a terminal window. Search for string 0x00 which represents an area with no pixels. Vim should highlight all the occurences of 0x00. If you can’t see the highlight type command:

:set hlsearch

Start shrinking the window of the terminal and you should see that pattern begins to emerge.

When you hit the correct length of a line you should see the number clearly.

Numbers could be rotated, like number seven:

Change the font rebuild the code and the result looks like this:

24. March 2017

How to start Wireshark on openSUSE

The simple way how to start Wireshark on Linux is to type:

wireshark

If you run this command as a normal user you won’t be able to capture packets. In order to dump packets, you need to execute it as root. This must be done in a specific way. If try just sudo you’ll end up with interesting errors like:

Attempt #1

$ sudo su
# wireshark
QXcbConnection: Could not connect to display 
Aborted (core dumped)

Attempt #2

$ sudo wireshark
QXcbConnection: Could not connect to display 
[1]    8836 abort      sudo wireshark

The proper way how to start Wireshark is by gtk-su:

xdg-su -c wireshark