Tag: linux

Linux on Sager P8950 / Clevo P950HP6

by on Jun.04, 2017, under hardware, technology

Writing this post in the hopes that someone else wants to run Linux on this laptop, and doesn’t have to go through the same struggle I’ve gone through.

This post is accurate as of 2017-06-04 — I can’t guarantee that I’ll update it in the future.  If more than 6 months has passed, the information here is likely outdated.  Where possible, I’ll try to list sources that should contain up-to-date information.

I’ll try to organize this chronologically with what you’ll need to do to get everything up and running.  Note that this sometimes involves going back and changing things.

All of this is written for Fedora 26, since that’s what I’m using at the moment.  It should basically apply to other distributions, but you may have to tweak some things. That’s left as an exercise to the reader 🙂

First boot stability: dealing with Optimus

This laptop contains nvidia Optimus technology, which allows optionally using an nvidia graphics card for certain applications and powering it down when not necessary to save power (it’s actually unclear to me if this is “really” Optimus, or actually “MSHYBRID graphics”, but they seem interchangeable for our purposes).  Unfortunately, Optimus seems to introduce a lot of weird interactions with ACPI, which can cause instability with how Linux advertises compatibility by default.

So, let’s fix that (otherwise, you’ll get random system crashes).  You’ll need to add acpi_osi=’!Windows 2015′ to your kernel command line for this.  So, edit /etc/default/grub and add that somewhere inside GRUB_CMDLINE_LINUX.  It’ll probably look something like this:

GRUB_CMDLINE_LINUX=" rhgb quiet acpi_osi='!Windows 2015'"

This gets us to a stable system which can turn off the nvidia card (you’re switching using prime).  Unfortunately, we need a newer kernel if you want nouveau to actually work (support for GeForce GTX 1000 series lands in 4.12, Fedora at the moment contains 4.11.3).  I’ve built 4.12 for myself (it’s easy — see Fedora’s instructions, or use Fedora Vanilla Kernels)

Getting Audio working

I’m working on sending this information upstream to get things working even better here — I’ll try to add a link to the bug report / more information when it’s available.

You may now notice that your audio doesn’t work.  The below appears to work with Kernels >= 4.11.  You’ll need at least 4.11 for Realtek ALC1220 support.

The default ALSA model doesn’t seem to work with this laptop, so you’ll need to change that.  I’ve used two models that work: no-primary-hp and dual-codecs.  I’d recommend no-primary-hp, since it seems to work slightly better.

To change your model, create /etc/modprobe.d/alsa.conf with the following:

options snd-hda-intel model=no-primary-hp power_save=1

(Note that I’ve also enabled power saving here, which should also help with battery life)

Reboot and you’ll notice… sound doesn’t quite work yet.  There’s one more quirk here.  By default, the laptop boots with the “headphone” audio control muted.  Unfortunately, this is the control that really sets the volume of the speakers!  So, each boot you’ll need to unmute the headphone volume and turn it up (I’ve been so far too lazy to investigate how to do this automatically).  You can run this command to set everything up properly:

amixer -c 0 sset Headphone 100% unmute

Nvidia Performance: Switch to Proprietary Drivers

NOTE: External monitors will not work in this configuration!  If you need external monitors, you’ll want to skip this step, but you’ll lose some performance on the nvidia GPU.  It’s unfortunate that this trade-off exists at the moment 🙁

Next, switch to the proprietary nvidia driver to get better battery life, since I didn’t have good luck with the open source drivers.  To do this, you’ll want to install Bumblebee.  Since I’m using Fedora, I just followed the instructions on the Fedora wiki:

sudo dnf -y --nogpgcheck install$(rpm -E %fedora)/noarch/bumblebee-release-1.2-1.noarch.rpm
sudo dnf -y --nogpgcheck install$(rpm -E %fedora)/noarch/bumblebee-nonfree-release-1.2-1.noarch.rpm
sudo dnf install bumblebee-nvidia bbswitch-dkms VirtualGL.x86_64 VirtualGL.i686 primus.x86_64 primus.i686 kernel-devel


