Announcement

Collapse
No announcement yet.

Kubuntu starts up with two screens but I only have one

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    No luck:

    Code:
    feathers-mcgraw@62-West-Wallaby-Street:~$ echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
    bash: /sys/kernel/debug/vgaswitcheroo/switch: Permission denied
    feathers-mcgraw@62-West-Wallaby-Street:~$ sudo echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
    bash: /sys/kernel/debug/vgaswitcheroo/switch: Permission denied
    samhobbs.co.uk

    Comment


      #17
      What's the permissions of the file?

      ls -l /sys/kernel/debug/vgaswitcheroo/switch

      Please Read Me

      Comment


        #18
        Code:
        feathers-mcgraw@62-West-Wallaby-Street:~$ sudo ls -l /sys/kernel/debug/vgaswitcheroo/switch
        [sudo] password for feathers-mcgraw: 
        -rw-r--r-- 1 root root 0 Sep  4  2013 /sys/kernel/debug/vgaswitcheroo/switch
        I don't understand, when you use sudo don't you temporarily become root? Root has write access so I don't understand why the original command didn't work

        Also, I needed to use sudo to even list the permissions, which is strange - everyone has read access, isn't that what would be needed to read the file information?

        Code:
        feathers-mcgraw@62-West-Wallaby-Street:~$ ls -l /sys/kernel/debug/vgaswitcheroo/switch
        ls: cannot access /sys/kernel/debug/vgaswitcheroo/switch: Permission denied
        Feathers
        samhobbs.co.uk

        Comment


          #19
          Many system files/directories are 'denied' to the non-root user, even if you are only attempting to list them. This is normal.
          Using Kubuntu Linux since March 23, 2007
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #20
            Originally posted by Snowhog View Post
            Many system files/directories are 'denied' to the non-root user, even if you are only attempting to list them. This is normal.
            So if I can't do it with sudo, will I have to enable the root user?
            samhobbs.co.uk

            Comment


              #21
              Originally posted by Feathers McGraw View Post
              So if I can't do it with sudo, will I have to enable the root user?
              I don't understand, when you use sudo don't you temporarily become root? Root has write access so I don't understand why the original command didn't work
              I'm confused. When you used sudo, the desired result was obtained:
              Code:
              feathers-mcgraw@62-West-Wallaby-Street:~$ sudo ls -l /sys/kernel/debug/vgaswitcheroo/switch[sudo] password for feathers-mcgraw: 
              -rw-r--r-- 1 root root 0 Sep  4  2013 /sys/kernel/debug/vgaswitcheroo/switch
              Using Kubuntu Linux since March 23, 2007
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #22
                Sorry for being confusing.

                I didn't understand why I

                a) couldn't list the files without sudo (which you've now explained)

                b) couldn't run the command below even with sudo:

                Code:
                sudo echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
                Feathers
                samhobbs.co.uk

                Comment


                  #23
                  @snowhog: This issue was earlier in the thread - denied amending the file in question using sudo.

                  @feathers: Maybe you don't have execute access to the folder. This has the effect of making the files not listable. You might try

                  sudo -i

                  to open a su terminal session and try again. Or we can go back to the xrandr idea...

                  Please Read Me

                  Comment


                    #24
                    Code:
                    feathers-mcgraw@62-West-Wallaby-Street:~$ sudo -i
                    [sudo] password for feathers-mcgraw: 
                    root@62-West-Wallaby-Street:~# echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
                    root@62-West-Wallaby-Street:~# cat /sys/kernel/debug/vgaswitcheroo/switch
                    0:IGD:+:Pwr:0000:01:05.0
                    1:DIS: :Off:0000:02:00.0
                    2:DIS-Audio: :Off:0000:02:00.1
                    root@62-West-Wallaby-Street:~#
                    I guess it worked! Thanks!

                    That "sudo -i" trick is awesome too.

                    Has this turned the card off permanently, or will I have to do something so that it happens every time I log in?

                    Feathers
                    samhobbs.co.uk

                    Comment


                      #25
                      You should be able to put the command into /etc/rc.local and it will be executed at every boot. I assume the results are the LVDS-1 screen is not on after log in?

                      I noticed that the command turned off your discrete audio too. Any negative impact from that? If you have an HDMI output, it might just be that output and not the internal speakers.

                      Please Read Me

                      Comment


                        #26
                        Click image for larger version

Name:	System_settings1.png
Views:	1
Size:	42.5 KB
ID:	640447



                        That worked perfectly! I still get sound through the speakers too.

                        You, sir, are a genius.

                        Not only did you solve the initial problem, you actually solved an even bigger problem I had been having before (the overheating). The only solution I had found in the past was to use the proprietary driver, which I was reluctant to do. Now my laptop's temperature is down by a massive 25 degrees C!

                        I did get a small shock initially when I logged in, because the panel from the LVDS-1 screen had moved over on top of the current one. Once I had deleted that, everything was back to normal.

                        Thank you so much!
                        samhobbs.co.uk

                        Comment


                          #27
                          Genius? Not exactly! but thank you for the credit. I'll take "lucky" at this point

                          I suspected the overheating was from running both video cards at once. I'd bet your battery life will drastically improve also.

                          Please Read Me

                          Comment


                            #28
                            Yeah I bet! Must have taken a fair bit of power to heat the laptop up that much. It's incredible how much difference it has made... I think the gpu is underneath the left palm rest, it was making it unbearably hot before. Now it's comfy

                            So glad that this isn't just a problem with the open source driver being really inefficient as I had previously thought. I think fglrx automatically turned off the card not in use.

                            Thanks again

                            Feathers
                            samhobbs.co.uk

                            Comment


                              #29
                              Originally posted by Feathers McGraw View Post
                              I didn't understand why I...
                              b) couldn't run the command below even with sudo:
                              Code:
                              sudo echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
                              When you direct a command's output with ">", it's your shell that opens the file, not the command, and so as you, and it failed before sudo was attempted. A workaround seen often in KFN is
                              Code:
                              echo OFF | sudo tee -a /sys/whatever
                              though I like
                              Code:
                              sudo sh -c "echo OFF > /sys/whatever"
                              sudo -i is ok and simple but bypasses what sudo is for.

                              Regards, John Little
                              Regards, John Little

                              Comment


                                #30
                                Thanks for that explanation John!

                                Never heard of the "tee" command before either.

                                Love learning little tricks like that

                                Feathers
                                samhobbs.co.uk

                                Comment

                                Working...
                                X