HUGE Laptop & Linux

booman

Grand High Exalted Mystic Emperor of Linux Gaming
Staff member
I just picked up a new HUGE laptop:
Dell XPS m2010 Laptop

specs
  • TYPE Desktop replacement
  • SCREEN SIZE 20 inches
  • SCREEN RESOLUTION 1920 x 1600
  • CPU FAMILY Core2 Duo
  • PROCESSOR SPEED 2.16 GHz
  • SYSTEM RAM 4 GB
  • VIDEO Radeon X1800 512RAM (dedicated card)
  • MAXIMUM BATTERY LIFE Up to 4 hours
  • DIMENSIONS 2.89 x 18.5 x 15.97 in
  • WEIGHT 18.1 lb
  • SCREEN 21 inch LCD Monitor
  • Bluetooth Keyboard
  • Folds up into a suitcase
XPS_Laptop.jpg


I decided to install Ubuntu 14.04 because my family will be using it.
Everything installed fine as expected, but a few items are not working so far
  • Speakers - No Sound
  • Keyboard - No Input
  • Video Drivers - Not available in Driver Manager
After much research, there is a fix for the sound:
Code:
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_data 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_dir 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_mask 5
But this only works until the system is restarted, then I have to run the code again.
How can I make this code run at startup in Ubuntu?

I have downloaded AMD's legacy drivers for this card, but hesitate to install them.
I found this tutorial: http://www.ubuntulinuxguide.com/install-ubuntu-ati-drivers-fglrx/
But I have a history of screwing things up with video drivers in Linux. Specifically Fedora.

The keyboard still doesn't work as its bluetooth. I checked the bluetooth in Settings and it shows nothing available. I can't find anything online about it either.
The keyboard is awesome! Very sturdy, full number pad and has its own proprietary battery that charges from the computer. So no AA's to purchase.
I've never messed with Bluetooth in Linux or even Windows.
 
That's a HUGE laptop, more like a portable desktop.

I have zero experience with AMD gpu's, but from what I have heard you are better off with the open source drivers, especially if the alternative is older AMD proprietary drivers. Unless you need good performance for games, I would definitely stick with the open source drivers and avoid potential headaches. The open source driver is probably already installed, but to make sure you can run:

Code:
lspci -k

And then look for the gpu, and check what kernel driver is in use.

When it comes to the sound issue, you will need to create a startup service with Ubuntu's init system. Personally, I only have experience in doing this with systemd, so I am not sure how to do it on Ubuntu. Some googling led to the information that Ubuntu 14.04 is using Upstart as init system. If you'd like, I could look into it tomorrow as I'll be busy most of today. I have already found the documentation so I can give it a read tomorrow and write a startup service that would make sure your speakers work every time you boot your system.

However, you can already make a simple script (which you would need anyway for the startup service) that will run the commands for you, you would just need to run the script as root. Create an empty file, call it sound_fix.sh or something like that, then put this inside the file:

Code:
#!/bin/sh
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_data 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_dir 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_mask 5

Make the file executable:

Code:
chmod +x sound_fix.sh

Then simply run it as root:

Code:
sudo ./sound_fix.sh

Did you check to make sure that there is no on/off switch on the keyboard? The only information I could find on this laptop mentions that the bluetooth keyboard works out-of-the-box, so others have had it working with not configuration required. If not, then we'd need to look into if the bluetooth module is loaded on your system.

My experience with bluetooth on Linux has been problem free, been using Wii controllers myself with the Dolphin emulator (Gamecube and Wii emulator) with no issues, so it should not be too problematic to get it set up.
 
Thanks for looking into this Daerandin!
Here is the lspci -k output:
Code:
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] R520/M58 [Mobility Radeon X1800]
    Subsystem: Dell Device 200a
    Kernel driver in use: radeon

I'm creating the sound script right now.

The real problem is that this is a family computer that my wife-n-kids will be using during the day. Obviously they are not Linux experts, so I want things to work for them without having a lot of frustration.
Since this systems is so old, there is a list of things not working:
  • Sound
  • video drivers
  • keyboard
  • Spotify Web Player
These are pretty significant things and I have been researching them since Thursday without much success.
I'll be patient though, because I know almost all things can work with Linux, even if it requires a bit of frustration and stubbornness.

Video Drivers
I really really really want to play games on this laptop...
Of course!
I don't mind trying to manually install fglrx drivers on it and will probably try this morning.
But I do worry, because I've posted all over the internet that AMD drivers aren't the best for gaming.
From what I have read, the X1800 is still supported.
So what should I do?

