Sunday, June 18, 2017

performance - Long shutdown times in Windows 7




I'm experiencing long shutdown times in Windows 7 Professional on newly built machines. After joining to a domain, they take over ten minutes to shut down. There is almost no software installed besides VNC and Office 2010. I ran a shutdown trace with Windows Performance Recorder and generated a graph of what's running during these long shutdowns. Most of the shutdown processes occur within the first minute or so and then wininit.exe (blue) and System (orange).



Shutdown analysis



So how do I go about reducing shutdown times in this scenario?


Answer



look at the summary of the disk graph. I can see you have a lot of disk IO.



Maybe you clear the pagefile at shutdown.




To check it, open regedit, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management, locate the value ClearPageFileAtShutdown and make sure the value is set to 0.



This can cause such a slowdowns.


Saturday, June 17, 2017

Laptop Battery Usage




I have a doubt regarding usage of power on a laptop


I have basically come across 2 widespread believes to maitain a healthy backup for battery :



  1. Always keep the laptop on charge whenever on use ( If u have a power source nearby) and close it only when u shut it down


  2. Charge it to 100%, remove the adapter, let it discharge to 10% and charge again.



So my question is which is the actual way to ensure a good health for battery for a long time ??

keyboard shortcuts - Use forward slash as a key command in tmux

In tmux, is it possible to bind forward slash to a command? The command I want to create is below:



bind-key -nr C-M-/ kill-window \; next-window


This config errors with: /home/joe/.tmux.conf:42: unknown key: C-M-/



The command works if I use a letter instead of a forward slash. I want to use forward slash to mirror my emacs config.




Update:
Doesn't look like it's possible. According to the man page, only certain keys are white-listed. The relevant section from the man page:




Key Bindings



tmux allows a command to be bound to most keys, with or without a
prefix key. When specifying keys, most represent themselves (for
example ‘A’ to ‘Z’). Ctrl keys may be prefixed with ‘C-’ or ‘^’, and

Alt (meta) with ‘M-’. In addition, the following special key names are
accepted: Up, Down, Left, Right, BSpace, BTab, DC (Delete), End,
Enter, Escape, F1 to F20, Home, IC (Insert), NPage (Page Up), PPage
(Page Down), Space, and Tab. Note that to bind the ‘"’ or ‘’’ keys,
quotation marks are necessary, for example:


partitioning - Can I reinstall Windows 10 after upgrading from OEM Windows 7?

I have an HP Pavilion dv6 laptop. It came with Windows 7 preinstalled, and I upgraded it to Windows 10. A little while after I was wanting to use Ubuntu, so I attempted to install it. I figured out that there were already 4 primary partitions on the hard drive. There was the the two ntfs partitions Windows uses, a third ntfs partition called recovery, and a fat32 partition called hp_tools. I deleted the recovery and fat32 partition. When I attempted to boot Windows 10 after the partitions were deleted, it failed to boot. It stopped a little while into the part with the spinning circle. The error code read: INACCESSIBLE_BOOT_DRIVE. It automatically restarted, and came up with the recovery and repair menu. I tried clicking reset, but it said the drive was locked. None of the other options worked either. I foolishly didn't back up the computer before messing with the partitions, so the only thing I could think of to do was reinstall Windows 10. I used my desktop to create a bootable Windows 10 installation flash drive. I am not sure if I should format the hard drive and attempt to do that, or what. The only activation key I have is the old Windows 7 one on the sticker on the bottom. Any ideas of what I should do?

linux - Optical drive failing to mount, yet can be read from



