Tagged: laptop Toggle Comment Threads | Keyboard Shortcuts

  • Kartik 9:25 PM on February 6, 2013 Permalink | Reply
    Tags: , , , , laptop, , , , ,   

    Quickly Check Temperature Values of Hardware Components in Ubuntu 

    So, I missed posting yesterday. Hope this doesn’t repeat.

    Today I am sharing a small bash script I wrote to check the temperatures recorded by various sensors in my laptop. Nothing incredibly smart here, just a quick but useful hack.

    I am one of those unhappy Linux users who suffer from lack of driver support for their hardware. Due to some weird kernel bug or messy graphics driver, which led to incredibly high temperatures on my laptop,  I spent about a year using Linux as a VirtualBox guest in Windows; this was before Ubuntu 12.04 got shipped. During those times, my laptop used to shutdown automatically after reaching critical temperatures (100° C!) on simple tasks like watching a HD video on VLC.

    What all do we need? In *buntu systems, install sensors and hddtemp tools. I am using an ATi Radeon card and proprietary driver ships with a utility for reporting temperature for the same. You can modify the script to work with nVidia cards accordingly.

    sudo apt-get install lm-sensors hddtemp

    Next, you need to run sensors-detect to let sensors identify all the hardware monitoring sensors present in your system.

    sudo sensors-detect

    Press enter to accept default options when asked.

    Here is the script; hddtemp requires sudo making this script more than 3 lines:

    I have put this script in my local bin folder for quick access. To do the same, follow the steps:

    mkdir ~/bin

    Put this directory in your path by putting the following line at the end of your .bashrc file (replace k4rtik by your username)

    export PATH=$PATH:/home/k4rtik/bin

    mv temp.sh ~/bin/temp

    chmod +x temp

    Now either logout and login or issue the following command to be able to access the script by just entering temp on your terminal.

    source ~/.bashrc

    Here is a sample run from my machine:

    k4rtik: ~ $ temp
    acpitz-virtual-0
    Adapter: Virtual device
    temp1:        +26.8°C  (crit = +127.0°C)
    temp2:        +70.0°C  (crit = +85.0°C)
    
    coretemp-isa-0000
    Adapter: ISA adapter
    Core 0:       +70.0°C  (high = +84.0°C, crit = +100.0°C)
    Core 1:       +70.0°C  (high = +84.0°C, crit = +100.0°C)
    Core 2:       +70.0°C  (high = +84.0°C, crit = +100.0°C)
    Core 3:       +70.0°C  (high = +84.0°C, crit = +100.0°C)
    
    Default Adapter - ATI Mobility Radeon HD 4670
                      Sensor 0: Temperature - 74.50 C
    
    Do you want to know hard disk temperature (requires sudo)? (y/N) y
    [sudo] password for k4rtik: 
    /dev/sda: ST9500420ASG: 51°C

    PS: Didn’t know earlier – embedding Github gists into WordPress is as easy as copy & pasting the URL. :-)

     
  • Kartik 12:00 AM on June 30, 2011 Permalink | Reply
    Tags: Bluetooth, , Data Communications, , , , , laptop, , Smartphone, , , Wi-Fi, Wireless, Wireless LAN,   

    Use rfkill to Enable/Disable Wireless on your Linux Laptop 

    This notebook computer is connected to a wirel...

    This notebook computer is connected to a wireless access point using a PC card wireless card. (Photo credit: Wikipedia)

    Imagine a situation when you have to book an air/train ticket in a jiffy, or check an important mail quickly and the only option you have is a wi-fi connection from either your smart phone or surroundings, and you have only some Linux variant installed on your system. And even after installing all the necessary drivers, you are unable to get the wi-fi on your laptop working? Frustrating right? If yes, then you might want to read on about this useful utility called rfkill which you can keep in handy for those weary situations.

    I own a Dell Studio XPS 1645 and have always found it cumbersome to get the wi-fi working on my system, mainly during those geek/hacker meetups, the only times I have to use wireless Internet. I remember randomly switching wireless on and off through the hardware switch and rebooting my system multiple times in order to get it working. Well, this was the situation until I discovered rfkill – a tool for enabling and disabling wireless devices including Wireless LAN, Bluetooth, etc. Here follows a tutorial on how to use it (fire up the Terminal before proceeding):

    rfkill’s list command lets you see all the available devices, if you don’t find any of your devices, make sure you have turned the hardware switch ON and have installed the drivers for each. Here is what I get on my system after enabling the hardware switch:

    kartik@PlatiniumLight ~ $ rfkill list
    0: brcmwl-0: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
    1: dell-wifi: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
    2: dell-wwan: Wireless WAN
    Soft blocked: yes
    Hard blocked: yes
    3: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
    kartik@PlatiniumLight ~ $

    Apart from Bluetooth, I usually find all other devices to be in a random state of yes or no. To enable them, issue the unblock command as shown:

    kartik@PlatiniumLight ~ $ rfkill unblock 0
    kartik@PlatiniumLight ~ $ rfkill unblock 1
    kartik@PlatiniumLight ~ $ rfkill unblock 2
    kartik@PlatiniumLight ~ $ rfkill list
    0: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes
    1: dell-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
    2: dell-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
    3: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
    kartik@PlatiniumLight ~ $

    You can also try using the unblock all command for enabling all the devices together:

    kartik@PlatiniumLight ~ $ rfkill unblock all

    Sometimes it happens that even after unblocking once, some device(s) may show up as blocked (see the 0th device above, which shows hard blocked as yes). To correct this just issue the unblock command again for that particular device:

    kartik@PlatiniumLight ~ $ rfkill unblock 0
    kartik@PlatiniumLight ~ $ rfkill list
    0: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
    1: dell-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
    2: dell-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
    3: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
    kartik@PlatiniumLight ~ $

    When you get all the devices unblocked, you will not face any trouble connecting to wi-fi devices around. :-)

    Bonus Tip: If you have a common hardware switch for wireless radios, you can turn off additional devices like Bluetooth (or vice versa) to save some battery life using the block command of rfkill:

    kartik@PlatiniumLight ~ $ rfkill block 3
    kartik@PlatiniumLight ~ $ rfkill list
    0: dell-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
    1: dell-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
    2: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
    3: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no
    kartik@PlatiniumLight ~ $

    Stay Dignified!

    • Kartik

    Originally published at http://www.digimantra.com/linux/rfkill-enabledisable-wireless-linux-laptop/

     
  • Kartik 1:26 AM on June 2, 2011 Permalink | Reply
    Tags: , laptop, ,   

    Sharing Internet Connection from my Laptop to my Android-based Phone 

    I was disheartened to know that my newly bought Samsung Galaxy S i9000 could not connect to an ad-hoc network created from my laptop.

    After a little Googling, I found out the easiest way to turn a laptop into a WiFi Hot Spot (for uses such as sharing Internet connection with my Android phone) – Virtual Router and now I am enjoying fast internet on my phone.

    As I call the above the easiest, it’s not the best method and doesn’t offer much features either. If your needs are not satisfied you can look for Connectify – the inspiration behind Virtual Router.

    I forgot to mention that both of these methods work for windows, I still have to figure out a way to do the same under Linux.

    EDIT (2012-04-28): Okay, it’s been too long, frankly because I was not using Linux much all this while (thanks to my laptop which used to turn into a heater with almost all distros I tried), but finally I found a way to share net from Linux too. I am on Android 2.3.6 XXJW4 on my SGS i9000. The following steps should work well with all versions of gingerbread:

    • Root your Android. Folks at Android Advices usually come out with the easiest possible tutorials for things like this, I followed the steps available here, YMMY.
    • Take a backup of your current /system/bin/wpa_supplicant file using a root-enabled file manager (Root Manager is a good option, though not available for gratis)
    • Download the latest version of AdHoc fix available at this thread at XDA Forums, and transfer it your phone’s sdcard.
    • Either apply the fix using by booting into recovery or just extract wpa_supplicant file from the zip and overwrite it at /system/bin using your favorite root-enabled file manager.
    • Create a new ad hoc network in your linux system, and voilà you will magically find it when your phone scans for wi-fi networks.
     
    • Vivek 1:32 PM on June 2, 2011 Permalink | Reply

      root the phone and adhoc network works!

    • Kartik 7:10 PM on June 2, 2011 Permalink | Reply

      Thanks for comment Vivek. I was suffering from an internet infrastructure breakdown here at home, gonna try it asap now. :)

    • BRG 1:38 PM on July 19, 2011 Permalink | Reply

      I tried both, but when using Connectify, the galaxy s and computer connects but the internet doesn’t work on the phone.
      And when i used Virtual Router, it automatically stops in a while

      Please help

      • Kartik 11:45 AM on July 21, 2011 Permalink | Reply

        What are the versions of windows on your system and android on your phone? I am unable to reproduce your problem.

        By automatic stop do you mean the phone drops the wifi connection or the net simply stops working?

    • Saood 2:25 PM on November 21, 2011 Permalink | Reply

      How you did this. Please tell me the steps you followed.
      Thanks

      • Kartik 5:36 PM on November 21, 2011 Permalink | Reply

        I just installed Virtual Router, shared the ethernet connection. Then on the phone the connection was visible after enabling wi-fi, and voila it connected. :-)

    • Adamya 2:28 PM on December 12, 2011 Permalink | Reply

      afterr clicking on create wifi hotspot connectify is saying that some piece of program is blocking it, but after disabling my firewall and antivirus its showing the same message plese help me to make connectify work on my laptop

      • Kartik 2:51 PM on December 12, 2011 Permalink | Reply

        Sorry, I personally prefer using Virtual Router, and don’t have much experience with Connectify. Please try switching to VR or see the help on Connectify’s website.

    • obet 6:45 PM on July 3, 2012 Permalink | Reply

      not work in android 4.0.4

      • Kartik 12:57 AM on July 5, 2012 Permalink | Reply

        You forgot to mention which method – windows/linux?

        As mentioned within the post, the methods work for Gingerbread. I am yet to try these out with ICS, will update as soon as I get time.

    • Paul Suquet (@PaulSuquet) 12:12 PM on October 1, 2012 Permalink | Reply

      The wpa_supplicant provided does NOT work for JellyBean (galaxy nexus)…

      • Kartik 1:05 PM on October 1, 2012 Permalink | Reply

        Agreed. It doesn’t. Are you aware of any alternative for JB?

  • Kartik 5:17 PM on December 23, 2010 Permalink | Reply
    Tags: , laptop,   

    Replaced my Studio XPS screen and palm rest 

    Got my laptop screen and palm rest, touch pad replaced :) But all my stickers – Drupal, Hacker Logo, Python, Firefox, Core i7, Windows 7 – and RMS’ signature are gone :(

    dell-studio-xps-screen

    Dell Studio XPS Screen

    dell-studio-xps-palm-rest

    Dell Studio XPS Palm Rest Old

    dell-studio-xps-palm-rest-new

    Dell Studio XPS Palm Rest New

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel
Follow

Get every new post delivered to your Inbox.

Join 2,050 other followers