Sunday, January 26, 2014

The weirdest dual boot problem ever ! booting to Ubuntu causes audio problem on Windows!

For the past few months I have been cursing myself for installing windows 8.1 (don't judge me, I had to install it to try out the new Visual Studio which apparently works only with windows 8)

I had lots of driver issues with windows 8, pretty much everything stopped working, wifi, Audio,keyboard (yes I had to use virtual keyboard to do anything) which is ... not surprising for me, that's pretty much what we expect from a windows but one problem surprised me the most !!!

The Audio jack for headphone on my realtek audio card would stop working randomly, and I kept doing what Microsoft support and Toshiba support said, (same old things we have been doing since windows 95, going to device manager and uninstalling the driver and installing it again, and if didn't work go to safe mode and do same thing)

None of those solutions solved my problem, till today I found out the reason !!! I noticed anytime I boot to Ubuntu and then restart to windows 8, the audio doesn't work,which is REALLY weird, cause they are the two different partitions, how could they possibility cause error on each other ?

The solution to my problem was pretty primitive too, I had to unplug my computer from the power for 1 minute and then restart back to windows 8.1 to have any audio,  I am still trying to figure out what is exactly going on with this weird problem, but my guesses are, the Audiocard has some flags on it which can be set, and it wont be cleared unless you shut down the computer and unplug it from the power !

Saturday, January 18, 2014

Easy way to find the path of VIMRC in Windows, Mac and Linux

Vim is favorite code editor for many, and vimrc is the config file for vim, I earlier posted about modifying vimrc to highlight syntaxs and show line numbers and auto indent for python and other languages,

if you are using linux you can always find your .vimrc file in the home folder (~) but what about in windows, command line or mac os ? it becomes more confusing when some windows filesystems dont like dot and you have to change it to _

Here is the solution, ask Vim itself where is the path, simply inside vim type :
:e $MYVIMRC

if you are using graphical vim
:e $MYVIMRC

Saturday, January 4, 2014

Adding undetected resolutions to ubuntu 13.10 (& Gnome 3.10) usind xrandr

Old days of editing xorg.conf is over, nowadays you gotta use xrandr, and cvt to add new resolutions to your undetected monitor like mine,which is an old Del 2001FP monitor.  for full details ubuntu wiki
but here are the setps I did to get most quality out of my monitor.

1-first step is to figure out the supported resolution on your monitor, I found out by pressing menu button on my Dell Monitor Panel, where it says,
optimum resolution : 1600x1200 60Hz
you can alternatively login to windows or other and see the supported resolutions

2-Next step is to calculate the Coordinated Video Timing, it old times you had to go through forums and ask for nice geeks people to do it for you, now there is an app for it.

Enter in terminal (ofcourse change the numbers to the resolutions in step 1, if you don't have a frequency choose 60 which works most of the times):
cvt 1600 1200 60
3- in previous step it gave you an output like this:
# 1600x1200 59.87 Hz (CVT 1.92M3) hsync: 74.54 kHz; pclk: 161.00 MHz
Modeline "1600x1200_60.00"  161.00  1600 1712 1880 2160  1200 1203 1207 1245 -hsync +vsync
copy the part after Modeline (the part I marked in red) and put it after xrandr--newmode
so it would look like something like this:
xrandr --newmode "1600x1200_60.00"  161.00  1600 1712 1880 2160  1200 1203 1207 1245 -hsync +vsync


4- in step four, pick the monitor name you wanna add the resolution too, in case you have two monitors, you can figure out the name of your monitor using
sudo xrandr -q
the output will be like
VGA1 connected primary 1600x1200+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
....
...
..
in my case VGA1 is the name of my monitor, so I need to add the created resolution mode to it,
so I run this command replace the red part with your own mode name (generated in step 3)
sudo xrandr --addmode VGA1 1600x1200_60.00

5- Finally to make it active, enter the following (again replace the red with your own mode name)

 xrandr --output VGA1 --mode 1600x1200_60.00
6- To make it permanent add the commands above to ~./xprofile file so it will be run everytime X session starts.
here is how my ~/.xprofile  file looks like:
xrandr --newmode "1600x1200_60.00"  161.00  1600 1712 1880 2160  1200 1203 1207 1245 -hsync +vsync
xrandr --addmode VGA1 1600x1200_60.00
xrandr --output VGA1 --mode 1600x1200_60.00
For full details read here :
https://wiki.ubuntu.com/X/Config/Resolution/#Adding_undetected_resolutions

Related

Labels

computer (48) ubuntu (46) linux (28) tutorial (20) opinion (17) programming (14) software overview (13) terminal (12) troubleshooting (8) life (7) literature (7) poem (7) human languages (6) vim (6) bash (5) google (5) python (5) android (4) cars (4) phpBB (4) suggestion (4) tips (4) 12.04 (3) Chef (3) extension and addons (3) firefox (3) java (3) personal (3) russian (3) shell (3) windows (3) 64bit (2) Calligraphy (2) Chicago (2) Vagrant (2) apple (2) backup (2) bug (2) code (2) eclipse (2) funny (2) google chrome (2) idea (2) monitor (2) php (2) phpBB3 (2) shorter prompt (2) ssh (2) virtualbox (2) $_SERVER['REQUEST_URI'] (1) 2.7 (1) ALT+Backspace (1) AVR (1) Alt-Printscreen-K (1) AutoRotate (1) CTRL+ALT+DELETE (1) DRM (1) Debugging (1) Gimp (1) Gimp 2.8 (1) Microcontroler (1) Restart X (1) UML (1) Ventra (1) adsense (1) amazon (1) audio (1) aws (1) background process (1) battery (1) bing (1) blank (1) blogging (1) bmw (1) boot (1) business review (1) car (1) cd (1) chrome (1) comcast (1) computer kubuntu (1) conference (1) cookie (1) cron (1) database (1) date (1) display (1) domain name (1) download manager (1) dual boot (1) dual monitor (1) extensions (1) feature request (1) file (1) folder (1) freeze (1) gimp single window (1) git (1) gnome 3.10 (1) google docs (1) google plust (1) google+ (1) grep (1) icon (1) install (1) iterator (1) links (1) linu (1) linux links (1) list (1) mac os (1) media server (1) microsoft (1) moonlight (1) music (1) mysql (1) name (1) nautilus (1) netflix (1) notepad++ (1) parking (1) permission (1) philosophy (1) photo (1) prompt (1) protest (1) ps3mediaserver (1) putty (1) read from file (1) realtek (1) resolution (1) roku (1) samsung (1) scala (1) screenshot (1) security (1) selinux (1) server (1) skype (1) space (1) spam (1) spambot (1) sql (1) suspension (1) system monitor (1) tar (1) task manager (1) template design (1) th23 domain (1) thinking (1) ubuntu 13.10 (1) unity (1) vimrc (1) virtual machine (1) weblogic (1) wget (1) with space (1) xorg (1) xrand (1)