I've had this problem for a while, but have only recently really tested what works and what doesn't, and it's frightfully confusing. Here's my drive situation (Sony Vaio FE890 running ArchLinux):





  • Sony vaio FE-890 optical drive (MATSHITA cd/dvd read/writer)

  • fails to burn anything (cd or dvd)

  • fails to mount data CDs

  • fails to mount data DVDs

  • successfully plays video DVDs (doesn't require mounting)

  • no idea if it'll play an audio CD (who even has those anymore?)



A long time ago (circa a year and a half) it had similar issues (at the time, I just noticed burning CDs failed) I took the drive apart, tinkered a little and put it back together again and it worked perfectly. I tried the same approach again this time and no dice. The problem hasn't bothered me much as with a decent net connection and flash drives, optical media aren't all that necessary, but I find myself needing to read data DVDs (OS installation media), no flash drives and a tenuous connection to the internet




Trying to mount a CD or DVD then running dmesg returns this:




cdrom: This disc doesn't have any tracks I recognize!
attempt to access beyond end of device
sr0: rw=0, want=68, limit=4
attempt to access beyond end of device
sr0: rw=0, want=1028, limit=4
attempt to access beyond end of device
sr0: rw=0, want=2052, limit=4

UDF-fs: No anchor found
UDF-fs: No partition found (1)
attempt to access beyond end of device
sr0: rw=0, want=68, limit=4
isofs_fill_super: bread failed, dev=sr0, iso_blknum=16, block=16


The fact that DVD videos play just fine stumps me. It means that the reading is happening just fine, but just the mounting fails. However, I doubt it's a driver/software problem as it also fails to boot from bootable CD/DVDs



Any ideas/thoughts/eureka's?




Thanks!
-Mala


Answer



It is probably just end of it's life.



I see this sort of random behaviour all the time in slim line optical drives (desktop as well, but a lot less common).



Usually I see that it can read from produced cd's and dvd's but home burnt r's and rw's fail... but, there is no one answer fits all and it is always random as you have said above.




Get another drive and swap over all the housings (that was it costs £20 instead of Sony's £200!), or if you have a spare computer - use that, convert to ISO and mount it on your machine.


windows 7 - Outlook 2010 crashes when viewing mail with Japanese text


I have a user whose Outlook 2010 (32-bit) client crashes when attempting to view mail with Japanese text in the body. The client crashes both when I use the reading pane and when I try to open the message without the reading pane. The user is running 64-bit Windows 7 Professional.


This is what showed up in the Application log at first:



Faulting application name: OUTLOOK.EXE, version: 14.0.6126.5003, time stamp: 0x505b1685


Faulting module name: riched20.dll, version: 14.0.6015.1000, time stamp: 0x4d1933c2


Exception code: 0xc0000005


Fault offset: 0x0001dcc0


Faulting process id: 0xecc


Faulting application start time: 0x01cdc6f530bbbd29


Faulting application path: C:\PROGRA~2\MIF5BA~1\Office14\OUTLOOK.EXE


Faulting module path: C:\Program Files (x86)\Common Files\Microsoft Shared\office14\riched20.dll


Report Id: 12c33f72-32f2-11e2-ad30-f0def1549eda



So I renamed riched20.dll and repaired Office. It got replaced, but the log entry for each crash looks now like this:



Faulting application name: OUTLOOK.EXE, version: 14.0.6126.5003, time stamp: 0x505b1685


Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000


Exception code: 0xc000041d


Fault offset: 0x745f4c4f


Faulting process id: 0x17b8


Faulting application start time: 0x01cdc795daf5b339


Faulting application path: C:\Program Files (x86)\Microsoft Office\Office14\OUTLOOK.EXE


Faulting module path: unknown


Report Id: abc57e29-3389-11e2-86b6-f0def1549eda



I've tried:



  • Rebooting (of course)

  • Repairing Office

  • Removing and reinstalling Office

  • Running Outlook in safe mode

  • Removing the antivirus client temporarily


No luck so far. Any ideas?


Answer



RichEd20.DLL is the library which enables Rich Text Editing within Outlook. Based on exception code 0xc000041d (unhandled exception in user callback, maybe a null pointer exception), it's safe to say the repair failed spectacularly probably by not linking the new library correctly.


The initial exception, 0xc0000005, is an access violation within the library. This leads me to believe that there may have been a corruption in the language display support for the OS itself rather than only Outlook. Re-imaging a machine would solve this of course... An alternative is to "trick" the machine into re-initializing its language display settings by changing its locale


As an aside, if this comes up with a character set that's not natively supported within windows, a re-install of the Language Interface Pack or LIP may solve the issue as well.


macos - How do you clone the data off of a flash memory (via digital camera) device for recovery?


I have a digital camera that uses compact flash cards. Currently, I connect the camera to the computer through a USB cable.


The compact flash card appears to have some bad sectors or something, because some of the images are corrupt.


I was hoping to clone all of the data off of the card to play around with recovery, while being able to wipe the card and continue to use it until I can replace it.


It seems like there is likely a way to directly clone data off of a device that shows up as mounted on my OSX desktop (as the camera memory does). Any suggestions? Something that I can then mount again after cloning would be ideal.


Command-line (dd perhaps?) approaches are fine.


Also, wouldn't mind hearing Windows solutions as well, though will give the answer check to an OSX solution.


Answer



dd is the way to go. dd has an option called noerror which will just write blank data if it is unable to read it. I use this method to try and restore dead harddrives etc.


You will need to find what it is mounted as when it comes onto the MAC, to do that you run the following command


diskutil list

This will list each /dev/diskX and then the partion information etc. If you want to clone the whole disk then that is all you will look for, which in this case is what you will want to do. Find you camera on this list. For this example lets pretend that it is /dev/disk4, you will need to then tell dd to run


mkdir ~/camera
dd bs=1048576 if=/dev/disk4 of=~/camera/flash.dmg conv=noerror,sync

The first command will create a new directory to store the dmg that is created. I just made this up, you can make it whatever you want. Then the second command will actually clone what it can get off the stick. bs = bytes per second (above is 1MB) You will probably want to turn this way down, maybe even 512. This is how much it will try to read at a time, so the larger it is the faster the command will run,but the larger the chunk that has a problem is. If you turn it way down it will take a lot longer but you will probably recover more.


Also since this creates a .dmg, you can open it right up on the Mac.


hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...