Notebook screen & external monitor problem

Please post all general support questions for LXDE here.
Locked
Alexandr Ushakov
Posts: 9
Joined: Sat Oct 26, 2013 11:34 am

Notebook screen & external monitor problem

Post by Alexandr Ushakov »

Hello.

I use Lubuntu 13.10 64 bit on acer 7750zg notebook model, only intel graphics in use.

When Lubuntu starts, I couldnt expand app to work in full screen mod.
http://iceimg.com/ERdDIY_4/rabochij-sto ... vanija-001

OK, after every boot I launch LXRandR 0.1.2 and deactivate checkbox and press apply. "Save" button dont work.
http://iceimg.com/Vrq6NJRT/displeja-002.png

And now I can work with expanded to fullscreen apps.
http://iceimg.com/UFM9x-Bm/rabochij-sto ... vanija-003

Can somebody help to solve this problem?
Alexandr Ushakov
Posts: 9
Joined: Sat Oct 26, 2013 11:34 am

Re: Notebook screen & external monitor problem

Post by Alexandr Ushakov »

Developers, please, help me to fix this problem.
I hope in next Lubuntu release it will be fixed.
Rex Bouwense
Posts: 1093
Joined: Sat Aug 27, 2011 5:44 pm
Location: Sierra Vista, Arizona USA
Contact:

Re: Notebook screen & external monitor problem

Post by Rex Bouwense »

Welcome to the LXDE forum. Unfortunately, the developers seldom visit this site so if you have a request you should see the second sticky announcement.

For PCManFM, post here:
http://sourceforge.net/tracker/?group_id=156956

For other parts of LXDE, post here:
http://sourceforge.net/tracker/?group_id=180858
Rex
infectedorganism
Posts: 3
Joined: Tue Oct 29, 2013 2:42 am

Re: Notebook screen & external monitor problem

Post by infectedorganism »

I'm sure there are a few ways to solve this problem, but here is the method I am currently using. Essentially, you will be creating a script and editing your lightdm.conf file.

First, read this page: http://pycage.blogspot.com/2008/03/lapt ... dr-to.html

With my setup, the output of

Code: Select all

xrandr -q
showed my laptop screen as LVSD1. Here is the script, edited from the page above to correspond to my laptop screen, LVDS1.

Code: Select all

#!/bin/bash

xrandr -q | grep "^VGA.* connected" >/dev/null
RC=$?
if [ $RC = 0 ]; then
  xrandr --output LVDS1 --off
fi
What I believe the code above is doing is checking whether or not your VGA external monitor is connected. If so, it will shut off your laptop screen and direct the output to your external monitor. If the external monitor isn't connected, the output will show on your laptop screen.

So, open your text editor, copy and paste that code into it -- changing the line

Code: Select all

xrandr --output LVDS1 --off
to correspond to your laptop screen (yours may be LVDS0, LVDS1 etc.)

Save the file as monitors.sh (or whatever you want). Place the file somewhere in your home directory (mine is in ~/scripts). Next, open your terminal and cd into the directory where you placed your script and fix the permissions of the file:

Code: Select all

chmod +x monitors.sh
While stil in your terminal, enter:

Code: Select all

sudo cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.old
Next, you will need to open lightdm.conf as root with your text editor:

Code: Select all

gksu leafpad /etc/lightdm/lightdm.conf
With lightdm.conf opened as root, enter this line somewhere under [SeatDefaults]:

Code: Select all

display-setup-script=/home/name/scripts/monitors.sh
What that line does is tells lightdm to exectue that script BEFORE the login screen appears. So, before your login screen appears, your laptop screen will shut off, the signal will be output to your external monitor, and the login screen will appear fullscreen on your external monitor.

For reference, here is my lightdm.conf:

Code: Select all

[SeatDefaults]
greeter-session=lightdm-gtk-greeter
user-session=Lubuntu
display-setup-script=/home/name/scripts/monitors.sh
allow-guest=false
greeter-hide-users=true
Next, save the file and restart your computer. If for some reason your computer hangs, showing a blinking cursor, restart your computer again (if that happens, something is wrong with the script) After you select Ubuntu on the grub menu and the computer is booting up, press Ctrl + Alt + F1. Doing this should take you to a command prompt. Once there, you may have to enter your usersname/password. Next, type:

Code: Select all

sudo cp /etc/lightdm/lightdm.conf.old /etc/lightdm/lightdm.conf
Hit enter and reboot.

What that will do is essentially restore your lightdm file, allowing you to boot normally.

Sorry for the messy post. Hopefully you will be able to read through it and solve your problem.
Alexandr Ushakov
Posts: 9
Joined: Sat Oct 26, 2013 11:34 am

Thanks

Post by Alexandr Ushakov »

Thank you, infectedorganism! Your reply had helped me to fix the problem!

P.S. "infectedorganism" - cool nickname. Sounds good.
P.S.S. Why developers and testers dont noticed this bug and dont fixed it?
Alexandr Ushakov
Posts: 9
Joined: Sat Oct 26, 2013 11:34 am

Post by Alexandr Ushakov »

But, when I disconnect monitor, I need to open terminal and copy config backup. :(
So, it's not complex solution of problem.

Maybe, there is way to add condition (execute, when minitor is connected"?
infectedorganism
Posts: 3
Joined: Tue Oct 29, 2013 2:42 am

Re: Notebook screen & external monitor problem

Post by infectedorganism »

I will try to find a solution, but I am a 'beginner' of sorts so hopefully we can find something to get things working for you.

Another solution MIGHT be to add your preferred LXRandr settings to your ~/.config/lxsession/lubuntu/autostart file. Whenever you change your monitor settings and click save, those settings are saved at ~/.config/autostart/lxrandr-autostart.desktop.

Open that file and look at the line starting with Exec=

Copy/paste the line after the =, and place it in the ~/.config/lxsession/lubuntu/autostart file. Example:

Code: Select all

@xrandr --output VGA1 --mode 1920x1080 --rate 60.0 --output LVDS1 --off
Maybe this is a workaround to give you the expected behavior until we can figure out another solution.

Note, this is untested by me, but because that line is expected to autostart due to you saving your configuration within LXRandr, it should give you the expected behavior.

I haven't been able to get anything in ~/.config/autostart to actually autostart which is why saving my configuration from LXRandr never worked for me, and maybe why it has never worked for you. I think that is due to the new lxsession-default-apps that came bundled with 13.10.
infectedorganism
Posts: 3
Joined: Tue Oct 29, 2013 2:42 am

Re: Notebook screen & external monitor problem

Post by infectedorganism »

Or, you could try to modify the script you created, removing everything and replacing it with the line found in your lxrandr-autostart.desktop file.

Again, untested by me but I am just trying to give you some possible workarounds.
Alexandr Ushakov
Posts: 9
Joined: Sat Oct 26, 2013 11:34 am

Re: Notebook screen & external monitor problem

Post by Alexandr Ushakov »

Thanks for your reply.
infectedorganism wrote: Copy/paste the line after the =, and place it in the ~/.config/lxsession/lubuntu/autostart file. Example:

Code: Select all

    @xrandr --output VGA1 --mode 1920x1080 --rate 60.0 --output LVDS1 --off
Excuse me, but I dont understand, what actions you offer to do.
I should edit .config/lxsession/lubuntu/autostart?

And if it possible, how to edit already added line in config to achieve the desired result?
Locked