Bluetooth Keyboard
From what I have read about this specific keyboard is that there is a problem with "Pairing"
I've never used bluetooth for anything in the past, so all of this is new to me.
Some have posted that you need to "unpair" the keyboard in Windows first, then it will "Pair" in Linux, but I'm not going to try that just yet.

This is a sandbox experience for me, so I'm going to have fun working on this project.
I was even thinking of putting Mint 17.2 on it to see if anything is improved.
 
I would think that you could set those startup variables directly from ~/.xinitrc as well, without an extra .sh file.
 
Last edited:
That would work well as long as the system only have one user, otherwise you would need to set it up in everyone's .xinitrc and also remember to do it for any new user accounts. I always prefer to set such things up through a startup service in the init system. But as this is booman's computer it's his call.

I agree that if there will be just a single user, it is definitely easier to just put this in that user's .xinitrc
 
I've been doing a bit of reading, and from what I can see, Upstart can't be configured to run services on wakeup from suspend. However, there is another way ensure your sound is working after suspend, we simply put a shell script inside /etc/pm/sleep.d/ with the correct syntax to ensure it only runs on wakeup. I have not done this before, but I'll make a little test script for myself just to test. If that works that we can ensure sound still works after suspend on your new computer.
 
Daerandin helped me with several problems on this HuGE laptop.
Below are the step-by-step instructions.
Explanation of each step

Sound Solution

Sound at Startup

Open Terminal

Type:
Code:
sudo touch sound_fix.sh
Type
Code:
sudo nano sound_fix.sh
Type:
Code:
#!/bin/sh
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_data 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_dir 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_mask 5

Save with Ctrl+X
Type Y
Press Enter

Move to root directory
Type:
Code:
sudo mv /path/to/file/sound_fix.sh /root/sound_fix.sh

To verify its in the root folder
Type:
Code:
sudo ls /root

Change Ownership
Type:
Code:
sudo chown root:root /root/sound_fix.sh

Run Script on Boot
Create Configuration File

Type:
Code:
sudo touch /etc/init/sound_fix.conf

Type:
Code:
sudo nano /etc/init/sound_fix.conf

Type:
Code:
description "Startup service to fix the sound issues on Dell XPS M2010"

start on filesystem and net-device-up
stop on runlevel [!2345]

exec /root/sound_fix.sh
Save with Ctrl+X
Type Y
Press Enter

Code:
sudo initctl reload-configuration

Code:
sudo shutdown -r now

Sound at Sleep

Type:
Code:
cd /etc/pm/sleep.d
Type:
Code:
sudo touch 40soundfix
Type:
Code:
sudo nano 40soundfix

Type:
Code:
#!/bin/sh

case "$1" in
resume|thaw)
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_data 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_dir 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_mask 5
esac
Save with Ctrl+X
Type Y
Press Enter

Type:
Code:
sudo chmod +x 40soundfix
 
Last edited:
Huge Dell XPS m2010 Ubuntu Laptop is running Great!
The fans work now, not sure why or how, but I did some maintenance on it:
  • Removed video card
  • Added new thermal paste
  • Re-seated video card
  • Removed CPU heatsink
  • Added new thermal paste
I tried that i8k monitor to adjust my fan speeds, but no matter what setting I used, the fans would spin erratically. So that wasn't any help at all. Once I removed i8k the fans spin just fine.
I was hoping to run them on HIGH all the time because its a pretty hot laptop.

I decided to stick with Open Source video drivers per Daerandin's advice
Ironically, they ARE pretty decent for the Radeon X1800 card.
I am able to play Unity 3D games and even Spiral Knights

Bluetooth and webcam still do not work. Sad because the keyboard is really cool and snaps right into the monitor when closed.

I'm thinking of tearing out the keys and modding a USB keyboard into it, unfortunately this will be permanent.
 
Back from vacation, I just wanted to clarify these steps with an explanation at what is being done. There is a chance someone else with the same laptop want to get things working and comes across this topic, and I just want to make sure that anyone reading this knows what they are doing. Nobody should blindly follow commands they find online.

Daerandin helped me with several problems on this HuGE laptop.
Below are the step-by-step instructions:

Sound Solution

Sound at Startup

Open Terminal

Type:
Code:
sudo touch sound_fix.sh
Type
Code:
sudo nano sound_fix.sh
Type:
Code:
#!/bin/sh
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_data 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_dir 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_mask 5

Save with Ctrl+X
Type Y
Press Enter

I added in the #!/bin/sh that you forgot for this script. A script should always specify what interpreter is uses.

