Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Sunday, April 11, 2021

Turning keyboard light on Ubuntu after sleep

 

One of the things that I like on the Mac I use for work is that everything seems to be well integrated, however the keyboard is pretty bad though in my opinion, at least on the model that I use. Nevertheless, the back-light feature seems to be working really nice and I wanted to model this partially on the Ubuntu. One of the things that was missing on my Ubuntu laptop is that if I turn off my keyboard back-light, it stays off even if I resume working after dark or if it was on during the night and I resume it during the day, it stays on and consumes a lot of battery. It kind of seemed a shortfall on Ubuntu side, so I decided to write a little program to start and check if I needed a back-light after sleep or not. This is based on my settings for the night mode and hours entered in the setting. The idea is that the laptop comes from the sleep and if it is in the night hours, it will automatically light my keyboard, or otherwise shut off my back-light during the day. This is only after sleep mode and it gives nice feeling to start the work. Script was placed in 

/usr/lib/systemd/system-sleep/

Since it runs under root user, you will need to replace <USER> to put in your user where night mode is configured.


Tuesday, November 18, 2014

ThinkPad t440s + Ubuntu

Several weeks ago I have purchased a ThinkPad t440s as I needed a new laptop for development. I was looking at several options including Carbon X1 and MacBook Pro. Having been using Ubuntu for quite some time I decided that I do not want to go with Mac. I also recently switched from iPhone to Nexus 5 so it did not seem like a good choice to me. And it was expensive. Between X1 and t440s, after some research, I found that t440s will suit my needs much better. I also use Lenovo at my work, but unlike that one (W520) which looks and feels like a big brick, t440s is a really elegant laptop. I was worried a bit that there might be some incompatibility with Ubuntu based on some reviews, but this was not the case. The main issue everyone was complaining about was the new touchpad. It supports multi gesture and it has entire area clickable. Ubuntu works almost perfectly with it (few glitches here and there but nothing major). In fact, after switching back to traditional one, it seems very unnatural to use the old one. You can do almost everything with one hand easily with the new touchpad.

I also upgraded my t440s with SSD hard drive and additional 8GB memory and added better wireless network card, but other than that, it was good to go. I opted to go with lower resolution monitor because I just like bigger letters on my screen as some of the applications do not scale well on high resolution monitors. Default Ubuntu installation took some time to organise to my liking, but after that it was just fantastic! Right now, startup time is ~10sec and sleep and hibernate work great! Two batteries last forever (6-7 hours) and they are very light. I also found this cool wallpaper to use from http://wallpaperswide.com/.


Cheers!

Note: Now after 2 years of usage, I can say that everything stands for this laptop that I wrote except for the battery. Unfortunately, its capacity is down to 50% for both batteries and barely last 2.5 hrs.