My development environment Ubuntu14.04

I use Ubuntu 14.04 usb boot. When I installed CUDA7.0, the black screen appeared. But, I can enter the console mode.

so, I tried to edit the /etc/X11/xorg.conf. but, could not be edited in readonly.

I tried it with "sudo", "su", "su - " by vim. The results of "ls" , it is shown below.

#ls -ls

-rw-r--r-- root root

I can't understand that this file can't be edited by the root authority.

#lsof |grep xorg.conf

there is nothing.

and I tried with recovery mode, It was the same situation. Please advice somebody.

  • You need to create a xorg.conf manually, see my answer below! Jun 10, 2015 at 4:39

4 Answers 4


The xorg.conf does not exist by default any more. You CAN create one though.

Boot into recovery mode and select Root Shell. Then run:

X -configure


cp /root/xorg.conf.new /etc/X11/xorg.conf

Reboot and you can edit the new Xorg.conf.

You don't even need to reboot, just do sudo /etc/init.d/gdm restart

  • If you see any error running X -configure, just ignore it! Jun 10, 2015 at 4:15
  • Thanks. but I couldn't execute this code "#cp /root/xorg.conf.new /etc/X11/xorg.conf". → permission denied.
    – kuu
    Jun 10, 2015 at 4:59
  • Don't thank me! ;-) If you like my answer, just click the little grey ☑ under the "0" now turning it into beautiful green. If you do not like my answer, click on the little grey down-arrow below the 0, and if you really like my answer, click on the little grey checkmark and the little up-arrow... If you have any further questions, go to askubuntu.com/questions/ask Jun 10, 2015 at 5:02

This is only a thought, but it sounds like your hard drive might be mounted in Read Only mode. From a terminal window, type in mount and check for what / is mounted as.

root@terrance-Compaq:/etc/X11# mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)

after the type you should see the (rw,errors=remount-ro), if not, remount the root partition as Read / Write by typing in the following at the terminal window:

sudo mount -o remount,rw /

then try to modify your /etc/X11/xorg.conf.

NOTE: Recovery mode is always mounted Read Only. Before making any modifications in Recovery Mode, type in:

mount -o remount,rw /

  • I tried" mount | grep errors" and found "/dev/sdb2 on / type ext4 (rw,errors=remount-ro)". but I tried "sudo mount -o remount, rw /" same thing...
    – kuu
    Jun 10, 2015 at 5:30
  • @Hiwasawa that shows that your drive is mounted in Read / Write mode, and using sudo, you should be able to modify the files. Have you tried checking your drive for errors? Reboot to Recovery Mode and choose fsck from the menu, and check your drives for errors.
    – Terrance
    Jun 10, 2015 at 12:44

When you boot in recovery mode or Black Screen as you said, your entire root partition is mounted as read-only. To remount it as read-write use the following command.

mount -o rw,remount /

After this command, you can edit your conf file.


You don't need to write sudo as you are already logged in as root.


Assuming that these commands give you read only access

sudo nano /etc/X11/xorg.conf
sudo vi /et/X11/xorg.conf

And that you can't become root with


I'm wondering whether it is possible to

sudo mv xorg.conf xorg-old.conf
sudo touch xorg.conf
xclip -sel clip xorg-old.conf # copy file to clipboard
sudo vi xorg.conf # paste xorg-old.conf into the file and try to edit

Otherwise you might be able to change the permissions of the file

sudo chmod 744 /etc/X11/xorg.conf
  • sudo chmod 755 /etc/X11/xorg.conf should be done in very rare cases, please add that permissions should be changed back to 744 after doing that! Then I'll remove my -1! Welcome to ASKUbuntu anyways ! Jun 10, 2015 at 4:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.