Reboot and bumblebee should be working.  You can use “primusrun” to run things on the nvidia card.

Fancy Keyboard/Fan Control

Last step is being able to configure the backlight, and fan control (if you want).  For that, you’ll need the clevo-xsm-wmi kernel module.  For simplicity, I have a fork which adds recognition of this laptop.  Pull that down, and compile the kernel module:

git clone
cd clevo-xsm-wmi

This will create a dkms module for the driver so it’ll be automatically re-installed with any kernel updates.  With this, the keyboard backlight keys should work as expected (so you can turn the backlight off if you want, or change brightness).  There’s also a little GUI utility if you want to set custom backlight settings, but I’m not going to get into that for this blog post (I just want the shortcuts to work so I can turn the backlight off or lower 🙂 )

Outstanding Issues

That should basically do it — you should have a laptop with decent battery life, working sound and good graphics (use primusrun to use the nvidia card, or DRI_PRIME=1/GNOME “dedicated” option) under Linux!

Of course, there are still some outstanding issues I’ve been fighting…

  • primusrun seems to cause a crash occasionally.  Recently, I somehow put myself in a sate where I can’t oepn steam without the whole OS crashing
  • primusrun has some trouble with certain Steam games (having trouble with Portal 2 specifically, but haven’t don’t much testing)
  • You’ll need to modify each game in steam for primusrun by modifying it’s parameters to “primusrun %command%”
    • You can experiment with running steam itself under primusrun, but I’ve had trouble with this
    • For open source drivers, launch steam on dedicated graphics card (or change parameters to DRI_PRIME=1 %command% ? — haven’t played around with that)
  • External monitors don’t work with bumblebee
    • It’s my understanding that external monitors can work with bumblebee, but that basically requires keeping the nvidia GPU on all the time. Personally, I’m sticking with the open source drivers, at least for now.  I know Fedora is working on improving the whole situation here, so hopefully things will get better in the future.

Links for up-to-date information

Leave a Comment : more...

Apple Disappoints All

by on Jan.29, 2010, under technology, thoughts

Well, I wasn’t sure I was going to make a blog post about this, but I feel I have to. As I’m sure you’re well aware, Apple announced on Wednesday a new product that they guaranteed would once again revolutionize computing. It was the product people have been waiting for Apple to make, and Apple finally delivered. What is this “magical” product? It’s none other than Apple’s new tablet computer: the iPad.

But… if you’ve seen any of the press about the iPad, you might be confused by what I just wrote. Almost every tech blog I know is bashing the iPad for being an all-around crappy product. Considering myself a technology enthusiast, I can only say this: I agree. Apple had the potential to dip into a market that no one’s really gotten quite right, and create a booming industry for themselves, like they did with the iPod. It seems, however, that they’ve ruined their chance to do that. So, where did Apple go wrong? I’ll start with the obvious and most-touted answer, and I’ll try to work down to some more original points, but pretty much everything’s been covered already. However, if you do really like the iPad, keep reading to the end of the article, and I’ll try to point out what Apple has done right. (continue reading…)

Leave a Comment :, , , , , , more...

Changing Caps Lock to Shift in Linux

by on Jul.20, 2009, under thoughts

After a lot of figuring out how xmodmap works, I’ve finally been able to get my caps lock to work as a shift key, instead a locking key. There are actually two steps to this, the second one being the tricky part. Just create a file called .Xmodmap in your home directory with the following contents:

remove Lock = Caps_Lock
add Shift = Caps_Lock

This removes the lock from caps lock (so it’s a press-and-hold, not a toggle), and makes it a shift key, even though the computer still recognizes it as the caps lock key. If you wanted to get fancier, you could make the computer recognize it as the left shift key with the following:

remove Lock = Caps_Lock
keysym Caps_Lock = Shift_L
add Shift = Shift_L

The tricky part here is realizing that after you tell the computer that Caps Lock is actually left shift, you need to add this key to the “shift” list, even though it’s already there. I don’t quite understand this, but I know that it’s necessary.

Have fun getting rid of that annoying caps lock key!

Leave a Comment :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...