This just creates a simple script that can be run to fix the sound issue (instead of typing the commands manually.

Move to root directory
Type:
Code:
sudo mv /path/to/file/sound_fix.sh /root/sound_fix.sh

To verify its in the root folder
Type:
Code:
sudo ls /root

Moving it to the root directory is very important since this script will be run as root every time the computer boots. If the script was available for anyone to edit, then it can effectively gives root access to anyone. This is also why the following commands make root the owner of the script.

Change Ownership
Type:
Code:
sudo chown root:root /root/sound_fix.sh

The next section runs the script every time the computer boots. Note that this only works with distros that use the Upstart init system. The newest Ubuntu version uses systemd, so the following section does not apply to newer versions. I suspect the newest Linux Mint also uses systemd.

However, this is the correct way to do it for Ubuntu 14.04

Run Script on Boot
Create Configuration File

Type:
Code:
sudo touch /etc/init/sound_fix.conf

Type:
Code:
sudo nano /etc/init/sound_fix.conf

Type:
Code:
description "Startup service to fix the sound issues on Dell XPS M2010"

start on filesystem and net-device-up
stop on runlevel [!2345]

exec /root/sound_fix.sh
Save with Ctrl+X
Type Y
Press Enter

Code:
sudo initctl reload-configuration

Code:
sudo shutdown -r now

This last part simply creates a script that runs every time the system wakes up from sleep, by placing the script within the /etc/pm/sleep.d directory. Scripts there are run upon sleep and resume actions as long as the syntax is correct.

Sound at Sleep

Type:
Code:
cd /etc/pm/sleep.d
Type:
Code:
sudo touch 40soundfix
Type:
Code:
sudo nano 40soundfix

Type:
Code:
#!/bin/sh

case "$1" in
resume|thaw)
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_data 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_dir 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_mask 5
esac
Save with Ctrl+X
Type Y
Press Enter

Type:
Code:
sudo chmod +x 40soundfix
 
Thank you for the explanations Daerandin
I added a link to your post in my post
 
WTF is that thing? WTF GPU is in it? Everywhere boasts it's gaming performance but I can't find ANY info on it past the marketing specifications.
 
Isn't it cool! I love it!
Huge screen for a laptop-ish desktop
It has a Radeon x1800
Nothing special, but the opensource drivers work pretty well.
The problem is heat!
That thing gets really HOT
 
I recently decided to revive this huge laptop because I wasn't using it much.
So I installed Mint 18.1 64-bit and of course... it has the same issues.

I was able to create the sound_fix.sh script and running it fixes the audio, but I had to install alsa-tools first. Now that works but when I run
Code:
sudo initctl reload-configuration
I get this error:
Code:
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

I'm pretty sure Mint is using systemd, so hopefully someone where has an idea how to reload the configuration so the script will run at boot.
 
Not that hard - just create a systemd service file:

The executable: just as you had before

Code:
sudo touch /usr/bin/sound_fix.sh
sudo nano /usr/bin/sound_fix.sh
(Note, I don't agree that suid root scripts must always be in /root, as diligent setting of permissions achieves the same thing)

Contents of sound_fix.sh
Code:
#!/bin/sh
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_data 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_dir 5
hda-verb /dev/snd/hwC0D0 0x1 set_gpio_mask 5

So far so similar.

Set permissions
Code:
sudo chown root /usr/bin/sound_fix.sh
sudo chgrp root /usr/bin/sound_fix.sh
sudo chmod 544 /usr/bin/sound_fix.sh

Create the systemd service file:
Code:
 sudo touch /etc/systemd/system/sound_fix.service
sudo nano -w /etc/systemd/system/sound_fix.service

Contents of sound_fix.service - note, no need for any shebangs:
Code:
[Unit]
Description=Fix Sound on Huge-ass Laptop
After=sound.target

[Service]
Type=oneshot
ExecStart=/usr/bin/sound_fix.sh

[Install]
WantedBy=multi-user.target

Fix permissions again - change its user and group to root, and set permissions of sound_fix.service to 644.

Start your script (it will start immediately, and every time you reboot):
Code:
systemctl enable sound_fix.service

You can also play with adding After= targets under the [Unit] heading to have systemd manage running this script after suspend/hibernate as well, which avoids your having to repeat the same script in multiple locations. Search engines are your friend on that one, though :p
 
Last edited:
Katain, you ROCK!
I will give this a try tonight and will confirm that it worked
 
Katain, it totally worked!
Thank you very much. Now I have sound on my Huge Laptop and can watch movies with my wife-n-kids in the bedroom.
 
Back
Top